-
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
Medical Status - Add isDamageAllowed
check to setDead
#8803
Conversation
Just to clarify because this is really hard to review without context:
|
Veteran's community has had issues with players being moved to dead state while remaining alive. As entering dead state would require this function to be called, I can only see three things failling:
To clarify, I've never seen the bug myself, so these are just my best guesses on the subject. Could be some other obscure interaction or something else entirely for all I know. |
Thanks, that's perfect! Personally I'm unsure about these changes, if we have no evidence to suggest they're the issue then they seem like a bit of a red herring. I do seem to recall we used to have a delay on the damage resetting, may be worth checking git history to see why it was removed (if true) 🤔 While there would be no harm in adding remote support to the function, if the intention is that it only ever runs local to the unit then the right fix would be to figure out where it is running remotely (if it is). Edit: Don't be discouraged though, let's see what others think too. |
Ah looks like previously when we had a frame delay it was back when we were using |
@kymckay see the linked PR from my unit mod, the PR was made before I was actually able to evaluate where the issue is. @Salluci can you convert this PR to the draft for now? |
After further investigation, I found out that the medical issue we were facing in my unit is by us enabling BIS EG Spectator the moment unit dies, this started causing issues due to @Salluci could you simplify this PR to include only the: if (!isDamageAllowed _unit) then {
WARNING_1("setDead executed on unit with damage blocked - %1",_unit);
_unit allowDamage true;
}; bit. |
setDead
isDamageAllowed
check to setDead
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.
@veteran29 Are you hooking into the local event of this function which runs before the setHitPointDamage
?
In any case I think this check should be moved to after that since other code using that event could be falsely preventing damage, would also be good to see a code comment explaining that very reasoning for future reference.
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.