diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GameLoop.cpp | 6 | ||||
-rw-r--r-- | src/GameTick.cpp | 28 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index 3dc2bf5..3e31baa 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -142,13 +142,13 @@ void handleKey(Game* game, int key, int action, int mods) player.playercoords = player.oldplayercoords; player.velocity = {}; } + } else if (key == keymap.switch_view) { + thirdperson = (thirdperson == 2) ? 0 : (thirdperson + 1); } if (!game->debug) return; - if (key == keymap.switch_view) { - thirdperson = (thirdperson == 2) ? 0 : (thirdperson + 1); - } else if (key == keymap.skip) { + if (key == keymap.skip) { game->timeremaining = 0; } else if (key == keymap.pause) { alSourcePlay(gSourceID[soulinsound]); diff --git a/src/GameTick.cpp b/src/GameTick.cpp index 68fe508..901ea75 100644 --- a/src/GameTick.cpp +++ b/src/GameTick.cpp @@ -2341,20 +2341,20 @@ hit_terrain: camera.position = person[0].skeleton.free ? average : person[0].playercoords + rotate(average, 0, person[0].playerrotation, 0); - } - if (camera.position.y < 0.1f) - camera.position.y = 0.1f; - if (this->zoom || visions || this->person[0].aimamount <= 0 - || this->person[0].whichgun == nogun - || this->person[0].whichgun == grenade - || this->person[0].whichgun == knife) { - camera.visrotation = camera.rotation; - camera.visrotation2 = camera.rotation2; - } else { - camera.visrotation = std::min(camera.rotation + 7, - std::max(camera.rotation - 7, camera.visrotation)); - camera.visrotation2 = std::min(camera.rotation2 + 15, - std::max(camera.rotation2 - 15, camera.visrotation2)); + if (camera.position.y < 0.1f) + camera.position.y = 0.1f; + if (this->zoom || visions || this->person[0].aimamount <= 0 + || this->person[0].whichgun == nogun + || this->person[0].whichgun == grenade + || this->person[0].whichgun == knife) { + camera.visrotation = camera.rotation; + camera.visrotation2 = camera.rotation2; + } else { + camera.visrotation = std::min(camera.rotation + 7, + std::max(camera.rotation - 7, camera.visrotation)); + camera.visrotation2 = std::min(camera.rotation2 + 15, + std::max(camera.rotation2 - 15, camera.visrotation2)); + } } //Kill count |