From 7d1a26e4ca82ce98eabcf5059534863c2f6751dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Fri, 12 Mar 2004 07:42:54 +0000 Subject: [PATCH] fixed so it's now possible to shoot and break func_breakable:s again :-) --- dlls/fun/fun.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index 98dea34f..10de6cd8 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -884,12 +884,21 @@ void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentT TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr); // pentToSkip gotta be the one that is shooting, so filter it - if ( !( + int hitIndex = ENTINDEX(ptr->pHit); + if (hitIndex >= 1 && hitIndex <= gpGlobals->maxClients) { + if ( !( + g_zones_getHit[hitIndex] & (1 << ptr->iHitgroup) // can ptr->pHit get hit in ptr->iHitgroup at all? + && g_zones_toHit[hitIndex] & (1 << ptr->iHitgroup) ) // can pentToSkip hit other people in that hit zone? + ) { + ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything) + } + } +/* if ( !( g_zones_getHit[ENTINDEX(ptr->pHit)] & (1 << ptr->iHitgroup) // can ptr->pHit get hit in ptr->iHitgroup at all? && g_zones_toHit[ENTINDEX(pentToSkip)] & (1 << ptr->iHitgroup) ) // can pentToSkip hit other people in that hit zone? ) { ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything) - } + }*/ RETURN_META(MRES_SUPERCEDE);