diff --git a/Source/Client/Player.c b/Source/Client/Player.c index 75c577f2..219d1116 100755 --- a/Source/Client/Player.c +++ b/Source/Client/Player.c @@ -148,12 +148,6 @@ void Player_Predict(void) { self.movetype = MOVETYPE_NOCLIP; } - if (self.pmove_flags & 0x80000) { - self.flags |= FL_ONGROUND; - } else { - self.flags &~= FL_ONGROUND; - } - for ( int i = self.pmove_frame; i <= clientcommandframe; i++ ) { if ( input_timelength == 0 ) { break; @@ -161,10 +155,6 @@ void Player_Predict(void) { getinputstate( i ); runplayerphysics(); } - - if ( self.flags & FL_ONGROUND ) { - self.pmove_flags |= 0x80000; - } } if ( autocvar_cl_smoothstairs && self.flags & FL_ONGROUND ) { @@ -232,22 +222,12 @@ void Player_PreUpdate( void ) { self.movetype = MOVETYPE_NOCLIP; } - if ( self.pmove_flags & 0x80000 ) { - self.flags |= FL_ONGROUND; - } else { - self.flags &~= FL_ONGROUND; - } - //we want to predict an exact copy of the data in the new packet for ( ; self.pmove_frame <= servercommandframe; self.pmove_frame++ ) { if ( getinputstate( self.pmove_frame ) ) runplayerphysics(); } - if ( self.flags & FL_ONGROUND ) { - self.pmove_flags |= 0x80000; - } - //we now have self.pmove_flags set properly... self.movetype = MOVETYPE_NONE; diff --git a/Source/Math.h b/Source/Math.h index 3e93e61c..515c93f9 100755 --- a/Source/Math.h +++ b/Source/Math.h @@ -69,29 +69,7 @@ float Math_CRandom( void ) { void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos, int iSkipArmor ); #endif void runplayerphysics(void) -{ //operates on self - float fallvel = ( self.flags & FL_ONGROUND )?0:-self.velocity_z; +{ Physics_Run(); - if ( ( self.flags & FL_ONGROUND ) && self.movetype == MOVETYPE_WALK && ( fallvel > 100 )) { -#ifdef SSQC - if ( fallvel > 580 ) { - float fFallDamage = (fallvel-580) * ( 200 / ( 1024 - 580 ) ); - Damage_Apply( self, world, fFallDamage, self.origin, FALSE ); - } -#endif - -#ifdef SSQC - if ( cvar( "pm_bunnyspeedcap") == 0 ) { - return; - } -#else - if ( serverkey( "pm_bunnyspeedcap") == 0 ) { - return; - } -#endif - if ( fallvel > 245 ) { - self.velocity *= 0.25; - } - } } #endif diff --git a/Source/Shared/Physics.c b/Source/Shared/Physics.c index 49b9380b..5f0aec96 100755 --- a/Source/Shared/Physics.c +++ b/Source/Shared/Physics.c @@ -24,11 +24,11 @@ vector input_movevalues; float input_buttons; #define PHYSICS_STEPHEIGHT 18 -#define PHYSICS_AIRSTEPHEIGHT 18 +#define PHYSICS_AIRSTEPHEIGHT 18 #define PHYSICS_FRICTION 4 -#define PHYSICS_EDGEFRICTION 2 +#define PHYSICS_EDGEFRICTION 2 #define PHYSICS_GRAVITY 800 -#define PHYSICS_ACCELERATE 4 +#define PHYSICS_ACCELERATE 10 #define PHYSICS_STOPSPEED 100 #define PHYSICS_JUMP_CHAINWINDOW 0.5 @@ -314,12 +314,12 @@ void Physics_Run_Acceleration( float flMovetime, float flBefore ) { // acceleration f = flWishSpeed - ( self.velocity * vWishDirection ); if ( f > 0 ) { - self.velocity = self.velocity + vWishDirection * min( f, PHYSICS_ACCELERATE * flMovetime * flWishSpeed ); + self.velocity += vWishDirection * min( f, PHYSICS_ACCELERATE * flMovetime * flWishSpeed ); } } else { /*apply gravity*/ - self.velocity_z = self.velocity_z - ( PHYSICS_GRAVITY * flMovetime ); + self.velocity_z -= ( PHYSICS_GRAVITY * flMovetime ); if ( flWishSpeed < 30 ) { f = flWishSpeed - ( self.velocity * vWishDirection ); @@ -328,7 +328,7 @@ void Physics_Run_Acceleration( float flMovetime, float flBefore ) { } if ( f > 0 ) { - self.velocity = self.velocity + vWishDirection * ( min( f, PHYSICS_ACCELERATE ) * flWishSpeed * flMovetime ); + self.velocity += vWishDirection * ( min( f, PHYSICS_ACCELERATE ) * flWishSpeed * flMovetime ); } } } diff --git a/freecs/csprogs.dat b/freecs/csprogs.dat index 59eed663..1633762d 100644 Binary files a/freecs/csprogs.dat and b/freecs/csprogs.dat differ diff --git a/freecs/menu.dat b/freecs/menu.dat index 965ace94..d2b24b39 100755 Binary files a/freecs/menu.dat and b/freecs/menu.dat differ diff --git a/freecs/progs.dat b/freecs/progs.dat index 777e7529..2ae5c00c 100644 Binary files a/freecs/progs.dat and b/freecs/progs.dat differ