-
Notifications
You must be signed in to change notification settings - Fork 740
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 Statemachine - Fix locality EH breaking current state #7136
Conversation
Can you explain how the Local event works with JIP etc? |
So anytime somone jipped, it was sending a event with the Default state |
addons/medical_statemachine/functions/fnc_localityChangedEH.sqf
Outdated
Show resolved
Hide resolved
addons/medical_statemachine/functions/fnc_localityChangedEH.sqf
Outdated
Show resolved
Hide resolved
}; | ||
} else { | ||
/* | ||
// Not sure if this is even needed, idea is that on locality transfer we broadcast more up to date info |
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 think this should be the case in order to send the latest information, specially if the medical states vary between clients (you have a completely different medical state and some information may be even lost). In any case, it should be done before doing a manual transition to a particular state in my opinion.
Fix #7126
Problems from PR #6950
On locality change we have to do something to make sure state machine is in correct state
But I didn't realize how local EH actually works and each time a new client connected it was sending locality transfer events
This PR just uses the existing vars to determine state locally.