2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 15:45:46 +03:00

Use CONTENTS_EMPTY const

This commit is contained in:
asmodai 2017-08-23 17:07:09 +03:00
parent 55da681497
commit 3047a7b54b

View File

@ -96,7 +96,7 @@ void SV_InitBoxHull(void)
{
int side = i & 1;
box_clipnodes[i].planenum = i;
box_clipnodes[i].children[side] = -1;
box_clipnodes[i].children[side] = CONTENTS_EMPTY;
box_clipnodes[i].children[side ^ 1] = (i != 5) ? i + 1 : CONTENTS_SOLID;
box_planes[i].type = i >> 1;
beam_planes[i].type = 5;
@ -683,14 +683,14 @@ int SV_LinkContents(areanode_t *node, const vec_t *pos)
localPosition[0] = pos[0] - offset[0];
localPosition[1] = pos[1] - offset[1];
localPosition[2] = pos[2] - offset[2];
if (SV_HullPointContents(hull, hull->firstclipnode, localPosition) != -1)
if (SV_HullPointContents(hull, hull->firstclipnode, localPosition) != CONTENTS_EMPTY)
return contents;
}
}
}
if (node->axis == -1)
return -1;
return CONTENTS_EMPTY;
#ifndef REHLDS_OPT_PEDANTIC
if (pos[node->axis] > node->dist)
@ -715,7 +715,7 @@ int SV_LinkContents(areanode_t *node, const vec_t *pos)
#endif // REHLDS_OPT_PEDANTIC
}
return -1;
return CONTENTS_EMPTY;
}
int SV_PointContents(const vec_t *p)
@ -735,7 +735,7 @@ int SV_PointContents(const vec_t *p)
}
entityContents = SV_LinkContents(&sv_areanodes[0], p);
return (entityContents != -1) ? entityContents : cont;
return (entityContents != CONTENTS_EMPTY) ? entityContents : cont;
}
edict_t *SV_TestEntityPosition(edict_t *ent)