From 332a8d6e617f1d2625ffa8614e2ae8f9ae3ffaf2 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Fri, 6 Oct 2023 17:01:04 +0300 Subject: [PATCH] SG_Detonate: make event realible --- 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);