>
> Message: 5
> Date: Thu, 12 Feb 2009 23:47:36 -0800
> From: Tony Sergi <[email protected]>
> Subject: Re: [hlcoders] Weird Reloading Glitch: Multiple Weapons
>        Reloading with  One Button Press
> To: Discussion of Half-Life Programming
>        <[email protected]>
> Message-ID:
>        <
> 7315746f7efcaf4a93699ce8fa5797861490b57...@exchange07.valvesoftware.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Well that's odd. The total ammo reduction in a scenario like that assuming
> you were reloading both weapons would definitely take 11 away from the total
> pool, but I don't see how you're reloading the shotgun as well.
>
> Try throwing in a breakpoint and watch how much ammo is actually being
> taken away during each reload.
>
> -Tony


Well, I figured it out without throwing in a breakpoint. What was happening
is that CBasePlayer calls a function named ItemHolsterFrame which reloads
non-active weapons after 3 seconds or when you hit the reload key. Since
normally you'd never see the game siphon ammo away to a non-active weapon,
it looked like a bug. The way around it is simply to comment out the call to
ItemHolsterFrame in CBasePlayer. It has absolutely no adverse effects on
gameplay that I can tell.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to