.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
Maximum_weapons
Old
  (#1)
Ghoul [BB]
Guest
 
Status:
Posts: n/a
Default Maximum_weapons - 21-06-2004

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!!!
  
Reply With Quote
Re: Maximum_weapons
Old
  (#2)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Maximum_weapons - 21-06-2004

It might be in the client DLL. Please describe these bugs.
  
Reply With Quote
Re: Maximum_weapons
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Maximum_weapons - 21-06-2004

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Maximum_weapons
Old
  (#4)
Ghoul [BB]
Guest
 
Status:
Posts: n/a
Default Re: Maximum_weapons - 25-06-2004

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?
  
Reply With Quote
Re: Maximum_weapons
Old
  (#5)
dstruct2k
 
dstruct2k's Avatar
 
Status: Offline
Posts: 225
Join Date: Feb 2004
Default Re: Maximum_weapons - 20-08-2004

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)
  
Reply With Quote
Re: Maximum_weapons
Old
  (#6)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: Maximum_weapons - 20-08-2004

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.
  
Reply With Quote
Re: Maximum_weapons
Old
  (#7)
dstruct2k
 
dstruct2k's Avatar
 
Status: Offline
Posts: 225
Join Date: Feb 2004
Default Re: Maximum_weapons - 20-08-2004

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.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com