From 88b8f055deb3b0e66438ba55dbd08e09406d2588 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Mon, 1 Aug 2005 15:49:22 +0000 Subject: [PATCH] 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 --- releases/3.1/source/mod/AvHServerUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/3.1/source/mod/AvHServerUtil.cpp b/releases/3.1/source/mod/AvHServerUtil.cpp index 37a4dc04..a5049456 100644 --- a/releases/3.1/source/mod/AvHServerUtil.cpp +++ b/releases/3.1/source/mod/AvHServerUtil.cpp @@ -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); }