> A cl_entity_t has a 'messagenum' field or somesuch that holds the index of
> the last recieved packet that entity was updated in. If the ent's
> messagenum
> != the player's messagenum (easy enough to get), the entity is
> 'invalid' and
> you can filter it out.
>
> I think that's it, anyway. If you need more, I'll dig around in source and
> find some of my code that uses it.

Well, I went and looked anyway. ;)

---

cl_entity_t *pPlayer = gEngfuncs.GetLocalPlayer();
if (!pPlayer || (gEngfuncs.GetMaxClients() <= 0) || (!gViewPort &&
gEngfuncs.pEventAPI)) return 1;

cl_entity_t *pEnt = gEngfuncs.GetEntityByIndex(i);
if (!pEnt) return 1;

if(pEnt->curstate.messagenum != pPlayer->curstate.messagenum) return;

---

That should do what you're looking for.

-James "Corvidae" Williams ([EMAIL PROTECTED])
Administrator, Wavelength Forums (http://www.planethalflife.com/wavelength)
Co-Leader / Coder, Underhive (http://www.underhive.com)

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

Reply via email to