Half-Life: Move animation/punchangle code for WEAPON_MP5 into the shared
code-path for better prediction.
This commit is contained in:
parent
6ceca5839c
commit
816f34ef23
1 changed files with 11 additions and 10 deletions
|
@ -144,18 +144,9 @@ w_mp5_primary(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Actual firing */
|
||||
#ifdef CLIENT
|
||||
if (random() < 0.5) {
|
||||
Weapons_ViewAnimation(MP5_FIRE1);
|
||||
} else {
|
||||
Weapons_ViewAnimation(MP5_FIRE2);
|
||||
}
|
||||
|
||||
pl.a_ammo1--;
|
||||
View_SetMuzzleflash(MUZZLE_RIFLE);
|
||||
int r = (float)input_sequence % 4;
|
||||
Weapons_ViewPunchAngle([r-2,0,0]);
|
||||
pl.a_ammo1--;
|
||||
#else
|
||||
/* singleplayer is more accurate */
|
||||
if (cvar("sv_playerslots") == 1) {
|
||||
|
@ -169,6 +160,16 @@ w_mp5_primary(void)
|
|||
pl.mp5_mag--;
|
||||
#endif
|
||||
|
||||
/* Actual firing */
|
||||
int r = (float)input_sequence % 2;
|
||||
if (r) {
|
||||
Weapons_ViewAnimation(MP5_FIRE1);
|
||||
} else {
|
||||
Weapons_ViewAnimation(MP5_FIRE2);
|
||||
}
|
||||
|
||||
Weapons_ViewPunchAngle([-2,0,0]);
|
||||
|
||||
pl.w_attack_next = 0.1f;
|
||||
pl.w_idle_next = 10.0f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue