Originally posted by Spike
View Post
Code:
else if (self.impulse == 2)
{
self.enemy = world;
self.currentammo = 6;
if (self.currentammo > self.ammo_shells)
self.currentammo = self.ammo_shells;
fl = IT_SHOTGUN;
if (self.ammo_shells < 1)
am = 1;
}
[COLOR="Red"] else if (self.impulse == 3)
{
if(self.weapon == IT_SUPER_SHOTGUN)
{
fl = IT_RSHOT;
}
else
{
fl = IT_SUPER_SHOTGUN;
}
if (self.ammo_shells < 2)
am = 1;
} [/COLOR]
else if (self.impulse == 4)
{
fl = IT_NAILGUN;
if (self.ammo_nails < 1)
am = 1;
}
Here is the fire code:
Code:
void() W_FireRC =
{
local vector dir, back;
if (self.ammo_shells < 2)
{
self.weapon = W_BestWeapon ();
W_SetCurrentAmmo ();
return;
}
if (self.weaponframe < 2)
sound (self ,CHAN_WEAPON, "weapons/rshotgn.wav", 1, ATTN_NORM);
self.punchangle_x = -4;
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
makevectors(self.v_angle);
dir = v_forward; //aim (self, 100000);
FireBullets (30, dir, '0.20 0.15 0');
back = dir * 35 * 5;
self.velocity = self.velocity - back;
self.avelocity = vectoangles (self.velocity);
};
Is there another area/function that can control the amount of ammo used that I'm not aware of or may have accidentally tweaked?

Leave a comment: