Cortex

What you need to remember is that most of the methods in CBasePlayer and
CBaseWeapon on the client side are just empty stubs that do nothing, or if
they do something, they need to do it using different information than on
the client side.  I ran into the same problems as you when I was basing our
accuracy on the player's stamina.  You have a few choices, first, you need
to duplicate the calculation of your m_precision on the client side using
whatever information on the client side you have.  This can be difficult
because as you have seen, the client doesn't always have all of the
information and some of the member variables are just 0.  I had to do the
same calculations using completely different variables based on information
we were transmitting to the HUD.  The other problem with this method, is
that if you change the way you calculate your precision on the server, you
have to make the same update on the client which you will probably forget
to do once in awhile.

Your second option is to transmit m_precision with all of your client
player updates.  You will probably need to modify your delta.lst for this too.

Client side weapons are a bit of a pain eh ;-)

Good luck

Rob Prouse
Tour of Duty Mod
http://www.tourofdutymod.com

At 08:05 PM 25/03/2002 +0100, you wrote:
>Hello,
>
>Recently, I wanted to make the players shoots dependant of their accuracy
>and the weapon they carry. I've added a "m_precision // m_accuracy in
>english :D" variable to CBasePlayerWeapon and CBasePlayer. I set them
>correclty in my Gamerules. So, all right.
>
>The problem I'm encountering with the CBasePlayer variable is that on the
>client side, in CBaseEntity::FireBulletPlayers(...), the CBasePlayer class
>isn't set according to the server one. Indeed, pPlayer->m_precision is
>always zero on the client whereas it's the normal value for the server's
>pPlayer->m_precision !
>
>Really annoying... Any idea how I could get around this ?
>
>       - Cortex : mapper & coder www.hlalbator.fr.st
>
>
>_______________________________________________
>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