diff options
| author | Marius "Teelevision" Neugebauer <marius@teele.eu> | 2014-05-07 19:02:55 +0200 |
|---|---|---|
| committer | Marius "Teelevision" Neugebauer <marius@teele.eu> | 2014-05-07 19:02:55 +0200 |
| commit | 25c71282cf26948001a9d01678f97ccc07ae138e (patch) | |
| tree | d3dfad81f217e4111ad32f1752def4ba23775289 /src/game/server/entities | |
| parent | b03f30f8b472aaede4ca4923ab55419890e433c7 (diff) | |
| download | zcatch-25c71282cf26948001a9d01678f97ccc07ae138e.tar.gz zcatch-25c71282cf26948001a9d01678f97ccc07ae138e.zip | |
improved spam protection (now you can kill everyone you have on hook)
Diffstat (limited to 'src/game/server/entities')
| -rw-r--r-- | src/game/server/entities/character.cpp | 4 | ||||
| -rw-r--r-- | src/game/server/entities/projectile.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 03e409cd..2c1828da 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -489,7 +489,9 @@ void CCharacter::FireWeapon() CNetObj_Projectile p; pProj->FillInfo(&p); - pProj->SetCharactersNearby(); + pProj->InitAffectedCharacters(); + if(m_Core.m_HookedPlayer >= 0) + pProj->SetAffectedCharacter(m_Core.m_HookedPlayer); CMsgPacker Msg(NETMSGTYPE_SV_EXTRAPROJECTILE); Msg.AddInt(1); diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index d9654a58..3901d50a 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -73,7 +73,7 @@ void CProjectile::Tick() GameServer()->CreateSound(CurPos, m_SoundImpact); if(m_Explosive) - GameServer()->CreateExplosion(CurPos, m_Owner, m_Weapon, false, m_CharactersNearbyInitialized, m_CharactersNearby); + GameServer()->CreateExplosion(CurPos, m_Owner, m_Weapon, false, m_AffectedCharactersInitialized, m_AffectedCharacters); else if(TargetChr) TargetChr->TakeDamage(m_Direction * max(0.001f, m_Force), m_Damage, m_Owner, m_Weapon); |