Improve CBaseTrigger::InitTrigger to allow use custom triggers without bsp model just origin,mins,maxs

This commit is contained in:
s1lentq 2023-10-28 16:40:23 +07:00
parent 426c975a88
commit 96e2121c45

View File

@ -468,7 +468,10 @@ void CBaseTrigger::InitTrigger()
pev->movetype = MOVETYPE_NONE;
// set size and link into world
SET_MODEL(ENT(pev), STRING(pev->model));
if (FStringNull(pev->model))
UTIL_SetOrigin(pev, pev->origin); // link into the list
else
SET_MODEL(ENT(pev), STRING(pev->model));
if (CVAR_GET_FLOAT("showtriggers") == 0)
{