momentum-mod/game

Consider making upward `trigger_push` behave like in CS:S when on the ground

Opened this issue · 0 comments

https://discord.com/channels/235111289435717633/1204547770967523388

When a trigger_push has a push velocity with a positive Z component and it pushes an entity that's on the ground, it clears that entity's ground entity and moves it up by 1.0 unit. If the entity is a player, when the player next runs movement, it will re-detect the ground underneath and erase the upward push velocity,

On CS:S, after two ticks of this sequence, the entity ends up moving beyond the ground detection distance (<2.0 units) which keeps the entity from re-detecting the ground and clearing the upward push, resulting in the entity flying upward due to the trigger_push infuence.

On Momentum (and CS:GO, and TF2?), when the player's ground is set, they are moved downward exactly to ground level (mom_mv_snap_to_ground), rather than being allowed to remain floating up to 2.0 units off the ground. This prevents the 1.0 unit lift from accruing and thus prevents the automatic liftoff effect when in an upward trigger_push. The player is still able to lift off by leaving the ground by other means, including by jumping.

The fact that the CS:S behavior involves the 1.0 unit lift accruing over several ticks doesn't seem like it would have been intentional by Valve. However, trigger_push being able to lift a grounded player on its own feels more correct, so it is probably best to make Momentum behave like CS:S in this way, perhaps by increasing the 1.0 unit lift to 2.0 units so it bypasses the ground snapping and doesn't involve any multi-tick delay.