Skip to content

Commit

Permalink
SG_Detonate: make event realible (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov authored Oct 6, 2023
1 parent 3a0970a commit 96ba309
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion regamedll/dlls/ggrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

1 comment on commit 96ba309

@Vaqtincha
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverse engineering mistake?

Please sign in to comment.