Commit c70dede5 authored by bocianu's avatar bocianu

spawning fixed

parent 1419de92
......@@ -827,10 +827,13 @@ begin
if spawnCounter = 40 then begin
PaintOnBoard(Hi(spawners[spawnerActive]),Lo(spawners[spawnerActive]),TILE_SPAWNER_OPEN2);
end;
if spawnCounter = word(ghostNumber + 1) then begin
PaintOnBoard(Hi(spawners[spawnerActive]),Lo(spawners[spawnerActive]),TILE_SPAWNER);
SpawnGhost(ghostNumber,Hi(spawners[spawnerActive]),Lo(spawners[spawnerActive]));
spawnCounter := spawnDelay;
if (spawnCounter = 0) then begin
Inc(spawnCounter);
if (pac.frame = ghostNumber + 1) then begin
PaintOnBoard(Hi(spawners[spawnerActive]),Lo(spawners[spawnerActive]),TILE_SPAWNER);
SpawnGhost(ghostNumber,Hi(spawners[spawnerActive]),Lo(spawners[spawnerActive]));
spawnCounter := spawnDelay;
end;
end;
Dec(spawnCounter);
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment