Prototype: Override Shared Random Values#528
Prototype: Override Shared Random Values#528ProdigySim wants to merge 2 commits intoSirPlease:masterfrom
Conversation
|
We should be a little careful when overriding calls to "SharedRandomValue". I don't know exactly how this system works, but I imagine every call to this on server side is paired with a similar call on the client side, and both systems will advance a shared RNG in a specific sequence. I opted to use We will still have desync between client and server, however--we can't get clients to use the override value. So, in the spread example, users will still see incorrect spread locally. We may need to use the visualize_impacts plugin to diagnose spread changes. |
|
Alan tested this plugin out and it resulted in 1 "single" pellet being fired. This suggests that the vanilla spread may just be 100% random within the spread range |
|
Some logs, with 1 chrome shot: |
What if we could just override any random value the game is given?
Prototypes a plugin to override
SharedRandomFloatand provides the opportunity to return a static value in the requested range.Impetus for this plugin: What if we used vanilla spread patterns for shotguns, but kept their spread static?