diff options
Diffstat (limited to 'src/GameTick.cpp')
-rw-r--r-- | src/GameTick.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/GameTick.cpp b/src/GameTick.cpp index b0615e0..311ba9a 100644 --- a/src/GameTick.cpp +++ b/src/GameTick.cpp @@ -443,7 +443,8 @@ void nextLevel(Game* game) void checkPersonCollisions(Game* game, int k) { auto& person = game->person[k]; - person.oldplayercoords = person.playercoords; + if (k != 0 || !visions) + person.oldplayercoords = person.playercoords; person.DoStuff(k); if (person.skeleton.free) return; @@ -489,8 +490,6 @@ void checkPersonCollisions(Game* game, int k) if (k != 0) continue; - game->onblockx = i; - game->onblocky = j; // Wall collision const auto city_type = game->citytype[i][j]; @@ -512,8 +511,6 @@ void checkPersonCollisions(Game* game, int k) person.onground = true; person.playercoords.y = 0; Splat(game, k); - if (k == 0) - game->onblockx = game->onblocky = -1; } } @@ -593,7 +590,7 @@ void spawnNpc(Game* game) npc.pathtarget *= npc.pathsize; npc.pathtarget.x += npc.whichblockx * block_spacing; npc.pathtarget.z += npc.whichblocky * block_spacing; - npc.oldplayercoords = npc.playercoords = npc.pathtarget; + npc.oldplayercoords = npc.playercoords = npc.pathtarget; npc.skeleton.free = false; npc.speed = 1; @@ -956,7 +953,7 @@ void renderLaser(Game* game) void Game::Tick() { - if (person[1].health <= 0 || person[0].health <= 0 || killedinnocent) + if (person[1].health <= 0 || person[0].health <= 0) losedelay -= multiplier / 6; else timeremaining -= multiplier; |