Added a restriction to AvHSUKillPlayersTouchingPlayer so that players of the same height would not accidentally telefrag eachother even when away from the PG/IPs center.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@320 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-08-01 15:49:22 +00:00
parent b6c429a8b2
commit 88b8f055de

View file

@ -292,7 +292,8 @@ void AvHSUKillPlayersTouchingPlayer(AvHPlayer* inPlayer, entvars_t* inInflictor)
// tankefugl: 0000892 -- fixed to allow spawnkilling of crouching players on IP
float theDistanceToPlayer = VectorDistance(inPlayer->pev->origin, theEntity->pev->origin);
float zDistance = inPlayer->pev->origin[2] - theEntity->pev->origin[2];
if(theDistanceToPlayer < 30 || (theDistanceToPlayer < 40 && zDistance > 0 && zDistance < 40))
float xyDistance = VectorDistance2D(inPlayer->pev->origin, theEntity->pev->origin);
if(theDistanceToPlayer < 30 || (xyDistance < 30 && zDistance > 0 && zDistance < 40))
{
theEntity->TakeDamage(inInflictor, theEntity->pev, 10000, DMG_GENERIC);
}