mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Change back to storing the leafnum.
Still unlimited, of course :)
This commit is contained in:
parent
64be913350
commit
bc91faf51e
6 changed files with 7 additions and 10 deletions
|
@ -212,7 +212,7 @@ extern progs_t sv_pr_state;
|
|||
|
||||
typedef struct edict_leaf_s {
|
||||
struct edict_leaf_s *next;
|
||||
struct mleaf_s *leaf;
|
||||
unsigned leafnum;
|
||||
} edict_leaf_t;
|
||||
|
||||
typedef struct sv_data_s {
|
||||
|
|
|
@ -465,8 +465,7 @@ SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
|||
continue;
|
||||
|
||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
||||
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
|
|||
leaf = (mleaf_t *) node;
|
||||
|
||||
edict_leaf = alloc_edict_leaf ();
|
||||
edict_leaf->leaf = leaf;
|
||||
edict_leaf->leafnum = leaf - sv.worldmodel->leafs - 1;
|
||||
edict_leaf->next = SVdata (ent)->leafs;
|
||||
SVdata (ent)->leafs = edict_leaf;
|
||||
return;
|
||||
|
|
|
@ -199,7 +199,7 @@ extern progs_t sv_pr_state;
|
|||
|
||||
typedef struct edict_leaf_s {
|
||||
struct edict_leaf_s *next;
|
||||
struct mleaf_s *leaf;
|
||||
unsigned leafnum;
|
||||
} edict_leaf_t;
|
||||
|
||||
typedef struct sv_data_s {
|
||||
|
|
|
@ -616,8 +616,7 @@ SV_WritePlayersToClient (delta_t *delta, byte *pvs, sizebuf_t *msg)
|
|||
if (pvs) {
|
||||
// ignore if not touching a PV leaf
|
||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
||||
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||
break;
|
||||
}
|
||||
if (!el)
|
||||
|
@ -805,8 +804,7 @@ SV_WriteEntitiesToClient (delta_t *delta, sizebuf_t *msg)
|
|||
if (pvs) {
|
||||
// ignore if not touching a PV leaf
|
||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
||||
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||
break;
|
||||
}
|
||||
if (!el)
|
||||
|
|
|
@ -423,7 +423,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
|
|||
leaf = (mleaf_t *) node;
|
||||
|
||||
edict_leaf = alloc_edict_leaf ();
|
||||
edict_leaf->leaf = leaf;
|
||||
edict_leaf->leafnum = leaf - sv.worldmodel->leafs - 1;
|
||||
edict_leaf->next = SVdata (ent)->leafs;
|
||||
SVdata (ent)->leafs = edict_leaf;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue