updated non debug files

This commit is contained in:
Melbyj1125
2022-02-02 08:56:29 -06:00
parent df1b7f5448
commit dd27705eee
2 changed files with 11 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ public class WallRun : NetworkBehaviour
RaycastHit[] hits;
bool isWallRunning = false;
public bool firstAttach = false;
Vector3 lastWallPosition;
Vector3 lastWallNormal;
float elapsedTimeSinceJump = 0;
@@ -66,7 +67,7 @@ public class WallRun : NetworkBehaviour
public void WallRunRoutine()
{
if (!IsLocalPlayer) { return; }
//if (!IsLocalPlayer) { return; }
isWallRunning = false;
@@ -173,7 +174,11 @@ public class WallRun : NetworkBehaviour
//
playerMovementController.SetPlayerVelocity(moveToSet);
isWallRunning = true;
if(!isWallRunning){
firstAttach = true;
isWallRunning = true;
}
if(playerMovementController.curJumpNum == playerMovementController.pStats.JumpNum){
playerMovementController.curJumpNum = 0;
}

View File

@@ -445,6 +445,10 @@ public class PlayerMovement : NetworkBehaviour
//if wallrunning apply different gravity
if(wallRun.IsWallRunning()){
if(wallRun.firstAttach){
g = 0;
wallRun.firstAttach = false;
}
GravityCalculation(2);
}