>>Is there a way to tell if the entity wishing to send the event is in the
client's PVS...?
Yes, just compare the messagenum between the entity and the local player.
If the entity's messagenum is less, then it's outside the vis set. For
example:
if (pEnt->curstate.messagenum <
gEngfuncs.GetLocalPlayer()->curstate.messagenum)
{
// pEnt is outside of local player's vis set
}
else
{
// pEnt is inside of local player's vis set
}
Scott Velasquez
Programmer
Gearbox Software (www.gearboxsoftware.com)
------------------------------------------
re�cur�sion n.: See Recursion.
------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matthew Lewis
Sent: Monday, May 13, 2002 10: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