mirror of
https://github.com/unknownworlds/NS.git
synced 2025-02-16 17:01:30 +00:00
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:
parent
b6c429a8b2
commit
88b8f055de
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue