.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   Maximum_weapons (http://forums.bots-united.com/showthread.php?t=2026)

Ghoul [BB] 21-06-2004 01:15

Maximum_weapons
 
I'am a coder, and I working on my mod, where I want to put a lot of different weapons. But I have a promblem with 32 weapon limit. Do anybody know how to increace it?

(now I have about 52 weapons, and there are some bugs in game, because I can't fix MAX_WEAPONS limit!)
HELPME, plz!!!

sfx1999 21-06-2004 02:51

Re: Maximum_weapons
 
It might be in the client DLL. Please describe these bugs.

Pierre-Marie Baty 21-06-2004 03:03

Re: Maximum_weapons
 
There will be a problem, though... player weapons are stored in a bitmask. Each bit corresponds to a weapon. The reason why it is 32 and not more is that long integers are only 32-bit wide. And when you send these weapons over the network, the engine uses WRITE_LONG() which sends a long (doh!) - which is only 32 bytes.

You would have to change this value BOTH in the game DLL and in the client DLL, but ALSO change the way the weapons are stored (i.e, never use pev->weapons anymore) AND the way the weapons data is sent over the network.

It'll be quite a hack IMO 9_9

Ghoul [BB] 25-06-2004 11:48

Re: Maximum_weapons
 
2 sfx1999:

The general bugs are:

1. The game crushes, when I try to add client-side weapons with number more,
than 32.
2. Weapons with number above, than 32, when change map (in single-player) doesnt work on new map.
3. Problems with HUD. When I pick up a weapon, in HUD appears two pictures - of picked up weapon and of the
another one, which I don't have. So, there is a picture, which I can select, but cant use that weapon,
untill I pick up it. (something like *just picture* in HUD)

2 Pierre-Marie Baty:

Do you know, what and where I should to make changes to fix this problem?

dstruct2k 20-08-2004 08:38

Re: Maximum_weapons
 
Create a second bitmask for another set of 32 weapons. From this mask, just have the program interpret it as weapons # 31-63. (The first one will be # 0-31)

Cpl. Shrike 20-08-2004 09:37

Re: Maximum_weapons
 
Or do it like they do it in DOD.
In dod they have more as 32 different guns.

They have put 2 or more models on one gun.

dstruct2k 20-08-2004 17:17

Re: Maximum_weapons
 
DOD probably uses a second, binary bitmask to say whether it's the first or second gun. This multiplies 32 by 2, giving you 64 weapons, and it's more efficient than my method of an entire seperate bitmask.


All times are GMT +2. The time now is 14:56.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.