Skip to content

Commit

Permalink
Merge pull request #61 from selimnahimi/slope-fix
Browse files Browse the repository at this point in the history
Slope fix
  • Loading branch information
selimnahimi authored Sep 3, 2023
2 parents b675a5d + e8071a6 commit c2e78b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion code/pawn/PawnController.Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ void InitiateLandingOnFloor()
Sound.FromWorld( "concretefootstepland", Entity.Position + Vector3.Down * 10f );
AddEvent( "grounded" );

Entity.Velocity = Entity.Velocity.WithZ( 0 );
Wallrunning = 0;
previousWallrunSide = 0;

Expand Down
16 changes: 8 additions & 8 deletions code/pawn/PawnController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public partial class PawnController : EntityComponent<Pawn>
public bool Noclipping { get; set; }

public int StepSize => 26;
public int GroundAngle => 200;
public int GroundAngle => 50;
public int JumpSpeed => 300;
public float Gravity => 800f;
public float StartingSpeed => 1000f;
Expand Down Expand Up @@ -61,12 +61,13 @@ public void Simulate( IClient cl )
{
ControllerEvents.Clear();

DebugOverlay.ScreenText( "Climbing: " + IsClimbing().ToString(), line: 0 );
DebugOverlay.ScreenText( "Wallrunning: " + Wallrunning.ToString(), line: 1 );
DebugOverlay.ScreenText( "Vaulting: " + Vaulting.ToString(), line: 2 );
DebugOverlay.ScreenText( "Current Speed: " + ((int)Entity.Velocity.Length).ToString(), line: 3 );
DebugOverlay.ScreenText( "Current Accel: " + CurrentMaxSpeed.ToString(), line: 4 );
DebugOverlay.ScreenText( "Max Accel: " + MaxSpeed.ToString(), line: 5 );
DebugOverlay.ScreenText( "Climbing: " + IsClimbing().ToString(), line: 5 );
DebugOverlay.ScreenText( "Wallrunning: " + Wallrunning.ToString(), line: 6 );
DebugOverlay.ScreenText( "Vaulting: " + Vaulting.ToString(), line: 7 );
DebugOverlay.ScreenText( "Grounded: " + Grounded.ToString(), line: 8 );
DebugOverlay.ScreenText( "Current Speed: " + ((int)Entity.Velocity.Length).ToString(), line: 9 );
DebugOverlay.ScreenText( "Current Accel: " + CurrentMaxSpeed.ToString(), line: 10 );
DebugOverlay.ScreenText( "Max Accel: " + MaxSpeed.ToString(), line: 11 );

if ( Noclipping )
{
Expand Down Expand Up @@ -96,7 +97,6 @@ public void Simulate( IClient cl )
{
InitiateLandingOnFloor();
}

}

UpdateMoveHelper( groundEntity );
Expand Down

0 comments on commit c2e78b8

Please sign in to comment.