Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state PlayerWalking
- {
- function ProcessMove(float DeltaTime, vector NewAccel, eDoubleClickDir DoubleClickMove, rotator DeltaRot)
- {
- local Vector Result;
- Result = Normal(Pawn.Floor Cross NewAccel);
- if ( Result.Z * Result.Y * Result.X < 0)
- {
- `log("Uphill");
- Pawn.MovementSpeedModifier = 0.325;
- }
- else if (Result.Z * Result.Y * Result.X > 0)
- {
- `log("Downhill");
- Pawn.MovementSpeedModifier = 2.5;
- }
- else
- {
- Pawn.MovementSpeedModifier = 1.0;
- }
- Super.ProcessMove(DeltaTime, NewAccel, DoubleClickMove, DeltaRot);
- }
- function PlayerMove( float DeltaTime )
- {
- Super.PlayerMove(DeltaTime);
- }
- }
Add Comment
Please, Sign In to add comment