Some prediction fixes?
This commit is contained in:
parent
4d32bf91a8
commit
2e1b2846da
3 changed files with 6 additions and 21 deletions
|
@ -45,20 +45,10 @@ void Predict_PreFrame(player pl)
|
|||
/*for (; self.pmove_frame <= servercommandframe; self.pmove_frame++) {
|
||||
float flSuccess = getinputstate(self.pmove_frame);*/
|
||||
for ( int i = pl.sequence + 1; i <= clientcommandframe; i++ ) {
|
||||
float flSuccess = getinputstate( i );
|
||||
if (!getinputstate(i)) {
|
||||
break; //erk?... too old?
|
||||
}
|
||||
input_sequence = i;
|
||||
if (flSuccess == FALSE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i==clientcommandframe){
|
||||
CSQC_Input_Frame();
|
||||
}
|
||||
|
||||
// Partial frames are the worst
|
||||
if (input_timelength == 0) {
|
||||
break;
|
||||
}
|
||||
QPhysics_Run(pl);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -793,6 +793,9 @@ PMove_Run(void)
|
|||
self.basevelocity = [0,0,0];
|
||||
self.groundentity = __NULL__;
|
||||
|
||||
/* activate any SOLID_TRIGGER entities */
|
||||
touchtriggers();
|
||||
|
||||
/* timers, these are predicted and shared across client and server */
|
||||
pl.w_attack_next = max(0, pl.w_attack_next - input_timelength);
|
||||
pl.w_idle_next = max(0, pl.w_idle_next - input_timelength);
|
||||
|
@ -804,7 +807,4 @@ PMove_Run(void)
|
|||
|
||||
/* weapon/item logic of what the player controls */
|
||||
Game_Input();
|
||||
|
||||
/* activate any SOLID_TRIGGER entities */
|
||||
touchtriggers();
|
||||
}
|
||||
|
|
|
@ -155,10 +155,6 @@ void w_snark_draw(void)
|
|||
{
|
||||
Weapons_SetModel("models/v_squeak.mdl");
|
||||
Weapons_ViewAnimation(SNARK_DRAW);
|
||||
#ifdef SSQC
|
||||
player pl = (player)self;
|
||||
Weapons_UpdateAmmo(pl, __NULL__, pl.ammo_snark, __NULL__);
|
||||
#endif
|
||||
}
|
||||
|
||||
void w_snark_holster(void)
|
||||
|
@ -201,7 +197,6 @@ void w_snark_primary(void)
|
|||
#else
|
||||
w_snark_deploy();
|
||||
pl.ammo_snark--;
|
||||
Weapons_UpdateAmmo(pl, __NULL__, pl.ammo_snark, __NULL__);
|
||||
|
||||
if (pl.a_ammo2 <= 0) {
|
||||
Weapons_RemoveItem(pl, WEAPON_SNARK);
|
||||
|
|
Loading…
Reference in a new issue