this version without bugs

This commit is contained in:
2010-02-09 10:14:09 +03:00
parent 105c340243
commit 52a5384e6f
16 changed files with 420 additions and 1117 deletions

View File

@@ -33,10 +33,11 @@ bool Alien::RecreatePath()
PathIndex = 1;
start.setX(qRound(position.x()/(float)game->cellsize));
start.setY(qRound(position.y()/(float)game->cellsize));
if (game->Cells[start.x()][start.y()] < 0) return false;
srcPath = InvWaveTrace(game->finish,WaveTrace(start,game->finish));
for (int i=0; i<srcPath.size();i++)
{
game->Cells[srcPath.at(i).x()][srcPath.at(i).y()] = 1;
game->Cells[srcPath.at(i).x()][srcPath.at(i).y()] = 5;
tmpPath.push_back(QPointF(srcPath.at(i)));
}
srcPath.clear();