diff --git a/regamedll/dlls/combat.cpp b/regamedll/dlls/combat.cpp index ee8dd993..ed8ceb20 100644 --- a/regamedll/dlls/combat.cpp +++ b/regamedll/dlls/combat.cpp @@ -71,7 +71,13 @@ void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, if (!bInWater && pPlayer->pev->waterlevel == 3) continue; +#ifdef REGAMEDLL_FIXES + vecSpot = pPlayer->EyePosition(); +#else + // NOTE: See CBasePlayer::BodyTarget vecSpot = pPlayer->BodyTarget(vecSrc); +#endif + g_ReGameHookchains.m_RadiusFlash_TraceLine.callChain(RadiusFlash_TraceLine_hook, pPlayer, pevInflictor, pevAttacker, vecSrc, vecSpot, &tr); if (tr.flFraction != 1.0f && tr.pHit != pPlayer->pev->pContainingEntity) diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index 8f4bb882..8b5b0a97 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -358,6 +358,8 @@ public: virtual BOOL IsNetClient() { return TRUE; } virtual const char *TeamID(); virtual BOOL FBecomeProne(); + + // TODO: Need to investigate for what purposes used random to get relative eyes position virtual Vector BodyTarget(const Vector &posSrc) { return Center() + pev->view_ofs * RANDOM_FLOAT(0.5, 1.1); } virtual int Illumination(); virtual BOOL ShouldFadeOnDeath() { return FALSE; }