just add a new variable to CGlock which holds the last time you increases the number 
of rounds.
If enough time has passed, you can add one more.

if(m_iClip <= 99
&&m_fAdd > gpGlobals->time + .25){
m_fAdd = gpGlobals->time;
m_iClip++;
}

isnt there already another weapon in hl which does something similar ? dunno how it's 
called ...

Am 26.06.2002 11:06:18, schrieb "John Frings" <[EMAIL PROTECTED]>:

>I started playing with the SDK just a few hours ago and I can't say I'm very
>elite when it comes to C++ so here's my noob question:
>
>
>I altered the glock and increased it's rate of fire _alot_ .
>
>In CGlock::GlockFire I added
>
>if (m_iClip >= 2) {
>  m_iClip--;
>}
>
>(Glock will always have atleast one round left no matter how much you shoot)
>
>This works just the way I want it to but this following code is too "fast":
>
>In CGlock::WeaponIdle I added:
>
> if (m_iClip <= 99) {
>   m_iClip++;
> }
>
>ok, so now the glock is filled up with fresh rounds as soon as I stop
>fireing ( yes, this will later on be transformed into a laser gun ;), only
>I don't want it to refill the gun at the incredible spead it does now. How
>do I delay the refilling process? I guess about one fillup every 0.25
>seconds would be nice.
>
>
>/Fringan
>
>
>
>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to