-
Notifications
You must be signed in to change notification settings - Fork 150
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
rework common module #291
rework common module #291
Conversation
|
|
|
|
|
|
|
|
@@ -0,0 +1,78 @@ | |||
|
|||
CBA_fnc_createCenter = { | |||
WARNING('Deprecated function used: OLD_FUNCTION'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OLD_FUNCTION
-> CBA_fnc_createCenter
if (_verify) then { | ||
if (_unit canAdd _item) then { | ||
if (_ammo < 0) then { | ||
_unit addMagazine [_item, 1E6]; // addMagazine STRING is not synched when used on remote units. addMagazine ARRAY is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of adding one million magazines to a unit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a million magazines, but one magazine with full ammo.
See: https://community.bistudio.com/wiki/addMagazine_array
addMagazine STRING
fails on remote units. The alternate syntax addMagazine ARRAY
does work on remote units.
I've tested this in local hosted MP and it's true. addMagazine
does desynch the inventory causing weird issues when used on remote units. This is part of the fix to get this function working on all units regardless of locality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes. I've seen magazines with such ammo counts. One of these DayZ axes had 10.000 ammo in it's dummy magazine.
same as the other one, but friendlier to review (I hope)