branchrust_reboot/main/NewWoundingcancel
103 Commits over 0 Days - ∞cph!
Adding a future option to cancel any pending health when entering wounded state. Currently unused.
Added crawlingminhealth and crawlingmaxhealth convars
Fixed ducking while crawling affecting the player's view position
More eye fixes, crawling looking good from first-person at all angles now
Fixed eye position not handling view offsets with a z offset (keep old handling for mountables where we want to cancel the x/z - see #22833)
Get the view height right for first-person crawling. Change crawling cam to FirstPersonWithArms. Fix BodyLeanOffset not handling view offsets that aren't y-axis only.
Various changes to accommodate crawling into eye and view code
Add crawling position to the IsPlayerVisible checks
Reduced eight IsPlayerVisible check methods to one.
Fix the slow animation always playing on the world space player. All correct syringe animations now play
Adjust use_other_wounded viewmodel animation event position and overall speed so that the event fires right at 5.25s
Setting up world model alt animation for wounded player syringe use. Set modelState.aiming = true for the duration.
Re-enable syringe revives with longer, 5.25 second animation. Need viewmodel animation replacement - using a slowed-down version for now. World model update not done yet.
Reorder recovery code. Check needs to be done before the flags reset
Remove 20HP revive cap, reverting behaviour to how it is on release so that players can heal while wounded and keep it all when revived. Add special handling for crawling state, so player can have more health while crawling, yet revive from crawling to having a weak amount of health, and also still take into account healing gained while in crawling state.
Revert syringes to not revive players, at least until/unless we get a longer animation variant done
Syringe use on a wounded player now revives them again (was disabled intentionally in #
15918, Aug 2016)
thumb_up
16
thumb_down
17
Cap health to 20HP when revived
Change to large medkit recovery. Only use up the large medkit to recover if the player fails their recovery check and was going to die. So if they get lucky and would have recovered for free anyway, the medkit is not used up.
Increase woundedmaxfoodandwaterbonus from 20% to 25%
Fix inverse lerp that should have been a lerp.
Is player has a large medkit in their belt when becoming wounded, their chance to recover when time runs out is locked at 100%. Recovering then uses up the medkit but doesn't provide any bonus health.
thumb_up
31
thumb_down
10
Food and water levels now affect recovery chance from wounded state. Added convar woundedmaxfoodandwaterbonus that sets the maximum percent chance increase
Editor-only convars for dev. WoundedFreeCamera and WoundedNeverEnds. Also in the Rust Editor window.
Change crawl speed to 0.6m/s to correctly match the animation speed
Recover chance difference for crawling vs. incapacitated. Added convars for each.
Reset wounded timer if player goes from crawling to incapacitated. Some refactoring.
Set speed thresholds in the crawling blendtree to 0.5 instead of 1.0, since we only crawl at 0.75 (currently)
Animation: Give look look direction a 0 weight while crawling.
Don't show health while wounded
Splitting up the wounded states into separate methods
Allow for forced death after wounded timeout
Continuing setup for the two levels of wounding, crawling and incapacitated
Set up correct crawl speed
Fix incapicated gesture, make CurrentGesture nonserialized
More crawling code, getting to grips with the whole player model system
Move modelstate initial params to one place, in the constructor. Set up crawling state
WIP PlayerModel code, some renaming
Hook up a new BeingLooted flag for players
Reintroduce ServerFall for incapacitated players. Still WIP