From 27d6a0cc088aae6bb78dcd62b0f0b4a159dc230e Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sat, 4 Jul 2015 16:28:24 +0200 Subject: [PATCH] Cstrike: cs_get_hostage_id - Fix error check, an hostage can't be a player --- modules/cstrike/cstrike/CstrikeNatives.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cstrike/cstrike/CstrikeNatives.cpp b/modules/cstrike/cstrike/CstrikeNatives.cpp index 05d2ca5a..171a417b 100644 --- a/modules/cstrike/cstrike/CstrikeNatives.cpp +++ b/modules/cstrike/cstrike/CstrikeNatives.cpp @@ -124,8 +124,8 @@ static cell AMX_NATIVE_CALL cs_get_hostage_id(AMX *amx, cell *params) int index = params[1]; - CHECK_ENTITY(index); - edict_t *pHostage = GETEDICT(index); + CHECK_NONPLAYER(index); + edict_t *pHostage = INDEXENT(index); if (strcmp(STRING(pHostage->v.classname), "hostage_entity") != 0) {