forked from CSSZombieEscape/sm-ext-CSSFixes
		
	Add team as negative index (-2, -3) to PhysboxToClientMap
This commit is contained in:
		@@ -324,14 +324,24 @@ bool ShouldHitEntity(IHandleEntity *pHandleEntity, int contentsMask)
 | 
			
		||||
	CBaseHandle hndl = pUnk->GetRefEHandle();
 | 
			
		||||
	int index = hndl.GetEntryIndex();
 | 
			
		||||
 | 
			
		||||
	int iTeam = 0;
 | 
			
		||||
 | 
			
		||||
	if(index > SM_MAXPLAYERS && g_pPhysboxToClientMap && index < 2048)
 | 
			
		||||
	{
 | 
			
		||||
		index = g_pPhysboxToClientMap[index];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(index < 1 || index > SM_MAXPLAYERS)
 | 
			
		||||
	if(index >= -3 && index <= -1)
 | 
			
		||||
	{
 | 
			
		||||
		iTeam = -index;
 | 
			
		||||
	}
 | 
			
		||||
	else if(index < 1 || index > SM_MAXPLAYERS)
 | 
			
		||||
	{
 | 
			
		||||
		RETURN_META_VALUE(MRES_IGNORED, true);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(!iTeam)
 | 
			
		||||
	{
 | 
			
		||||
		IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(index);
 | 
			
		||||
		if(!pPlayer || !pPlayer->GetEdict())
 | 
			
		||||
			RETURN_META_VALUE(MRES_IGNORED, true);
 | 
			
		||||
@@ -340,7 +350,9 @@ bool ShouldHitEntity(IHandleEntity *pHandleEntity, int contentsMask)
 | 
			
		||||
		if(!pInfo)
 | 
			
		||||
			RETURN_META_VALUE(MRES_IGNORED, true);
 | 
			
		||||
 | 
			
		||||
	int iTeam = pInfo->GetTeamIndex();
 | 
			
		||||
		iTeam = pInfo->GetTeamIndex();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(iTeam == g_FireBulletPlayerTeam)
 | 
			
		||||
		RETURN_META_VALUE(MRES_SUPERCEDE, false);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user