Fixed a stupid assumption about footsteps

Got rid of an unused serverinfo key
Some prediction improvements
This commit is contained in:
Marco Cawthorne 2017-11-17 15:20:51 -06:00
parent e18f0dae6d
commit 251d8908b2
8 changed files with 25 additions and 11 deletions

View file

@ -144,10 +144,16 @@ void Player_Predict(void) {
self.movetype = MOVETYPE_NOCLIP;
}
for ( int i = self.pmove_frame + 1; i <= clientcommandframe; i++ ) {
if (self.pmove_flags & 0x80000)
self.flags |= FL_ONGROUND;
else
self.flags &~= FL_ONGROUND;
for ( int i = self.pmove_frame; i <= clientcommandframe; i++ ) {
getinputstate( i );
runplayerphysics();
}
if (self.flags & FL_ONGROUND)
self.pmove_flags |= 0x80000;
}
pSeat->vPlayerOriginOld = pSeat->vPlayerOrigin;
@ -200,10 +206,20 @@ void Player_PreUpdate(void) {
self.movetype = MOVETYPE_NOCLIP;
}
for ( ; self.pmove_frame < servercommandframe; ) {
if ( getinputstate( ++self.pmove_frame ))
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;
}
@ -212,5 +228,5 @@ void Player_PostUpdate(void) {
self.netangles = self.angles;
self.netvelocity = self.velocity;
self.netpmove_flags = self.pmove_flags;
self.pmove_frame = servercommandframe;
self.pmove_frame = servercommandframe+1;
};

View file

@ -68,12 +68,11 @@ float Math_CRandom( void ) {
#ifdef SSQC
void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos, int iSkipArmor );
#endif
.float health;
void runplayerphysics(void)
{ //operates on self
float fallvel = ( self.flags & FL_ONGROUND )?0:-self.velocity_z;
runstandardplayerphysics(self);
if ( ( self.flags & FL_ONGROUND ) && ( self.health > 0 ) && ( fallvel > 100 )) {
if ( ( self.flags & FL_ONGROUND ) && self.movetype == MOVETYPE_WALK && ( fallvel > 100 )) {
#ifdef SSQC
if ( fallvel > 580 ) {
float fFallDamage = (fallvel-580) * ( 200 / ( 1024 - 580 ) );

View file

@ -36,7 +36,7 @@ void Footsteps_Update( void ) {
return;
}
if ( vlen( self.movement ) < 150 || self.flags & FL_CROUCHING ) {
if ( vlen( self.velocity ) < 150 ) {
return;
}

View file

@ -216,9 +216,6 @@ void worldspawn( void ) {
// Let's make our version information clear
localcmd( sprintf( "serverinfo fcs_ver %s\n", __DATE__ ) );
// Tell em the next map in the list we should load.
localcmd( sprintf( "serverinfo maplist %s\n", iMapCycleCount ) );
// All the important precaches
for ( int i = 1; i < CS_WEAPON_COUNT; i++ ) {
precache_model( sWeaponModels[ i ] );

Binary file not shown.

View file

@ -22,4 +22,6 @@ seta com_nogamedirnativecode "0"
// for now, because people don't seem to be able to install things properly
seta allow_download_maps "0"
seta allow_download_models "0"
seta allow_download_sounds "0"
seta allow_download_sounds "0"
alias startmap_dm "map cs_assault"

Binary file not shown.

Binary file not shown.