There's a function on the weapon like "IsFirstTimePredicted", you'll
probably want to use that on your clientside increment to prevent it
adding to it multiple times.

Can't really explain why your server var isn't changing without seeing
your code (my best guess would be that you aren't changing it).

garry


On Sun, Sep 14, 2008 at 5:18 PM, Idrox Gedrono <[EMAIL PROTECTED]> wrote:
> Hi there, this is my first time sending anything in to the mailing list, 
> though I've been subscribed for a while.  The last couple days, I've been 
> tearing through the code of a mod I'm working on, but I've come across an 
> issue that brings my progress to a screeching halt.
>
> The basic idea is that there is a heat system in place for the main weapon of 
> the game; fire too quickly and it overheats, making it useless.  I have put 
> the code that handles this inside the PrimaryFire code of the weapon, so it 
> checks for overheating before firing, and if it does fire, it does all of the 
> heat increasing, et cetera.
>
> The way I handle heat is using a single time variable.  The time inside the 
> variable represents the point in time where all heat will have faded from the 
> weapon.  If at any moment this time is farther out than, say, a second, the 
> weapon says 'too much heat, so no functionality'.  There are two problems 
> that I've come across here.  To debug this, I've made a simple console output 
> whenever you fire that lists gpGlobals->curtime and the cooldown-time 
> variable.  I've found that for every time the server outputs these variables, 
> the client outputs them two or even three times, producing only one actual 
> firing effect, but increasing the cooldown-time variable by the appropriate 
> multiple, overheating the weapon much faster.  On top of that, the server 
> does not actually modify the cooldown-time; every time it's output, it always 
> says 0.000000, though it outputs gpGlobals->curtime correctly, and is in sync 
> with the client's output of curtime.  As far as I can tell, I have everything 
> set up correctly for replication
>
> Clarification: The weapon, though it uses heat to limit the firing rate (by 
> the player having to limit her firing speed so it doesn't overheat), does 
> still have a normal refire rate of half a second.
>
> Sorry if it was a bit longwinded, and I hope someone can help :).
>
> -Kohan
>
> _________________________________________________________________
> See how Windows connects the people, information, and fun that are part of 
> your life.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/
> _______________________________________________
> 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