Animating the Weapons

An item does have a weaponthink function for animating the weapon when being carried by a client. To find out where the thinkweapon function pointer is pointing you will have to look in g_items.c, and browse the global itemlist, which is declared in there. All weapon think functions reside in p_weapon.c since it is only the client that uses weapon think functions. Monsters don't have to animate their guns.

In most cases, the function WeaponGeneric is called in weaponthink. The frame sequence used for animating the gun is created just before calling WeaponGeneric, and the sequence depends on what type of weapon the client is carrying. What these frame numbers mean and where the actual frames are defined is a mystery at present time.