From 6cd8d1286f48671cd2e782b3a6803d7e951cb0f5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 31 Dec 2009 09:30:39 -0700 Subject: * Re-Fixed GO type 6 and type 8 to use radius for distance calculations instead * of diameter. This will prevent things like people getting burned even though * you aren't touching the fire. --HG-- branch : trunk --- src/game/GameObject.cpp | 2 +- src/game/GridNotifiers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index a6c127321b6..0c86b6af826 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -326,7 +326,7 @@ void GameObject::Update(uint32 /*p_time*/) bool IsBattleGroundTrap = false; //FIXME: this is activation radius (in different casting radius that must be selected from spell data) //TODO: move activated state code (cast itself) to GO_ACTIVATED, in this place only check activating and set state - float radius = goInfo->trap.radius; + float radius = (goInfo->trap.radius)/2; // TODO rename radius to diameter (goInfo->trap.radius) should be (goInfo->trap.diameter) if(!radius) { if(goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call) diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index d728245791c..f5d7b988fca 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -671,7 +671,7 @@ namespace Trinity if(go->GetGOInfo()->spellFocus.focusId != i_focusId) return false; - float dist = go->GetGOInfo()->spellFocus.dist; + float dist = (go->GetGOInfo()->spellFocus.dist)/2; return go->IsWithinDistInMap(i_unit, dist); } -- cgit v1.2.3