You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetworkWeapon._generate_id(...) calls randi_range(...) for selecting random characters. This would normally be fine, but if a user attempts to use seed(...) to intentionally generate the same random values all peers it'll end up re-using the same values.
Using a RandomNumberGenerator (initialized with randomize()) to always maintain a seed unique from others' code and expectations is recommended (also for the user, so this is half on me 😉).
The text was updated successfully, but these errors were encountered:
There's some design discussions still up in the air, but in the meantime #270 should fix this. @Lexari0 feel free to check the PR and add any notes if you have, otherwise I'll merge it in the coming days :) You can grab the modified source and plop it into your project in case you're blocked by this.
NetworkWeapon._generate_id(...)
callsrandi_range(...)
for selecting random characters. This would normally be fine, but if a user attempts to useseed(...)
to intentionally generate the same random values all peers it'll end up re-using the same values.Using a
RandomNumberGenerator
(initialized withrandomize()
) to always maintain a seed unique from others' code and expectations is recommended (also for the user, so this is half on me 😉).The text was updated successfully, but these errors were encountered: