CleverRaven/Cataclysm-DDA — pull request #5494 by BevapDin (2014-01-10 18:35:10+00:00)
Title: Fix using previous weather segment on load

According to `game::update_weather` the weather changes, when `turn >= nextweather` is true, so `nextweather` should always be greater than the current turn.

The current implementation for loading the weather
```
weather_segment cur = w_it->second;
if ( w_it->first > int(turn) ) {
--w_it;
if ( w_it != weather_log.end() ) {
cur = w_it->second;
}
}
nextweather = cur.deadline;
```
sets `nextweather` to something before the current turn (if possible), because if `w_it->first > turn`, it goes back to the previous weather entry (the key in the `weather_log` map is the deadline of the weather segment). This makes `game::update_weather` change the weather directly after loading. This can be observed in debugger.

removing that block gets rid of that unnecessarily weather change and the problem mentioned in #4853