From 76cddfd785b0c09cdbd0e50c8dd23a573eaa116c Mon Sep 17 00:00:00 2001 From: s1lent Date: Wed, 14 Jun 2017 03:59:33 +0700 Subject: [PATCH] Add missing check weapon_flashbang for native GetGrenadeType --- reapi/src/natives/natives_common.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reapi/src/natives/natives_common.cpp b/reapi/src/natives/natives_common.cpp index 27da50a..650d542 100644 --- a/reapi/src/natives/natives_common.cpp +++ b/reapi/src/natives/natives_common.cpp @@ -54,6 +54,10 @@ cell AMX_NATIVE_CALL amx_GetGrenadeType(AMX *amx, cell *params) return WEAPON_C4; } + if (!pGrenade->m_usEvent) { + return WEAPON_FLASHBANG; + } + static unsigned short usCreateExplosion = 0; if (!usCreateExplosion) { usCreateExplosion = PRECACHE_EVENT(1, "events/createexplo.sc");