diff --git a/modules/fun/fun.cpp b/modules/fun/fun.cpp index 2bced379..0aed4725 100644 --- a/modules/fun/fun.cpp +++ b/modules/fun/fun.cpp @@ -510,10 +510,8 @@ int ClientConnect(edict_t *pPlayer, const char *pszName, const char *pszAddress, RETURN_META_VALUE(MRES_IGNORED, 0); } -void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *shooter, TraceResult *ptr) +void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *shooter, TraceResult *ptr) { - TRACE_LINE(v1, v2, fNoMonsters, shooter, ptr); - if (ptr->pHit && (ptr->pHit->v.flags & (FL_CLIENT | FL_FAKECLIENT)) && shooter && (shooter->v.flags & (FL_CLIENT | FL_FAKECLIENT)) ) { @@ -523,10 +521,11 @@ void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *shoot if (!(Players[shooterIndex].GetBodyHits(targetIndex) & (1 << ptr->iHitgroup))) { ptr->flFraction = 1.0; + RETURN_META(MRES_HANDLED); } } - RETURN_META(MRES_SUPERCEDE); + RETURN_META(MRES_IGNORED); } void OnAmxxAttach() diff --git a/modules/fun/moduleconfig.h b/modules/fun/moduleconfig.h index 112c9fae..b782555e 100644 --- a/modules/fun/moduleconfig.h +++ b/modules/fun/moduleconfig.h @@ -232,7 +232,7 @@ // #define FN_SetOrigin SetOrigin // #define FN_EmitSound EmitSound // #define FN_EmitAmbientSound EmitAmbientSound -#define FN_TraceLine TraceLine +// #define FN_TraceLine TraceLine // #define FN_TraceToss TraceToss // #define FN_TraceMonsterHull TraceMonsterHull // #define FN_TraceHull TraceHull @@ -378,7 +378,7 @@ // #define FN_SetOrigin_Post SetOrigin_Post // #define FN_EmitSound_Post EmitSound_Post // #define FN_EmitAmbientSound_Post EmitAmbientSound_Post -// #define FN_TraceLine_Post TraceLine_Post + #define FN_TraceLine_Post TraceLine_Post // #define FN_TraceToss_Post TraceToss_Post // #define FN_TraceMonsterHull_Post TraceMonsterHull_Post // #define FN_TraceHull_Post TraceHull_Post