mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
support arbitrary hulls for players, too
This commit is contained in:
parent
44daa25fe6
commit
6000b06de3
3 changed files with 14 additions and 3 deletions
|
@ -59,6 +59,7 @@ typedef struct
|
|||
vec3_t origin;
|
||||
model_t *model; // only for bsp models
|
||||
vec3_t mins, maxs; // only for non-bsp models
|
||||
hull_t *hull; // hey, magic :)
|
||||
int info; // for client or server to identify
|
||||
} physent_t;
|
||||
|
||||
|
|
|
@ -360,9 +360,13 @@ PM_PlayerMove (vec3_t start, vec3_t end)
|
|||
if (pe->model)
|
||||
hull = &pmove.physents[i].model->hulls[1];
|
||||
else {
|
||||
VectorSubtract (pe->mins, player_maxs, mins);
|
||||
VectorSubtract (pe->maxs, player_mins, maxs);
|
||||
hull = PM_HullForBox (mins, maxs);
|
||||
if (pe->hull) {
|
||||
hull = pe->hull;
|
||||
} else {
|
||||
VectorSubtract (pe->mins, player_maxs, mins);
|
||||
VectorSubtract (pe->maxs, player_mins, maxs);
|
||||
hull = PM_HullForBox (mins, maxs);
|
||||
}
|
||||
}
|
||||
|
||||
// PM_HullForEntity (ent, mins, maxs, offset);
|
||||
|
|
|
@ -1315,6 +1315,12 @@ AddLinksToPmove (areanode_t *node)
|
|||
pe->model = NULL;
|
||||
VectorCopy (SVFIELD (check, mins, vector), pe->mins);
|
||||
VectorCopy (SVFIELD (check, maxs, vector), pe->maxs);
|
||||
if (sv_fields.rotated_bbox != -1
|
||||
&& SVFIELD (check, rotated_bbox, integer)) {
|
||||
int h = SVFIELD (check, rotated_bbox, integer);
|
||||
extern hull_t pf_hull_list[];
|
||||
pe->hull = &pf_hull_list[h - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue