Skip to content

Commit 3c44720

Browse files
Fixed missing *_hull usages
1 parent c8612a6 commit 3c44720

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

rehlds/engine/pmovetst.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ int EXT_FUNC PM_PointContents(vec_t *p, int *truecontents)
165165
{
166166
int entityContents = PM_HullPointContents(
167167
pmove->physents[0].model->hulls,
168-
pmove->physents[0].model->hulls[0].firstclipnode,
168+
pmove->physents[0].model->hulls[point_hull].firstclipnode,
169169
p);
170170
if (truecontents)
171171
*truecontents = entityContents;
@@ -198,7 +198,7 @@ int PM_WaterEntity(vec_t *p)
198198
#endif
199199

200200
model_t* model = pmove->physents[0].model;
201-
cont = PM_HullPointContents(model->hulls, model->hulls[0].firstclipnode, p);
201+
cont = PM_HullPointContents(model->hulls, model->hulls[point_hull].firstclipnode, p);
202202
if (cont == CONTENTS_SOLID) {
203203
return CONTENTS_EMPTY;
204204
}
@@ -212,7 +212,7 @@ int EXT_FUNC PM_TruePointContents(vec_t *p)
212212
if ((int)pmove->physents[0].model == -208)
213213
return CONTENTS_EMPTY;
214214
else
215-
return PM_HullPointContents(pmove->physents[0].model->hulls, pmove->physents[0].model->hulls[0].firstclipnode, p);
215+
return PM_HullPointContents(pmove->physents[0].model->hulls, pmove->physents[0].model->hulls[point_hull].firstclipnode, p);
216216
}
217217

218218
hull_t *PM_HullForStudioModel(model_t *pModel, vec_t *offset, float frame, int sequence, const vec_t *angles, const vec_t *origin, const unsigned char *pcontroller, const unsigned char *pblending, int *pNumHulls)
@@ -235,19 +235,19 @@ hull_t* EXT_FUNC PM_HullForBsp(physent_t *pe, vec_t *offset)
235235

236236
switch (pmove->usehull) {
237237
case 1:
238-
hull = &pe->model->hulls[3];
238+
hull = &pe->model->hulls[head_hull];
239239
break;
240240

241241
case 2:
242-
hull = &pe->model->hulls[0];
242+
hull = &pe->model->hulls[point_hull];
243243
break;
244244

245245
case 3:
246-
hull = &pe->model->hulls[2];
246+
hull = &pe->model->hulls[large_hull];
247247
break;
248248

249249
default:
250-
hull = &pe->model->hulls[1];
250+
hull = &pe->model->hulls[human_hull];
251251
break;
252252
}
253253

@@ -405,16 +405,16 @@ pmtrace_t _PM_PlayerTrace(vec_t *start, vec_t *end, int traceFlags, int numphyse
405405
switch (pmove->usehull)
406406
{
407407
case 1:
408-
hull = &pe->model->hulls[3];
408+
hull = &pe->model->hulls[head_hull];
409409
break;
410410
case 2:
411-
hull = &pe->model->hulls[0];
411+
hull = &pe->model->hulls[point_hull];
412412
break;
413413
case 3:
414-
hull = &pe->model->hulls[2];
414+
hull = &pe->model->hulls[large_hull];
415415
break;
416416
default:
417-
hull = &pe->model->hulls[1];
417+
hull = &pe->model->hulls[human_hull];
418418
break;
419419
}
420420
offset[0] = hull->clip_mins[0] - player_mins[pmove->usehull][0];

rehlds/engine/world.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ hull_t *SV_HullForBsp(edict_t *ent, const vec_t *mins, const vec_t *maxs, vec_t
190190

191191
if (size[0] <= 8.0f)
192192
{
193-
hull = &model->hulls[0];
193+
hull = &model->hulls[point_hull];
194194
VectorCopy(hull->clip_mins, offset);
195195
}
196196
else
@@ -202,13 +202,13 @@ hull_t *SV_HullForBsp(edict_t *ent, const vec_t *mins, const vec_t *maxs, vec_t
202202
#else
203203
if (size[2] <= 36.0f)
204204
#endif
205-
hull = &model->hulls[3];
205+
hull = &model->hulls[head_hull];
206206
else
207-
hull = &model->hulls[1];
207+
hull = &model->hulls[human_hull];
208208
}
209209
else
210210
{
211-
hull = &model->hulls[2];
211+
hull = &model->hulls[large_hull];
212212
}
213213

214214
// calculate an offset value to center the origin

rehlds/rehlds/precompiled.h

+2
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@
5555

5656
#include "dlls/cdll_dll.h"
5757
#include "hltv.h"
58+
59+
#include "dlls/util.h"

0 commit comments

Comments
 (0)