From 4e6395d6ff9f34edb4dd36dc1f8e845c56b499f4 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 11 Jul 2014 17:27:29 -0700 Subject: For now, removed creator member from Entity Effect for pointer safety --- src/Entities/Pawn.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Entities/Pawn.cpp') diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp index 62f71e20f..840736f6a 100644 --- a/src/Entities/Pawn.cpp +++ b/src/Entities/Pawn.cpp @@ -52,16 +52,17 @@ void cPawn::Tick(float a_Dt, cChunk & a_Chunk) void cPawn::KilledBy(cEntity * a_Killer) { ClearEntityEffects(); + super::KilledBy(a_Killer); } -void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, cPawn * a_Creator, double a_DistanceModifier) +void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier) { // Check if the plugins allow the addition: - if (cPluginManager::Get()->CallHookEntityAddEffect(*this, a_EffectType, a_Duration, a_Intensity, a_Creator, a_DistanceModifier)) + if (cPluginManager::Get()->CallHookEntityAddEffect(*this, a_EffectType, a_Duration, a_Intensity, a_DistanceModifier)) { // A plugin disallows the addition, bail out. return; @@ -74,7 +75,7 @@ void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, s } a_Duration = (int)(a_Duration * a_DistanceModifier); - m_EntityEffects[a_EffectType] = cEntityEffect::CreateEntityEffect(a_EffectType, a_Duration, a_Intensity, a_Creator, a_DistanceModifier); + m_EntityEffects[a_EffectType] = cEntityEffect::CreateEntityEffect(a_EffectType, a_Duration, a_Intensity, a_DistanceModifier); m_World->BroadcastEntityEffect(*this, a_EffectType, a_Intensity, a_Duration); m_EntityEffects[a_EffectType]->OnActivate(*this); } -- cgit v1.2.3