Void Shield explosion insta-down (might've found the cause)

Issue Type (Required):

Player Mechanics

Issue Description (Required):

After looking at some of the utilities files for player character states, I decided to check the fall.lua one, and then I checked the falling and catapulted states, and noticed some interesting bits.

I think the reason it’s happening is that the player catapulted state, for some reason, never sets the falling height to the player’s current height on entering it. It also only updates the falling height value if the catapult velocity’s z is higher than 0 (meaning going upwards).

if self._locomotion_component.velocity_current.z > 0 then
	Fall.set_fall_height(locomotion_component, self._inair_state_component)
end

This results in being able to enter this state with an old falling height value from some point earlier, if the player doesn’t enter the falling state, or entered the catapulted state (with an upwards push) prior to it.

And because damage is updated independently when the catapulted state updates, it can result in not updating the old height value if the catapult effect has no upwards push, and potentially causing the player to take fall damage repeatedly until they die.

if self._is_server then
	Fall.check_damage(unit, constants, locomotion_component, inair_state_component)
end

I advice setting the falling height value to the current player height on entering the catapult state, like in the falling state, since it feels like an oversight that this isn’t done:

Fall.set_fall_height(self._locomotion_component, self._inair_state_component)

But if you also want to be extra safe, or for future-proofing, make it so taking fall damage also sets the falling height to the current player height. You don’t want that to go through multiple times for one fall in general, at least I wouldn’t think so..

(I’m setting the reproduction rate to unusual because of how specific it is, and because I actually haven’t had the time to test it, I’m just almost certain that this might be it)

This should be able to be reproduced consistently when fighting the Captain at the Chasm Station (if elevators do work without putting the player in the falling state for an instant). Simply jump when at the top before pressing the elevator button (maybe outside the elevator if you wanna be sure), and then never jump, fall off a small ledge, or vault, etc, when fighting the Captain, until he does the void shield blast that pushes you away, which should damage you or knock you down.

The relevant files are:

scripts\extension_systems\character_state_machine\character_states\player_character_state_catapulted.lua
scripts\extension_systems\character_state_machine\character_states\player_character_state_falling.lua
scripts\extension_systems\character_state_machine\character_states\utilities\fall.lua

Steps to Reproduce (Required):

  1. Avoid jumping, vaulting, and getting catapulted (launched by explosions, Mutants, or bosses in general), entirely.
  2. If done right, especially in a level with stairs or elevators that go down, after descending enough without ever entering either state, getting hit by a void shield explosion on flat ground should cause you to take fall damage, and likely even instantly go down.

(unsure if elevators can put you in the falling state even if for a moment, but I’m gonna guess they don’t so they should help with this)

[PC] Do You Use Mods? (Optional):

No, I don’t use mods

Reproduction Rate (Required):

Unusual (<25%)

Platform (Required):

PC - Steam

12 Likes
5 Likes

Oh hey, thank you for posting this and clearly showing it can be reproduced this way. I initially planned on testing it a bunch and updating the report once confirmed, but I haven’t had the chance to play the game much in the first place lately. Though I did get to reproduce it a few times when getting to face a Captain in a lower part of a level.

I know this is a local client game done with mods, but this specific issue will exist in both dedicated and non-dedicated servers regardless, it’s not something that’ll somehow behave differently.

Here’s hoping that it won’t take too long for Fatshark to fix it. I was honestly hoping today’s hotfix would include a fix for this, given how relatively simple it’d be to fix it (testing without debugging might be a more tricky given how specific it is though).

(oops, I accidentally deleted this message right after posting it)

I’ve seen this happen a lot recently, every time it was to a player or multiple players who had just been rescued (untied after dying and respawning).