"hax" The Ammo Counter?
Align
Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
<div class="IPBDescription">Not stopping at 254 anymore.</div> For all I know, this might be fixed already in 1.1, but I haven't seen any info on it.
If you don't know what I mean at first sight of topic name, imagine this. You have a HMG. You load it up. At 3 loadings(1 and a half spare clip) you're at 225. Unless you have shot at something first and reloaded, but that doesn't count... now, if you keep on loading up, you won't see the ammo counter increase.
This is caused by some weird, unnecessary limit in HL, and Im positive it can be broken, since for example <a href='http://www.svencoop.com/' target='_blank'>the guys over at SvenCoop</a> have broken it.
Listed under General Changes in the changelist:
-Hud properly outputs health, armor, and ammo values. (No 250 limit)
There isn't any downside to this as far as I can see... care to correct me?
If you don't know what I mean at first sight of topic name, imagine this. You have a HMG. You load it up. At 3 loadings(1 and a half spare clip) you're at 225. Unless you have shot at something first and reloaded, but that doesn't count... now, if you keep on loading up, you won't see the ammo counter increase.
This is caused by some weird, unnecessary limit in HL, and Im positive it can be broken, since for example <a href='http://www.svencoop.com/' target='_blank'>the guys over at SvenCoop</a> have broken it.
Listed under General Changes in the changelist:
-Hud properly outputs health, armor, and ammo values. (No 250 limit)
There isn't any downside to this as far as I can see... care to correct me?
Comments
The server sends a BYTE containing the number of ammo you have. And a byte goes from 0 to 255. So you can't see more than 255 on your HUD.
Another thing: the function that displays the ammo displays a maximum of 3 digits.
Both of these points can be easily fixed. A couple of lines of code would fix that. So that's not a problem, and "breaking" this "bug" is really easy. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
A 56k modem can send about 6 THOUSAND bytes per second, so I don't think sending an extra byte to fix this bug would cause any problems <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
(Yes, I know it's not really 6 thousand, I'm assuming there's some overhead and a bad connection)
It's just like that because no HL weapon has over 250 bullets, so two bytes weren't needed in HL.
COBOL coders saving a punch card or two
ROFL
Even bearing that in mind, adding another byte wouldn't be a huge bandwidth hit by any means.
Thing is, the LMG maximum 'spare' ammo count was dropped to 250, fitting neatly into that single byte. The only gun this would have an effect upon at the moment is the HMG, which remains at 300 IIRC (or 400 if I don't). Very minor benefit for a possibly involved change to the netcode, considering how fast most HMGers blaze through that 'invisible' 50 rounds, down into the sub-250-spare range.