
When you change weapon in
quake2, you have to wait for the old weapon to deactivate, and then for the new
weapon to activate, before you can change again. This simple mod allows you to
change weapon many times, quickly and then when you've got the one you want,
you only have to wait for it to activate.
Open p_weapon.c and find the
following in the function Weapon_Generic:
if(ent->deadflag || ent->s.modelindex != 255) // VWep animations screw up corpses { return; }
Add the following
immediately below:
if (ent->client->newweapon) { ChangeWeapon(ent); return; }
That's all there is to it. Normally
you have to wait until a weapon is ready, before the system notices a
newweapon, and then it starts deactivating. It then calls ChangeWeapon, only
after the weapon has finished deactivating. By bypassing these, you can use
weapnext repeatedly until you get the weapon you want.
Try combining this with my first tutorial on Visual Weapon Switching
By:carbon14