Fix Counter-Strike weapon animation conflicts
This commit is contained in:
parent
579fd6435b
commit
52149376a6
9 changed files with 23 additions and 13 deletions
|
@ -54,6 +54,7 @@ text.c
|
|||
../shared/cstrike/equipment.c
|
||||
../shared/cstrike/animations.c
|
||||
|
||||
../shared/valve/player.cpp
|
||||
../shared/pmove.c
|
||||
../gs-entbase/client.src
|
||||
../shared/decals.c
|
||||
|
@ -61,7 +62,6 @@ text.c
|
|||
../shared/spraylogo.cpp
|
||||
|
||||
cstrike/overview.c
|
||||
../shared/valve/player.cpp
|
||||
player.c
|
||||
predict.c
|
||||
events.c
|
||||
|
|
|
@ -26,8 +26,19 @@ void Player_ReadEntity(float flIsNew)
|
|||
pl.drawmask = MASK_ENGINE;
|
||||
pl.customphysics = Empty;
|
||||
setsize( pl, VEC_HULL_MIN, VEC_HULL_MAX );
|
||||
}
|
||||
|
||||
}else {
|
||||
if (pl.entnum == player_localentnum) // FIXME: Splitscreen
|
||||
{
|
||||
pSeat = &seats[0]; //FIXME: splitscreen
|
||||
for (int i = pl.sequence+1; i <= servercommandframe; i++) {
|
||||
if (!getinputstate(i))
|
||||
break; //erk?... too old?
|
||||
input_sequence = i;
|
||||
QPhysics_Run(pl);
|
||||
}
|
||||
}
|
||||
}
|
||||
pl.sequence = servercommandframe;
|
||||
pl.modelindex = readshort();
|
||||
pl.origin[0] = readcoord();
|
||||
pl.origin[1] = readcoord();
|
||||
|
|
|
@ -29,8 +29,8 @@ void Predict_PreFrame(player pl)
|
|||
pl.net_ammo1 = pl.a_ammo1;
|
||||
pl.net_ammo2 = pl.a_ammo2;
|
||||
pl.net_ammo3 = pl.a_ammo3;
|
||||
pl.net_weapontime = pl.weapontime;
|
||||
#endif
|
||||
pl.net_weapontime = pl.weapontime;
|
||||
|
||||
//self.netpmove_flags = self.pmove_flags;
|
||||
|
||||
|
@ -79,8 +79,8 @@ void Predict_PostFrame(player pl)
|
|||
pl.a_ammo1 = pl.net_ammo1;
|
||||
pl.a_ammo2 = pl.net_ammo2;
|
||||
pl.a_ammo3 = pl.net_ammo3;
|
||||
pl.weapontime = pl.net_weapontime;
|
||||
#endif
|
||||
pl.weapontime = pl.net_weapontime;
|
||||
|
||||
//self.pmove_flags = self.netpmove_flags;
|
||||
setorigin(pl, pl.origin);
|
||||
|
|
|
@ -284,7 +284,8 @@ onto the view model
|
|||
void View_PlayAnimation(int iSequence)
|
||||
{
|
||||
pSeat->eViewModel.frame = (float)iSequence;
|
||||
//pSeat->eViewModel.frame1time = 0.0f;
|
||||
player pl = (player)pSeat->ePlayer;
|
||||
pl.weapontime = 0.0f;
|
||||
}
|
||||
int View_GetAnimation(void)
|
||||
{
|
||||
|
|
|
@ -57,6 +57,7 @@ cstrike/money.c
|
|||
../shared/decals.c
|
||||
../shared/effects.c
|
||||
../shared/spraylogo.cpp
|
||||
../shared/valve/player.cpp
|
||||
../shared/pmove.c
|
||||
|
||||
cstrike/armoury_entity.cpp
|
||||
|
|
|
@ -19,6 +19,7 @@ class player
|
|||
float armor;
|
||||
float pitch;
|
||||
float viewzoom;
|
||||
float weapontime;
|
||||
|
||||
vector view_ofs;
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void Weapon_Draw( float fWeapon ) {
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
wpnFuncTable[ fWeapon ].vDraw();
|
||||
}
|
||||
|
||||
|
|
|
@ -718,13 +718,11 @@ void PMove_Run(void)
|
|||
|
||||
touchtriggers();
|
||||
|
||||
#ifdef VALVE
|
||||
player pl = (player)self;
|
||||
|
||||
#ifdef VALVE
|
||||
pl.w_attack_next = max(0, pl.w_attack_next-input_timelength);
|
||||
pl.w_idle_next = max(0, pl.w_idle_next-input_timelength);
|
||||
pl.weapontime += input_timelength;
|
||||
#endif
|
||||
|
||||
pl.weapontime += input_timelength;
|
||||
Game_Input();
|
||||
}
|
||||
|
|
|
@ -176,8 +176,6 @@ void Weapons_ViewAnimation(int i)
|
|||
msg_entity = self;
|
||||
multicast( [0,0,0], MULTICAST_ONE );*/
|
||||
#endif
|
||||
player pl = (player)self;
|
||||
pl.weapontime = 0.0f;
|
||||
}
|
||||
|
||||
#ifdef CSQC
|
||||
|
|
Loading…
Reference in a new issue