From 72d3f218167637dcee38a9a870127a4c900b7de0 Mon Sep 17 00:00:00 2001 From: IgnacioDM Date: Fri, 6 Nov 2015 07:44:14 -0300 Subject: [PATCH] Allow wordspawn in edict/entvars->index type conversion and EHANDLE edict get/set --- public/HLTypeConversion.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/HLTypeConversion.h b/public/HLTypeConversion.h index e99993ed..65b3b23b 100644 --- a/public/HLTypeConversion.h +++ b/public/HLTypeConversion.h @@ -77,7 +77,7 @@ class HLTypeConversion int edict_to_id(edict_t *pEdict) { - if (FNullEnt(pEdict)) + if (!pEdict) { return -1; } @@ -89,7 +89,7 @@ class HLTypeConversion edict_t* entvar_to_edict(entvars_t *pev) { - if (!pev || FNullEnt(pev->pContainingEntity)) + if (!pev || !(pev->pContainingEntity)) { return nullptr; } @@ -198,7 +198,7 @@ class EHANDLE edict_t* Get(void) { - if (!FNullEnt(m_pent)) + if (m_pent) { if (m_pent->serialnumber == m_serialnumber) { @@ -213,7 +213,7 @@ class EHANDLE edict_t* Set(edict_t *pent) { - if (!FNullEnt(pent)) + if (pent) { m_pent = pent; m_serialnumber = m_pent->serialnumber;