View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004276||Source patches||Multi Theft Auto : San Andreas||public||2009-05-08 11:20||2018-07-17 00:16|
|Summary||0004276: Interior Weather Patch (Issue #0004138)|
This patch adds an optional boolean argument to "setWeather" and "setWeatherBlended" (both client-side and server-side) to allow weather on all interiors.
This could be used for outdoor places that are not on interior 0 and custom maps that use interiors.
|Tags||No tags attached.|
This seems like a useful patch. I'm not sure if it should go further though and allow the weather to be set in a particular interior (on the server). Just having a 'set in all interiors' flag is a good start, but I think it'd be more useful and consistent to have a interiorID input (that defaults to the current interior on the client and 0 on the server).
Hacks like the one you've done in CWeatherSA::SetInteriors should probably be in multiplayer_sa. We try to make the interface to game_sa as similar to GTA's own interface where possible, and we try to hide NOP hacks etc in multiplayer_sa.
Which would be neater and reduce the amount of code. I can see why you've done it like that - for symmetry with the code that resets it. Alternatively, you could write a hook function and just unset and reset it.
I've moved the NOP hacks to multiplayer_sa and made it use memset where possible.
It still specifies whether or not ALL interiors have weather. 'set in all interiors' seems to be sufficient for most uses. The only time I can think of that you would want interior specific weather, would be for a particular place, which could easilly be done with a client-side colshape.
I've also made client and server side getWeather also return a boolean specifying whether or not interior weather is enabled.
The new version is here: http://lucasstuff.com/external/mta/NewInteriorWeatherPatch.patch
Uploaded that patch here directly for reliable future reference.