-
Notifications
You must be signed in to change notification settings - Fork 739
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
WIP: fix setting velocity on paradropping cargo #8204
WIP: fix setting velocity on paradropping cargo #8204
Conversation
Makes paradropItem and unloadItem invoke event "ace_cargoUnloaded" with parameters _itemObject, _vehicle and "paradrop" or "unload" respectivelty. paradropItem invoked said event but if item was classname it would send classname to event which is not particularly useful.
Moved event invocation to unloadItem, this provides ability to always pass object to eventhandlers.
Add ownerParadrop eventHandler that sets items velocity on owners machine Add serverParadrop eventHandler that additionally handles invoking ownerParadrop Rearange paradropItem to support above changes.
refactored according to acemod#8203 (comment)
replaced ownerParadrop with common, setVelocity which does exactly the same thing.
|
||
_item hideObjectGlobal false; | ||
_item setPosASL (AGLtoASL _emptyPosAGL); | ||
[QEGVAR(common,setVelocity), [_item,_dropVelocity],owner _item] call CBA_fnc_ownerEvent; |
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.
?
I do not understand how this is supposed to solve anything. To me it seems like it should just be: _itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)); -> private _velocity = velocity _vehicle vectorAdd (vectorNormalized vectorDir _vehicle vectorMultiply -5);
[QEGVAR(common,setVelocity), [_itemObject, _velocity]] call CBA_fnc_globalEvent; and also consider the other Maybe I am missing something, but |
After finalizing #8203 I will try a simpler approach you suggested in #8199. |
After rewatching the video, targetEvent seems to be sufficient, however, the current ownerEvent is just weird and there is no reason to make a second handler on the server for a single line. |
Simpler fix
…LupusTheCanine/ACE3 into cargoParadrop-setVelocity-fixV2
…ixV2 Cargo paradrop set velocity fix v2
Closing now, I have a new version which incorporates changes suggested by commy2 and implementing them in a new branch will yield much cleaner pull request. |
When merged this pull request will:
Fixes #8199
Code changes summary: