-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBA_fnc_getPos returning array reference instead of an array-copy #584
Comments
I think getPos returning an input reference is ok and we just need to fix randPos |
IMO, the fix should be done in fnc_getPos. It makes no sense for |
…c objectives being moved to weird positions). Fixed recruits being created over water.
…c objectives being moved to weird positions). Fixed recruits being created over water.
@highhead @marceldev89 _position getPos [random _radius, random 360] https://community.bistudio.com/wiki/getPos#Alternative_Syntax |
_position getPos [_radius * sqrt (random 1), random 360] |
CBA_fnc_getPos is returning the feeded array reference instead of an array-copy,
which f.e. then bugs out CBA_fnc_RandPos which will alter the originally passed position instead of only returning a new one. The latter related to this commit, where the array-copy has been removed:
8a4d6c2#diff-bee87607846a78814c6fe5729a46a521L24 - line 24
In our case (ALiVE), the usage of the function also causes positions beeing altered in our hashes data.
The text was updated successfully, but these errors were encountered: