mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +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 {
|
typedef struct edict_leaf_s {
|
||||||
struct edict_leaf_s *next;
|
struct edict_leaf_s *next;
|
||||||
struct mleaf_s *leaf;
|
unsigned leafnum;
|
||||||
} edict_leaf_t;
|
} edict_leaf_t;
|
||||||
|
|
||||||
typedef struct sv_data_s {
|
typedef struct sv_data_s {
|
||||||
|
|
|
@ -465,8 +465,7 @@ SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -423,7 +423,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
|
||||||
leaf = (mleaf_t *) node;
|
leaf = (mleaf_t *) node;
|
||||||
|
|
||||||
edict_leaf = alloc_edict_leaf ();
|
edict_leaf = alloc_edict_leaf ();
|
||||||
edict_leaf->leaf = leaf;
|
edict_leaf->leafnum = leaf - sv.worldmodel->leafs - 1;
|
||||||
edict_leaf->next = SVdata (ent)->leafs;
|
edict_leaf->next = SVdata (ent)->leafs;
|
||||||
SVdata (ent)->leafs = edict_leaf;
|
SVdata (ent)->leafs = edict_leaf;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -199,7 +199,7 @@ extern progs_t sv_pr_state;
|
||||||
|
|
||||||
typedef struct edict_leaf_s {
|
typedef struct edict_leaf_s {
|
||||||
struct edict_leaf_s *next;
|
struct edict_leaf_s *next;
|
||||||
struct mleaf_s *leaf;
|
unsigned leafnum;
|
||||||
} edict_leaf_t;
|
} edict_leaf_t;
|
||||||
|
|
||||||
typedef struct sv_data_s {
|
typedef struct sv_data_s {
|
||||||
|
|
|
@ -616,8 +616,7 @@ SV_WritePlayersToClient (delta_t *delta, byte *pvs, sizebuf_t *msg)
|
||||||
if (pvs) {
|
if (pvs) {
|
||||||
// ignore if not touching a PV leaf
|
// ignore if not touching a PV leaf
|
||||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!el)
|
if (!el)
|
||||||
|
@ -805,8 +804,7 @@ SV_WriteEntitiesToClient (delta_t *delta, sizebuf_t *msg)
|
||||||
if (pvs) {
|
if (pvs) {
|
||||||
// ignore if not touching a PV leaf
|
// ignore if not touching a PV leaf
|
||||||
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
for (el = SVdata (ent)->leafs; el; el = el->next) {
|
||||||
unsigned leafnum = el->leaf - sv.worldmodel->leafs - 1;
|
if (pvs[el->leafnum >> 3] & (1 << (el->leafnum & 7)))
|
||||||
if (pvs[leafnum >> 3] & (1 << (leafnum & 7)))
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!el)
|
if (!el)
|
||||||
|
|
|
@ -423,7 +423,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
|
||||||
leaf = (mleaf_t *) node;
|
leaf = (mleaf_t *) node;
|
||||||
|
|
||||||
edict_leaf = alloc_edict_leaf ();
|
edict_leaf = alloc_edict_leaf ();
|
||||||
edict_leaf->leaf = leaf;
|
edict_leaf->leafnum = leaf - sv.worldmodel->leafs - 1;
|
||||||
edict_leaf->next = SVdata (ent)->leafs;
|
edict_leaf->next = SVdata (ent)->leafs;
|
||||||
SVdata (ent)->leafs = edict_leaf;
|
SVdata (ent)->leafs = edict_leaf;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue