mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Make noclip and flying more consistent with each other.
This commit is contained in:
parent
cd4a0f5056
commit
a91dd49963
@ -112,12 +112,10 @@ namespace ClassicalSharp {
|
||||
void UpdateVelocityYState() {
|
||||
if( flying || noClip ) {
|
||||
Velocity.Y = 0; // eliminate the effect of gravity
|
||||
float vel = noClip ? 0.24f : 0.06f;
|
||||
float velSpeeding = noClip ? 0.48f : 0.08f;
|
||||
if( flyingUp || jumping ) {
|
||||
Velocity.Y = speeding ? velSpeeding : vel;
|
||||
Velocity.Y = speeding ? 0.24f : 0.12f;
|
||||
} else if( flyingDown ) {
|
||||
Velocity.Y = speeding ? -velSpeeding : -vel;
|
||||
Velocity.Y = speeding ? -0.24f : -0.12f;
|
||||
}
|
||||
} else if( jumping && TouchesAnyRope() && Velocity.Y > 0.02f ) {
|
||||
Velocity.Y = 0.02f;
|
||||
@ -153,7 +151,7 @@ namespace ClassicalSharp {
|
||||
const float liquidGrav = 0.02f, ropeGrav = 0.034f, normalGrav = 0.08f;
|
||||
|
||||
void PhysicsTick( float xMoving, float zMoving ) {
|
||||
float multiply = flying ?
|
||||
float multiply = (flying || noClip) ?
|
||||
(speeding ? SpeedMultiplier * 9 : SpeedMultiplier * 1.5f) :
|
||||
(speeding ? SpeedMultiplier : 1);
|
||||
float modifier = LowestSpeedModifier();
|
||||
|
Loading…
x
Reference in New Issue
Block a user