2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 07:35:47 +03:00

SV_HullForEntity: better log in Sys_Error (#843)

This commit is contained in:
Sergey Shorokhov 2021-10-20 19:39:07 +03:00 committed by GitHub
parent 04ddafe637
commit 2118e8f052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -238,7 +238,8 @@ hull_t *SV_HullForEntity(edict_t *ent, const vec_t *mins, const vec_t *maxs, vec
// explicit hulls in the BSP model
if (ent->v.movetype != MOVETYPE_PUSH && ent->v.movetype != MOVETYPE_PUSHSTEP)
{
Sys_Error("%s: SOLID_BSP without MOVETYPE_PUSH", __func__);
Sys_Error("%s: SOLID_BSP without MOVETYPE_PUSH\nEntity classname = %s, model = %s",
__func__, STRING(ent->v.classname), STRING(ent->v.model));
}
return SV_HullForBsp(ent, mins, maxs, offset);

View File

@ -68,6 +68,10 @@ struct event_state_s
extern char *pr_strings;
extern globalvars_t gGlobalVariables;
#if !defined(STRING) && defined(SWDS)
#define STRING(offset) ((const char *)(pr_strings + (unsigned int)(offset)))
#endif
//============================================================================
edict_t *ED_Alloc (void);