branchrust_reboot/main/NewWoundingcancel
116 Commits over 30 Days - 0.16cph!
Allow crawling players to use doors, gates, and hatches
If there are UI actions on the thing being looked at, but none of them are currently available to be shown, don't return any of them. Previously if no options were available, the first option would be returned.
Replace wounded start anim so it shows crawl->incapacitated instead of stand->incapacitated
Added new UsableWhileWounded menu attribute and added it to the code generator
Don't show interaction if interaction is not possible
Prevent interaction while crawling (will add special cases later)
Adding a future option to cancel any pending health when entering wounded state. Currently unused.
added crawl to wounded player anim
updated blendtree and wounded player anims
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
updated vm healing player wounded and updated speed playback of anim in animator
updated override controller to play correct anim when healing wounded players
updated vm anim for healing wounded players
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.
extended syringe player anim
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