Hoo man that thing is old, moldy and had a flaw in that it didn't update the selected weapon icon on the sbar. (fairly minor, and if it had been done properly, it would have partially resembled Half-Life's in that each icon would have represented a weapon category instead. )ooppee wrote:Partially on the same topic I did this tutorial.
http://qexpo2005.quakedev.com/booths/dr ... g/126.html
All appears to be fine with the weapon adding. I pick it up, it ONLY gives me that weapon. I have it selectable and all too.
The proper way of doing this now would be to simply use the original self.weapon = IT_* with self.weapon2 being simply a secondary check to see if the player is using the new weapon instead.
That said, to (hopefully) fix what you want with it as it is now:
Code: Select all
else if (self.weapon == IT_MULTI_ROCKET)
{
self.weapon = IT_LIGHTNING;
if (self.ammo_cells1 < 1)
am = 1;
}
else if (self.weapon == IT_LIGHTNING)
{
self.weapon = 0;
self.weapon2 = IT3_CLIGHTNING; //ooppee chainlightning, make Lightning Gun go to Chainlighting and after this chain -> Plasma
if (self.ammo_cells1 < 1)
am = 1;
}
else if (self.weapon2 == IT3_CLIGHTNING) //ooppee chainlightning make it go to Plasma gun after
{
self.weapon2 = 0;
self.weapon = IT_PLASMA_GUN;
if (self.ammo_plasma < 1)
am = 1;
}
if ( (it & self.weapon | self.weapon2) && am == 0) //added weapon2
{
W_SetCurrentAmmo ();
return;
}
}
};