From 250a16d5fa14b462b44b1e698372164ac33aa721 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Fri, 25 Nov 2016 21:48:53 +0800 Subject: [PATCH] Avoid using bool as int --- Source/GameTick.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 4da057e..4ff1250 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -2055,7 +2055,7 @@ void doDebugKeys() } if (Input::isKeyPressed(SDL_SCANCODE_C)) { - cameramode = 1 - cameramode; + cameramode = !cameramode; } if (Input::isKeyPressed(SDL_SCANCODE_X) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) { @@ -2386,7 +2386,7 @@ void doDebugKeys() } if (Input::isKeyPressed(SDL_SCANCODE_M) && Input::isKeyDown(SDL_SCANCODE_LSHIFT)) { - editorenabled = 1 - editorenabled; + editorenabled = !editorenabled; if (editorenabled) { Person::players[0]->damagetolerance = 100000; } else { @@ -5525,7 +5525,7 @@ void MenuTick() displayblinkdelay -= multiplier; if (displayblinkdelay <= 0) { displayblinkdelay = .3; - displayblink = 1 - displayblink; + displayblink = !displayblink; } } @@ -5684,7 +5684,7 @@ void Game::Tick() //keys if (Input::isKeyPressed(SDL_SCANCODE_V) && debugmode) { - freeze = 1 - freeze; + freeze = !freeze; if (freeze) { OPENAL_SetFrequency(OPENAL_ALL, 0.001); } @@ -5718,7 +5718,7 @@ void Game::Tick() consoleblinkdelay -= multiplier; if (consoleblinkdelay <= 0) { consoleblinkdelay = .3; - consoleblink = 1 - consoleblink; + consoleblink = !consoleblink; } } -- 2.39.5