SG_Detonate: make event realible (#875)

This commit is contained in:
Sergey Shorokhov 2023-10-06 19:18:57 +03:00 committed by GitHub
parent 3a0970a1cd
commit 96ba309e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);