Quake3World.com Forums
     Programming Discussion
        Problem when using more than 16 weapons


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Problem when using more than 16 weapons

Grunt
Grunt
Joined: 28 Mar 2014
Posts: 59
PostPosted: 03-28-2014 04:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


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+?




Top
                 

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 03-29-2014 11:02 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Grunt
Grunt
Joined: 28 Mar 2014
Posts: 59
PostPosted: 03-31-2014 07:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.