-
Notifications
You must be signed in to change notification settings - Fork 736
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
Arsenal - Fix FUNC(removeVirtualItems)
for JIP players
#9650
Conversation
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.
This should work (I can't test for a while), but I'm not a fan.
Did this work properly in 3.15.2?
I'm not a huge fan because of the possible growing JIP queue, but this methods technically allows the most flexibility. What are your concerns?
Given the setup wasn't that much different from what is now in 3.16.1, I think this has always been broken. But at the same time, I would be surprised if that were really the case, someone would have certainly complained about it sooner. https://github.com/acemod/ACE3/pull/9040/files#diff-be69c81d7a52a673c5725994e6c9d11c944400be668ce2d33b9290e2e84ecbe2 #9040 did some minor changes to I'm going to check if it was working in 3.15.2 later today. |
JIP queue is the only concern. Ideally there wouldn't be enough changes made over the course of a synced arsenal's lifetime for it to be an issue, but it can have an impact when a player joins. Whether it's significant enough to worry about, I don't know. I'm not worried about desync, though. |
I can confirm that this did not work in 3.15.2, it's been broken for god knows how long.
I'm not sure how to go about it in a better way unfortunately. |
If it didn't work in 3.15.2 then this is good enough of a fix. Won't approve because I can't test, but code LGTM. |
Better way was found... |
!isNil {(_this select 0) getVariable QGVAR(virtualItems)} | ||
}, { | ||
[_this select 0, _this select 1, true] call FUNC(removeVirtualItems); | ||
}, [_object, _items], 20] call CBA_fnc_waitUntilAndExecute; // 20s timeout in case of failure |
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.
🔥
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.
Not sure if you are saying it's lit or if it should be set on fire...
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.
The arsenal now refreshes globally if |
FUNC(removeVirtualItems)
for JIP players
When merged this pull request will:
FUNC(addVirtualItems)
orFUNC(removeVirtualItems)
was applied globally.The side effect is that all changes are stored in the JIP queue until the arsenal or its object is deleted. I'm not sure how to handle this any better.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.