this version without bugs
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user