View Single Post
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 05-10-2012 , 22:43   Re: Module: Half-Life Weapon Mod (v0.5)
Reply With Quote #23

Because in Half-Life we can add new weapons by adding their info to ItemInfo array:
PHP Code:
#define MAX_WEAPONS            32

ItemInfo CBasePlayerItem::ItemInfoArray[MAX_WEAPONS]; 
HL have only 15 weapons and so we have 16 empty positions in array to store information about our new weapons. In my module i'm using small hack with hlsdk function
PHP Code:
// Precaches the weapon and queues the weapon info for sending to clients
void UTIL_PrecacheOtherWeapon( const char *szClassname 
to insert info about new weapons to infoarray.
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community

Last edited by KORD_12.7; 05-10-2012 at 22:46.
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7