void W_Rifle_Attack(void)
{
- W_Rifle_FireBullet(WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), WEP_RIFLE.m_id, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), W_Sound("campingrifle_fire"));
+ W_Rifle_FireBullet(WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), WEP_RIFLE.m_id, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), SND(CAMPINGRIFLE_FIRE));
}
void W_Rifle_Attack2(void)
{
- W_Rifle_FireBullet(WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), WEP_RIFLE.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), W_Sound("campingrifle_fire2"));
+ W_Rifle_FireBullet(WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), WEP_RIFLE.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), SND(CAMPINGRIFLE_FIRE2));
}
.void(void) rifle_bullethail_attackfunc;
}
.float bot_secondary_riflemooth;
-bool W_Rifle(int req)
+bool W_Rifle(entity thiswep, int req)
{SELFPARAM();
float ammo_amount;
case WR_THINK:
{
if(autocvar_g_balance_rifle_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo))) // forced reload
- WEP_ACTION(self.weapon, WR_RELOAD);
+ _WEP_ACTION(self.weapon, WR_RELOAD);
else
{
self.rifle_accumulator = bound(time - WEP_CVAR(rifle, bursttime), self.rifle_accumulator, time);
if(WEP_CVAR(rifle, secondary))
{
if(WEP_CVAR_SEC(rifle, reload))
- WEP_ACTION(self.weapon, WR_RELOAD);
+ _WEP_ACTION(self.weapon, WR_RELOAD);
else
{
if(weapon_prepareattack_check(1, WEP_CVAR_SEC(rifle, refire)))
}
case WR_INIT:
{
- precache_sound(W_Sound("campingrifle_fire"));
- precache_sound(W_Sound("campingrifle_fire2"));
RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
}
case WR_RELOAD:
{
- W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), W_Sound("reload"));
+ W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), SND(RELOAD));
return true;
}
case WR_SUICIDEMESSAGE:
}
#endif
#ifdef CSQC
-bool W_Rifle(int req)
+bool W_Rifle(entity thiswep, int req)
{SELFPARAM();
switch(req)
{
if(!w_issilent)
{
if(w_random < 0.2)
- sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTN_NORM);
else if(w_random < 0.4)
- sound(self, CH_SHOTS, W_Sound("ric2"), VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTN_NORM);
else if(w_random < 0.5)
- sound(self, CH_SHOTS, W_Sound("ric3"), VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTN_NORM);
}
return true;
}
case WR_INIT:
{
- precache_sound(W_Sound("ric1"));
- precache_sound(W_Sound("ric2"));
- precache_sound(W_Sound("ric3"));
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
precache_pic("gfx/reticle_nex");