From 96ba309e4a37eeb4fcd3e01416c11dca63026ac2 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Fri, 6 Oct 2023 19:18:57 +0300 Subject: [PATCH] SG_Detonate: make event realible (#875) --- regamedll/dlls/ggrenade.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/ggrenade.cpp b/regamedll/dlls/ggrenade.cpp index 48c52622c..678a78d58 100644 --- a/regamedll/dlls/ggrenade.cpp +++ b/regamedll/dlls/ggrenade.cpp @@ -600,9 +600,15 @@ void CGrenade::__API_HOOK(SG_Detonate)() } m_bDetonated = true; - PLAYBACK_EVENT_FULL(0, nullptr, m_usEvent, 0, pev->origin, (float *)&g_vecZero, 0, 0, 0, 1, m_bLightSmoke, FALSE); m_vSmokeDetonate = pev->origin; + int flags = 0; +#ifdef REGAMEDLL_FIXES + flags = FEV_RELIABLE; +#endif + + PLAYBACK_EVENT_FULL(flags, nullptr, m_usEvent, 0, m_vSmokeDetonate, (float *)&g_vecZero, 0, 0, 0, 1, m_bLightSmoke, FALSE); + pev->velocity.x = RANDOM_FLOAT(-175, 175); pev->velocity.y = RANDOM_FLOAT(-175, 175); pev->velocity.z = RANDOM_FLOAT(250, 350);