Medical Gui - Prevent firing on sudden menu close#11344
Conversation
|
0.5 seconds seems like a long time to me but if it's only on sudden closures and not all closures then it's probably fine. |
|
Mean visual reaction time of some med students was like 0.25s so 0.5s seems reasonable to account for the Arma old-timers. Could make it a slider setting, 0 to disable and up to 1s? |
|
Might be good to extend this to after waking up from uncon as well? |
Co-authored-by: Dart <59131299+DartRuffian@users.noreply.github.com>
| [[ELSTRING(medical,DistanceToFar), GVAR(target) call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); | ||
| }; | ||
|
|
||
| [0.5] call EFUNC(common,temporaryBlockFire); // prevent firing from sudden menu closure |
There was a problem hiding this comment.
| [0.5] call EFUNC(common,temporaryBlockFire); // prevent firing from sudden menu closure | |
| [0.5] call EFUNC(common,temporaryBlockFire); // prevent firing from sudden menu closure |
There was a problem hiding this comment.
During testing I found that I was often shooting despite this safeguard. I tried increasing it to 2 seconds just to test and was able to fire immediately upon menu closure, so it looks like it doesn't intercept all mouse events in time.
I think 0.5 seconds is not enough for me at least. You mentioned adding a setting - imo having a slider that would allow players to set the timeout themselves would be the best option, as it could also allow them to disable it.
| if (_unit == ACE_player) then { | ||
| switch EGVAR(medical,windowOnWakeUp) do { | ||
| case 1: { // Focus | ||
| [0.5] call EFUNC(common,temporaryBlockFire); // prevent firing from surprise context switch |
There was a problem hiding this comment.
What's the likelihood of this actually doing something? Players are usually in the unconscious animation and need to unholster their weapon before they can shoot, which is longer than 0.5 seconds.
Gives very brief block of mouse firing when the medical menu closes because of condition
(not on intentional closure from hitting escape)
e.g. treating patient, clicking on action, they move a little bit away, and you click and shoot them☹️
could make setting if needed