mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-22 04:31:14 +00:00
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:
parent
3f0bf58255
commit
27ced477a6
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue