-
Notifications
You must be signed in to change notification settings - Fork 736
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
Remove parachute landing animation #5794
Conversation
The vanilla animation has since been reworked and is an improvement.
e74215e
to
d69d86d
Compare
addons/parachute/XEH_postInit.sqf
Outdated
@@ -33,7 +33,7 @@ GVAR(PFH) = false; | |||
["vehicle",{ | |||
if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then { | |||
GVAR(PFH) = true; | |||
[FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler); | |||
[FUNC(onEachFrame), 0.1, []] call CBA_fnc_addPerFrameHandler; | |||
}; | |||
}] call CBA_fnc_addPlayerEventHandler; |
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.
The whole thing can be deleted.
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 needs to run to determine when the player lands to reset the chute cut variable. Which is what I mention in the OP about if we change the way those variables are handled we can totally remove the PFH.
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.
(At least, I'm assuming that variable being reset is necessary. It's quite hard to determine what the original intent is with some of the code)
Yeah I also saw that and actually think it might be slightly broken since it's running via a CBA XEH on CAManBase and not just on the player respawn |
I still don't get what we need |
I think it's so that a reserve chute is not added if the players uses a reserve chute which is configured to have a reserve, but not entirely sure myself |
ACE3/addons/parachute/CfgVehicles.hpp Line 18 in 98da86b
@SilentSpike I think you can't just remove |
Aha so that's where it's used! I did a ctrl+shift+f for the function but it didn't turn up that instance. Thanks 😄 |
Think this should now work as intended now without the arbitrary code complexity, but haven't had a chance to test yet |
Got around to testing this, seems the cut parachute action is broken because I overlooked that the |
Fixed and tested, this should be good to go 👍 |
Actually 🤔 I think if player was to pull chute and never cut it, then the The simple way to avoid all this nonsense would be to let players cut any parachute, but then we'd have to provide some indication that they have a reserve because there's no way to check while in the air. |
- Prevent potential for action to be present when reserve is not available - Move cut parachute action to the parachute self actions rather than the player's
Okay fixed all the issues now and massively reduced the complexity of the implementation 👍 Will let @commy2 handle the vanilla UI stuff. Only thing I did notice in testing is that when you cut your chute you don't seem to return to the falling animation, but that isn't a result of this PR and must be a longstanding bug (which I won't address because I hate messing with animations). |
UI stuff is fixed here: ref #5836 |
|
||
_TimeText ctrlSetText (format ["%1:%2",[_hour, 2] call EFUNC(common,numberToDigitsString),[_minute, 2] call EFUNC(common,numberToDigitsString)]); |
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.
We want the old way, it pads zeros to the left
[5, 2] call ace_common_fnc_numberToDigitsString = "05"
5 toFixed 2 ="5.00"
* Remove parachute landing animation The vanilla animation has since been reworked and is an improvement. * Optimise altimeter code * Fix reserve chute handling and cutting action * Fix cut parachute action * Fix cut parachute action further - Prevent potential for action to be present when reserve is not available - Move cut parachute action to the parachute self actions rather than the player's * Revert number to string conversion
The vanilla animation has since been reworked and is an improvement.
I believe the PFH used to track when the player lands could also be removed by adjusting how the variables that track chute cutting and reserve chute are used.
Beyond the scope of this PR though.Closes #5596