Look in common\const.h.  Change your MESSAGE_BEGIN() event to use MSG_PVS

MSG_BROADCAST   // unreliable to all
MSG_ONE         // reliable to one (msg_entity)
MSG_ALL         // reliable to all
MSG_INIT                // write to the init string
MSG_PVS         // Ents in PVS of org
MSG_PAS         // Ents in PAS of org
MSG_PVS_R               // Reliable to PVS
MSG_PAS_R               // Reliable to PAS
MSG_ONE_UNRELIABLE // Send to one client, but don't put in reliable stream,
put in unreliable datagram ( could be dropped )
MSG_SPEC                // Sends to all spectator proxies

-----Original Message-----
From: Matthew Lewis [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Limiting events to entities in the PVS


Here's a tough problem. I have an event handler that handles the firing of a
lightning gun. The event handler uses a R_BeamEnt entity to draw a lighting
bolt from the shooter's weapon off into the direction the shooter is facing.
The problem is that it seems the event message is sent to all clients even
when the entity triggering the event is outside the PVS. Unfortunately, the
entity's origin and angles don't appear to get updated on the client when
it's outside the client's PVS so the result is that I have lightning bolts
appearing from thin air randomly in the level since the event handler is
using obsolete coordinate information. So here's the question: Is there a
way to tell if the entity wishing to send the event is in the client's PVS
(and hence is receiving coordinate updates about the entity)? Or is there a
way on the clientside to tell that the event came from an entity in its
current PVS or that the coordinate infomation to that entity is currently
valid?

_______________________________________________
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