Problem when using more than 16 weapons

Locked
Captaintoottoot
Posts: 59
Joined: Fri Mar 28, 2014 11:50 pm

Problem when using more than 16 weapons

Post by Captaintoottoot »

I altered the MAX_WEAPONS value in the Q3 exe to exceed 16. I edited the parts in the cg_weapons to allow the weapons over 16+ to be cycled. I checked/altered the give and give all command to set the ammo. The problem is that weapon 16+ won't take any ammo and I don't know why. If I switch weapon 15 with 16 then the old 15 has the problems instead. I think it's an ammo problem because weapon 16 wasn't showing in the cycle until I disabled the ammo check part of cg_weaponselectable and then the weapon appeared in the weapon list but without any ammo. Is there something I'm missing that I have to do to change the ammo for weapons 16+?
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Problem when using more than 16 weapons

Post by UglyFoot »

It's hard to tell, did you add a new WP_ entry for the weapon 16? It's needed to raise the number of weapons. Also check if the ammo array at playerState has the right size.
Captaintoottoot
Posts: 59
Joined: Fri Mar 28, 2014 11:50 pm

Re: Problem when using more than 16 weapons

Post by Captaintoottoot »

I found this thread:
http://www.lucasforums.com/showthread.php?t=195791

It sounded like the same problem. Unfortunately his solution didn't work, and the last poster in his thread seems to be correct. Simply changing the max_weapons value does nothing unless you edit msg.c correctly to transmit more than 16 bits for weapons/ammo. I tried just a quick change of the values there and of course it didn't work. It gave me quad damage or something instead of weapon 16 as somewhat expected.

I've gotten around the ammo problem by just using stat_ammo everywhere. But there is still the problem of the weapon limit hitting 16. I see the weapon in the player's list of weapons when I use give all, but whenever the player spawns with it he can use it but if he ever switches away from it he can't see it in the list and switch back to it. If I use the give command to give just weapon 16, same as the spawn problem, he can't see it in his list, only when give all is used can he see/select it. Another clue is when the player spawns with weapon 15, he gets 15,16, and 17(grapple), and I have no idea why that happens, but it's got to be related.

If anyone's come across this problem and found a solution help would be appreciated because this is becoming agony.
Locked