-
Notifications
You must be signed in to change notification settings - Fork 735
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
Medical - Add 'Open (Backpack)' action to dead units #9239
Medical - Add 'Open (Backpack)' action to dead units #9239
Conversation
_unit addAction ["OpenBag", { | ||
params ["_target", "_caller"]; | ||
|
||
_caller action ["OpenBag", _target]; |
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 does seem to work on dead people, but I also see this note
// 26.8.2013 HOTFIX CardA: ATOpenBag can be processed with a live soldier's bag only
// because some actions between bag and other containers(like ground,...)
// needs unit->Brain() which is invalid for a dead soldier(dead soldier has no brain)
I really don't think we can disable those vanilla actions |
noticed actions don't get re-added when unit respawns, |
Why not add something similar to this instead? |
This is for scroll wheel actions specifically. |
Sorry, I don't know how, but I missed that part. Nonetheless, the condition checking of what I linked might be worth using here (part of !lockedInventory _this && {maxLoad _this > 0} && {getNumber (configOf _this >> "disableInventory") != 1} // _this being backpackContainer (I added it above, beneath an already existing suggestion) |
This should resolve the dead unit and respawning issues mentioned. Edit: Forgot to remove some test code, so the commit after the one mentioned above resolves those issues. |
LGTM. Moved to postInit. |
getting double backpack actions for dead units edit: this is for a unit that I put health at 0 in 3den openbag.mp4 |
I assume it's because the EH and the So in if (_unit getVariable [QGVAR(actions), false]) exitWith {};
_unit setVariable [QGVAR(actions), true]; |
The doubling of the actions should be fixed now. However, I could not replicate the open bag not working on dead units, even ones killed in the editor. |
mission showing backpack action not working on dead units |
I'm not sure if this will be fixed. It might be related to https://feedback.bistudio.com/T126030#2482353 in part, so it might be fixed if KK decides to look into units set to 0 health in the editor. |
fixed double actions by
|
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
We can just keep an eye out if the old notes about |
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.