Open danhedron opened 6 years ago
In IRC @JayFoxRox brought up that opcode 01B5 is used only once in GTA III; in "Blowfish" mission. I did some testing and effect of the 01B5 can been seen only with correct timing. The 01B5 is triggered to force weather to sunny when you park the Trasher in the marker between the two canisters and weather is released with opcode 01B7 after the factory has been blown up or after failing the mission.
Consider consider following weather scenario:
12:00 PM: Sunny 13:00 PM: Sunny (starts transition to foggy) 14:00 PM: Foggy 15:00 PM: Foggy (starts transition to sunny) 16:00 PM: Sunny
To see the effect of the 01B5 you should:
13:00 PM: Sunny (starts transition to foggy)
13:57 PM: Park Trasher to marker between the two canisters
14:00 PM: Foggy (starts transition to sunny)
14:05 PM: Trigger the bomb and leave the Trasher
15:00 PM: Sunny (starts transition to foggy)
16:00 PM: Foggy (starts transition to sunny)
17:00 PM: Sunny
I have started to implement (initial version) of dynamic weather, I'll try to prep PR in following days.
As @JayFoxRox kindly noted that we have more game breaking issues that would need attention, I'm postponing my work (which still needs some research) on this until this issue becomes relevant. Current implementation at https://github.com/Lihis/openrw/pull/2.
The weather system currently does not change weather.
The original game has a hard-coded set of weather conditions that are cycled through seen here.
The behaviour of some opcodes related to weather need to be fixed to set the forced weather condition, rather than interrupting the dynamic weather.
Weather conditions are part of the Basic state, which is also loaded from save files.
Further information is appreciated.