EXT_DIMENSION_PHYSICS, EXT_DIMENSION_GHOST

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@127 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-04 17:55:12 +00:00
parent 54724f1bbf
commit 19e3909bde
1 changed files with 20 additions and 8 deletions

View File

@ -1257,7 +1257,7 @@ void SV_WritePlayersToClient (client_t *client, edict_t *clent, qbyte *pvs, size
continue; // not visible
}
if (!((int)clent->v.dimension_mask & ((int)ent->v.dimension_mask | (int)ent->v.dimension_ghost)))
if (!((int)clent->v.dimension_see & ((int)ent->v.dimension_seen | (int)ent->v.dimension_ghost)))
continue; //not in this dimension - sorry...
}
@ -1289,9 +1289,14 @@ void SV_WritePlayersToClient (client_t *client, edict_t *clent, qbyte *pvs, size
clst.transparency = vent->v.alpha;
//QSG_DIMENSION_PLANES - if the only shared dimensions are ghost dimensions, Set half alpha.
if (((int)clent->v.dimension_mask & (int)ent->v.dimension_ghost))
if (!((int)clent->v.dimension_mask & ((int)ent->v.dimension_mask & ~(int)ent->v.dimension_ghost)) )
clst.transparency /= 2;
if (((int)clent->v.dimension_see & (int)ent->v.dimension_ghost))
if (!((int)clent->v.dimension_see & ((int)ent->v.dimension_seen & ~(int)ent->v.dimension_ghost)) )
{
if (ent->v.dimension_ghost_alpha)
clst.transparency *= ent->v.dimension_ghost_alpha;
else
clst.transparency *= 0.5;
}
clst.fatness = vent->v.fatness;
clst.localtime = cl->localtime;
@ -1958,8 +1963,10 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore
if (ent->v.drawonlytoclient != EDICT_TO_PROG(svprogfuncs, client->edict))
continue;
if (!((int)client->edict->v.dimension_mask & ((int)ent->v.dimension_mask | (int)ent->v.dimension_ghost)))
//QSG_DIMENSION_PLANES
if (!((int)client->edict->v.dimension_see & ((int)ent->v.dimension_seen | (int)ent->v.dimension_ghost)))
continue; //not in this dimension - sorry...
#ifdef NQPROT
if (nqprot)
{
@ -2079,9 +2086,14 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore
state->trans = 1;
//QSG_DIMENSION_PLANES - if the only shared dimensions are ghost dimensions, Set half alpha.
if (((int)client->edict->v.dimension_mask & (int)ent->v.dimension_ghost))
if (!((int)client->edict->v.dimension_mask & ((int)ent->v.dimension_mask & ~(int)ent->v.dimension_ghost)) )
state->trans /= 2;
if (((int)client->edict->v.dimension_see & (int)ent->v.dimension_ghost))
if (!((int)client->edict->v.dimension_see & ((int)ent->v.dimension_seen & ~(int)ent->v.dimension_ghost)) )
{
if (ent->v.dimension_ghost_alpha)
state->trans *= ent->v.dimension_ghost_alpha;
else
state->trans *= 0.5;
}
#endif
#ifdef PEXT_FATNESS
state->fatness = ent->v.fatness;