View Single Post
Old 02-17-2009, 03:40 AM   #3
XycaleTh's Avatar
Join Date: Apr 2006
Location: UK
Posts: 67
Well I've gone through with my idea and it seems to work fine! Here's how to do it:

In q_shared.h, change
int ammo[MAX_WEAPONS];
short ammo[38];
38 is MAX_WEAPONS * 2. Using a short means that only 16 bits are used per ammo slot, rather than 32, allowing for double the number of weapons.

You must also remember that ps.stats[STAT_WEAPONS] holds a bit field of the weapons a player carries. However, this is sent as a 19-bit field (contrary to what the declaration in the header says of 16 bits). I've simply replaced all instances of ps.stats[STAT_WEAPONS] with ps.userInt1, and resized this field to 32 bits in the ext_data/MP/psf_overrides.txt file.

And then now you're increase the maximum weapon limit up to 32!

Last edited by XycaleTh; 02-20-2009 at 05:30 AM. Reason: Corrected the psf_overrides.txt file name
XycaleTh is offline   you may: quote & reply,