+static const vec3_t nomodelmins = {-16, -16, -16};
+static const vec3_t nomodelmaxs = {16, 16, 16};
+void CL_BoundingBoxForEntity(entity_render_t *ent)
+{
+ if (ent->model)
+ {
+ if (ent->angles[0] || ent->angles[2])
+ {
+ // pitch or roll
+ VectorAdd(ent->origin, ent->model->rotatedmins, ent->mins);
+ VectorAdd(ent->origin, ent->model->rotatedmaxs, ent->maxs);
+ }
+ else if (ent->angles[1])
+ {
+ // yaw
+ VectorAdd(ent->origin, ent->model->yawmins, ent->mins);
+ VectorAdd(ent->origin, ent->model->yawmaxs, ent->maxs);
+ }
+ else
+ {
+ VectorAdd(ent->origin, ent->model->normalmins, ent->mins);
+ VectorAdd(ent->origin, ent->model->normalmaxs, ent->maxs);
+ }
+ }
+ else
+ {
+ VectorAdd(ent->origin, nomodelmins, ent->mins);
+ VectorAdd(ent->origin, nomodelmaxs, ent->maxs);
+ }
+}
+