void spawnfunc_weapon_sniperrifle(void) { spawnfunc_weapon_rifle(); }
void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, string pSound)
-{
+{SELFPARAM();
float i;
W_DecreaseAmmo(pAmmo);
.float rifle_bullethail_animtime;
.float rifle_bullethail_refire;
void W_Rifle_BulletHail_Continue(void)
-{
+{SELFPARAM();
float r, sw, af;
sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing
}
void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire)
-{
+{SELFPARAM();
// if we get here, we have at least one bullet to fire
AttackFunc();
if(mode)
}
.float bot_secondary_riflemooth;
-bool W_Rifle(int req)
-{
+bool W_Rifle(entity thiswep, int req)
+{SELFPARAM();
float ammo_amount;
switch(req)
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_model(W_Model("g_sniperrifle.md3"));
- precache_model(W_Model("v_sniperrifle.md3"));
- precache_model(W_Model("h_sniperrifle.iqm"));
precache_sound(W_Sound("campingrifle_fire"));
precache_sound(W_Sound("campingrifle_fire2"));
RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
}
#endif
#ifdef CSQC
-bool W_Rifle(int req)
-{
+bool W_Rifle(entity thiswep, int req)
+{SELFPARAM();
switch(req)
{
case WR_IMPACTEFFECT: