You should use the
UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 5 );
random function(s). These functions (Leon, Botman, tell me if I am wrong
here) will allow the random sequence generated by the server and the client
to be the same :) So your "random" effect will gel between the server and
the client (hence the shared name). FA implements this and you don't see a
difference between client and actual.

----- Original Message -----
From: "Commando" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 10:28 AM
Subject: Re: [hlcoders] Clientside events not matching the server


> Paul
>
> That is unfortunately normal.  I ran into this when modifying accuracy of
> weapons based on things like player speed, crouching, stamina, etc, but it
> will happen with all weapons no matter how careful you are.
>
> When you do the bullet trace, you give it a vector which is basically the
> cone of degrees of accuracy.  That means that the bullet will hit at a
> random point within that cone.  The problem lies with the fact that the
> random point that the client comes up with will be different than the
> random point the server comes up with.  All you can really do here is to
> keep as much as possible between the client and the server the same so
that
> the accuracy vector you pass in to EV_HLDM_FireBullets() and to
> m_pPlayer->FireBulletsPlayer() is the same.  Beyond that it is random,
> unless there is some magic hidden in the code that I haven't found yet. :(
>
> Rob Prouse
> Tour of Duty Mod
> http://www.tourofdutymod.com
>
> At 09:27 PM 26/02/2002 +0000, you wrote:
> >Ok, here's one I won't work out on my own.
> >
> >I ust finished making all our weapons use clientside events to do the
> >animations, decals, etc. But as I was doing the last one I forgot to turn
> >off the serverside decals. I then noticed that the decal marks were
> >completely different for client and server. I was under the impression
that
> >some clever code tied the events to the server so this wouldn't happen.
Is
> >there something I need to do that I may have overlooked?
> >
> >I'm not talking about full client prediction here, just event calls from
the
> >server.
> >
> >Any suggestions of things to check would be greatly appreciated :)
> >
> >Paul
> >
> >_______________________________________________
> >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
>

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

Reply via email to