do not modify velocity from impulse

item-info
John Montagu, the 4th Earl of Sandvich 2023-03-19 14:13:20 -07:00
parent 548e9131f2
commit 488ace3149
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 2 additions and 1 deletions

View File

@ -39,13 +39,14 @@ namespace SupaLidlGame.Characters.State
{ {
Character.Velocity += Character.Direction.Normalized() Character.Velocity += Character.Direction.Normalized()
* Character.Speed; * Character.Speed;
// we should only modify velocity that is in the player's control
Character.ModifyVelocity();
} }
Character.NetImpulse = Character.NetImpulse.MoveToward( Character.NetImpulse = Character.NetImpulse.MoveToward(
Vector2.Zero, Vector2.Zero,
(float)delta * Character.Speed * Character.Friction); (float)delta * Character.Speed * Character.Friction);
Character.ModifyVelocity();
Character.MoveAndSlide(); Character.MoveAndSlide();
return null; return null;