SV_HullForEntity: fix misleading error message "MOVETYPE_PUSH with a non bsp model"

- change this and "SOLID_BSP without MOVETYPE_PUSH" to Host_Error (less annoying)
- print classname and origin of entity that caused the error

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1481 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2017-08-24 03:06:56 +00:00
parent 79aac789be
commit 6b99b37f3e

View file

@ -140,12 +140,14 @@ hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
if (ent->v.solid == SOLID_BSP)
{ // explicit hulls in the BSP model
if (ent->v.movetype != MOVETYPE_PUSH)
Sys_Error ("SOLID_BSP without MOVETYPE_PUSH");
Host_Error ("SOLID_BSP without MOVETYPE_PUSH (%s at %f %f %f)",
PR_GetString(ent->v.classname), ent->v.origin[0], ent->v.origin[1], ent->v.origin[2]);
model = sv.models[ (int)ent->v.modelindex ];
if (!model || model->type != mod_brush)
Sys_Error ("MOVETYPE_PUSH with a non bsp model");
Host_Error ("SOLID_BSP with a non bsp model (%s at %f %f %f)",
PR_GetString(ent->v.classname), ent->v.origin[0], ent->v.origin[1], ent->v.origin[2]);
VectorSubtract (maxs, mins, size);
if (size[0] < 3)