mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Possibly fix the hitzones problem.
This commit is contained in:
parent
8e58484fc5
commit
9959ef52b3
@ -619,17 +619,31 @@ int ClientConnect(edict_t *pPlayer, const char *pszName, const char *pszAddress,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) {
|
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) {
|
||||||
|
if ( (pentToSkip->v.flags & (FL_CLIENT | FL_FAKECLIENT)) == false || pentToSkip->v.deadflag != DEAD_NO)
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
|
||||||
TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr); // pentToSkip gotta be the one that is shooting, so filter it
|
TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr); // pentToSkip gotta be the one that is shooting, so filter it
|
||||||
|
|
||||||
|
if ( (ptr->pHit->v.flags & (FL_CLIENT | FL_FAKECLIENT)) == false )
|
||||||
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
|
|
||||||
int hitIndex = ENTINDEX(ptr->pHit);
|
int hitIndex = ENTINDEX(ptr->pHit);
|
||||||
if (hitIndex >= 1 && hitIndex <= gpGlobals->maxClients) {
|
//bool blocked = false;
|
||||||
if ( !(
|
int canTargetGetHit = g_zones_getHit[hitIndex] & (1 << ptr->iHitgroup);
|
||||||
g_zones_getHit[hitIndex] & (1 << ptr->iHitgroup) // can ptr->pHit get hit in ptr->iHitgroup at all?
|
int canShooterHitThere = g_zones_toHit[ENTINDEX(pentToSkip)] & (1 << ptr->iHitgroup);
|
||||||
&& g_zones_toHit[hitIndex] & (1 << ptr->iHitgroup) ) // can pentToSkip hit other people in that hit zone?
|
|
||||||
) {
|
if (!canTargetGetHit || !canShooterHitThere) {
|
||||||
ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything)
|
ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything)
|
||||||
}
|
//blocked = true;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
if (blocked) {
|
||||||
|
MF_PrintSrvConsole("%s was blocked from hitting %s: %d and %d\n", MF_GetPlayerName(ENTINDEX(pentToSkip)), MF_GetPlayerName(hitIndex), canTargetGetHit, canShooterHitThere);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MF_PrintSrvConsole("%s was NOT blocked from hitting %s: %d and %d\n", MF_GetPlayerName(ENTINDEX(pentToSkip)), MF_GetPlayerName(hitIndex), canTargetGetHit, canShooterHitThere);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,8 @@
|
|||||||
TargetEnvironment="1"
|
TargetEnvironment="1"
|
||||||
TypeLibraryName=".\Release/fun.tlb"
|
TypeLibraryName=".\Release/fun.tlb"
|
||||||
HeaderFileName=""/>
|
HeaderFileName=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
@ -100,7 +102,7 @@
|
|||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="Debug/fun_amxx_debug.dll"
|
OutputFile="Debug/fun_amxx.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
ModuleDefinitionFile=""
|
ModuleDefinitionFile=""
|
||||||
|
Loading…
Reference in New Issue
Block a user