diff --git a/src/client/defs.h b/src/client/defs.h index f98441c..a96abe7 100644 --- a/src/client/defs.h +++ b/src/client/defs.h @@ -42,6 +42,7 @@ struct void(void) m_pEventCall; float m_flEventTime; + float m_flEventFrame; int m_iLastWeapon; int m_iOldWeapon; diff --git a/src/shared/w_glock.qc b/src/shared/w_glock.qc index 8696912..07e05e3 100644 --- a/src/shared/w_glock.qc +++ b/src/shared/w_glock.qc @@ -179,6 +179,7 @@ w_glock_primary(void) } else { Weapons_ViewAnimation(GLOCK_SHOOT_EMPTY); } + View_AddEvent(w_glock_ejectshell, 0.0f); #else TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet", 8), [0.01,0.01], WEAPON_GLOCK); diff --git a/src/shared/w_mp5.qc b/src/shared/w_mp5.qc index 037d13f..eb11b37 100644 --- a/src/shared/w_mp5.qc +++ b/src/shared/w_mp5.qc @@ -136,19 +136,6 @@ w_mp5_primary(void) return; } -#ifdef CLIENT - View_SetMuzzleflash(MUZZLE_RIFLE); -#else - /* singleplayer is more accurate */ - if (cvar("sv_playerslots") == 1) { - TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.025,0.025], WEAPON_MP5); - } else { - TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.05,0.05], WEAPON_MP5); - } - - Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.shoot"); -#endif - pl.mp5_mag--; /* Actual firing */ @@ -162,7 +149,17 @@ w_mp5_primary(void) Weapons_ViewPunchAngle([-2,0,0]); #ifdef CLIENT + View_SetMuzzleflash(MUZZLE_RIFLE); View_AddEvent(w_glock_ejectshell, 0.0f); +#else + /* singleplayer is more accurate */ + if (cvar("sv_playerslots") == 1) { + TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.025,0.025], WEAPON_MP5); + } else { + TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.05,0.05], WEAPON_MP5); + } + + Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.shoot"); #endif pl.w_attack_next = 0.1f; diff --git a/src/shared/w_shotgun.qc b/src/shared/w_shotgun.qc index da5750a..d12f902 100644 --- a/src/shared/w_shotgun.qc +++ b/src/shared/w_shotgun.qc @@ -225,8 +225,8 @@ w_shotgun_secondary(void) TraceAttack_FireBullets(8, pl.origin + pl.view_ofs, 5, [0.17365,0.04362], WEAPON_SHOTGUN); } Sound_Play(pl, CHAN_WEAPON, "weapon_shotgun.double"); - Weapons_UpdateAmmo(pl, pl.shotgun_mag, pl.ammo_buckshot, __NULL__); #else + View_SetMuzzleflash(MUZZLE_WEIRD); Weapons_ViewAnimation(SHOTGUN_FIRE2); Weapons_ViewPunchAngle([-10,0,0]); View_AddEvent(w_shotgun_ejectshell, 1.0f);