Mantis 0000892:

o Fixed a bug where a crouching player on an IP would not be killed.

Extended the range the spawn damage is applied for, roughly 10 units downwards.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@217 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-06-27 16:52:33 +00:00
parent 3f0bf58255
commit 27ced477a6

View file

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