From 3047a7b54b3f39d38733440f797a84fa5acfa8d7 Mon Sep 17 00:00:00 2001 From: asmodai Date: Wed, 23 Aug 2017 17:07:09 +0300 Subject: [PATCH] Use CONTENTS_EMPTY const --- rehlds/engine/world.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rehlds/engine/world.cpp b/rehlds/engine/world.cpp index 6ea7ca2..5ad4eb3 100644 --- a/rehlds/engine/world.cpp +++ b/rehlds/engine/world.cpp @@ -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)