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/equipment.c
|
||||||
../shared/cstrike/animations.c
|
../shared/cstrike/animations.c
|
||||||
|
|
||||||
|
../shared/valve/player.cpp
|
||||||
../shared/pmove.c
|
../shared/pmove.c
|
||||||
../gs-entbase/client.src
|
../gs-entbase/client.src
|
||||||
../shared/decals.c
|
../shared/decals.c
|
||||||
|
@ -61,7 +62,6 @@ text.c
|
||||||
../shared/spraylogo.cpp
|
../shared/spraylogo.cpp
|
||||||
|
|
||||||
cstrike/overview.c
|
cstrike/overview.c
|
||||||
../shared/valve/player.cpp
|
|
||||||
player.c
|
player.c
|
||||||
predict.c
|
predict.c
|
||||||
events.c
|
events.c
|
||||||
|
|
|
@ -26,8 +26,19 @@ void Player_ReadEntity(float flIsNew)
|
||||||
pl.drawmask = MASK_ENGINE;
|
pl.drawmask = MASK_ENGINE;
|
||||||
pl.customphysics = Empty;
|
pl.customphysics = Empty;
|
||||||
setsize( pl, VEC_HULL_MIN, VEC_HULL_MAX );
|
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.modelindex = readshort();
|
||||||
pl.origin[0] = readcoord();
|
pl.origin[0] = readcoord();
|
||||||
pl.origin[1] = readcoord();
|
pl.origin[1] = readcoord();
|
||||||
|
|
|
@ -29,8 +29,8 @@ void Predict_PreFrame(player pl)
|
||||||
pl.net_ammo1 = pl.a_ammo1;
|
pl.net_ammo1 = pl.a_ammo1;
|
||||||
pl.net_ammo2 = pl.a_ammo2;
|
pl.net_ammo2 = pl.a_ammo2;
|
||||||
pl.net_ammo3 = pl.a_ammo3;
|
pl.net_ammo3 = pl.a_ammo3;
|
||||||
pl.net_weapontime = pl.weapontime;
|
|
||||||
#endif
|
#endif
|
||||||
|
pl.net_weapontime = pl.weapontime;
|
||||||
|
|
||||||
//self.netpmove_flags = self.pmove_flags;
|
//self.netpmove_flags = self.pmove_flags;
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ void Predict_PostFrame(player pl)
|
||||||
pl.a_ammo1 = pl.net_ammo1;
|
pl.a_ammo1 = pl.net_ammo1;
|
||||||
pl.a_ammo2 = pl.net_ammo2;
|
pl.a_ammo2 = pl.net_ammo2;
|
||||||
pl.a_ammo3 = pl.net_ammo3;
|
pl.a_ammo3 = pl.net_ammo3;
|
||||||
pl.weapontime = pl.net_weapontime;
|
|
||||||
#endif
|
#endif
|
||||||
|
pl.weapontime = pl.net_weapontime;
|
||||||
|
|
||||||
//self.pmove_flags = self.netpmove_flags;
|
//self.pmove_flags = self.netpmove_flags;
|
||||||
setorigin(pl, pl.origin);
|
setorigin(pl, pl.origin);
|
||||||
|
|
|
@ -284,7 +284,8 @@ onto the view model
|
||||||
void View_PlayAnimation(int iSequence)
|
void View_PlayAnimation(int iSequence)
|
||||||
{
|
{
|
||||||
pSeat->eViewModel.frame = (float)iSequence;
|
pSeat->eViewModel.frame = (float)iSequence;
|
||||||
//pSeat->eViewModel.frame1time = 0.0f;
|
player pl = (player)pSeat->ePlayer;
|
||||||
|
pl.weapontime = 0.0f;
|
||||||
}
|
}
|
||||||
int View_GetAnimation(void)
|
int View_GetAnimation(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,6 +57,7 @@ cstrike/money.c
|
||||||
../shared/decals.c
|
../shared/decals.c
|
||||||
../shared/effects.c
|
../shared/effects.c
|
||||||
../shared/spraylogo.cpp
|
../shared/spraylogo.cpp
|
||||||
|
../shared/valve/player.cpp
|
||||||
../shared/pmove.c
|
../shared/pmove.c
|
||||||
|
|
||||||
cstrike/armoury_entity.cpp
|
cstrike/armoury_entity.cpp
|
||||||
|
|
|
@ -19,6 +19,7 @@ class player
|
||||||
float armor;
|
float armor;
|
||||||
float pitch;
|
float pitch;
|
||||||
float viewzoom;
|
float viewzoom;
|
||||||
|
float weapontime;
|
||||||
|
|
||||||
vector view_ofs;
|
vector view_ofs;
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ void Weapon_Draw( float fWeapon ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wpnFuncTable[ fWeapon ].vDraw();
|
wpnFuncTable[ fWeapon ].vDraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -718,13 +718,11 @@ void PMove_Run(void)
|
||||||
|
|
||||||
touchtriggers();
|
touchtriggers();
|
||||||
|
|
||||||
#ifdef VALVE
|
|
||||||
player pl = (player)self;
|
player pl = (player)self;
|
||||||
|
#ifdef VALVE
|
||||||
pl.w_attack_next = max(0, pl.w_attack_next-input_timelength);
|
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.w_idle_next = max(0, pl.w_idle_next-input_timelength);
|
||||||
pl.weapontime += input_timelength;
|
|
||||||
#endif
|
#endif
|
||||||
|
pl.weapontime += input_timelength;
|
||||||
Game_Input();
|
Game_Input();
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,8 +176,6 @@ void Weapons_ViewAnimation(int i)
|
||||||
msg_entity = self;
|
msg_entity = self;
|
||||||
multicast( [0,0,0], MULTICAST_ONE );*/
|
multicast( [0,0,0], MULTICAST_ONE );*/
|
||||||
#endif
|
#endif
|
||||||
player pl = (player)self;
|
|
||||||
pl.weapontime = 0.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CSQC
|
#ifdef CSQC
|
||||||
|
|
Loading…
Reference in a new issue