From 717eb64ec8dffd1ff0c3e5cd4644e4f92a722640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20L=C3=A4hteenm=C3=A4ki?= Date: Thu, 10 May 2018 10:36:49 +0300 Subject: [PATCH] Changed weather cycler oneliner to if block --- rwgame/RWGame.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rwgame/RWGame.cpp b/rwgame/RWGame.cpp index 84062146c..90c9378fa 100644 --- a/rwgame/RWGame.cpp +++ b/rwgame/RWGame.cpp @@ -559,9 +559,13 @@ void RWGame::tick(float dt) { prevGameHour = state.basic.gameHour; state.basic.lastWeather = state.basic.nextWeather; - // TODO: VC and SA has more than 3 weather conditions + // TODO: VC and SA has more than 4 weather conditions if (state.basic.forcedWeather > 3) { - state.basic.weatherType <= 64 ? ++state.basic.weatherType : 0; + if (state.basic.weatherType < 63) { + ++state.basic.weatherType; + } else { + state.basic.weatherType = 0; + } state.basic.nextWeather = data.weather.WeatherList[state.basic.weatherType]; } }