Improve player networking/culling.
This commit is contained in:
parent
ad18b8ec3d
commit
0f77b36804
1 changed files with 3 additions and 7 deletions
|
@ -779,15 +779,11 @@ player::SendEntity
|
|||
float
|
||||
player::SendEntity(entity ePEnt, float fChanged)
|
||||
{
|
||||
/* remove our entity to other clients if we're dead */
|
||||
if (health <= 0 && ePEnt != this) {
|
||||
/* don't broadcast invisible players */
|
||||
if (IsFakeSpectator() && ePEnt != this)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* target client isn't real, they have no client-side. abandon */
|
||||
if (clienttype(ePEnt) != CLIENTTYPE_REAL) {
|
||||
if (!GetModelindex() && ePEnt != this)
|
||||
return (0);
|
||||
}
|
||||
|
||||
WriteByte(MSG_ENTITY, ENT_PLAYER);
|
||||
WriteFloat(MSG_ENTITY, fChanged);
|
||||
|
|
Loading…
Reference in a new issue