Skip to content

Commit

Permalink
Changed weather cycler oneliner to if block
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihis committed Nov 30, 2023
1 parent 5ffa654 commit 717eb64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rwgame/RWGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 717eb64

Please sign in to comment.