float i, f, swing, swing_factor, swing_damage, meleetime, is_player;
vector targpos;
- if(!self.cnt) { self.cnt = time; } // set start time of melee
+ if(!self.cnt) // set start time of melee
+ {
+ self.cnt = time;
+ W_PlayStrengthSound(self.realowner);
+ }
makevectors(self.realowner.v_angle); // update values for v_* vectors
WarpZone_traceline_antilag(self.realowner, self.realowner.origin + self.realowner.view_ofs, targpos, FALSE, self.realowner, ANTILAG_LATENCY(self.realowner));
// draw lightning beams for debugging
- te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5);
- te_customflash(targpos, 40, 2, '1 1 1');
+ //te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5);
+ //te_customflash(targpos, 40, 2, '1 1 1');
is_player = (trace_ent.classname == "player" || trace_ent.classname == "body");
accuracy_add(self.realowner, WEP_SHOTGUN, 0, swing_damage);
// draw large red flash for debugging
- te_customflash(targpos, 200, 2, '15 0 0');
+ //te_customflash(targpos, 200, 2, '15 0 0');
if(autocvar_g_balance_shotgun_secondary_melee_multihit) // allow multiple hits with one swing, but not against the same player twice.
{
}
}
if (self.clip_load >= 0) // we are not currently reloading
+ if (!self.crouch) // we are not currently crouching; this fixes an exploit where your melee anim is not visible, and besides wouldn't make much sense
if (self.BUTTON_ATCK2 && autocvar_g_balance_shotgun_secondary)
if (weapon_prepareattack(1, autocvar_g_balance_shotgun_secondary_refire))
{
else if (req == WR_CHECKAMMO1)
{
ammo_amount = self.ammo_shells >= autocvar_g_balance_shotgun_primary_ammo;
- ammo_amount += self.weapon_load[WEP_SHOTGUN] >= autocvar_g_balance_shotgun_primary_ammo;
+ ammo_amount += self.(weapon_load[WEP_SHOTGUN]) >= autocvar_g_balance_shotgun_primary_ammo;
return ammo_amount;
}
else if (req == WR_CHECKAMMO2)