aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r--src/game/Map.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 8a05d4d8380..f0fdbd346df 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -1271,22 +1271,22 @@ float Map::GetHeight(float x, float y, float z, bool pUseVmaps) const
float Map::GetVmapHeight(float x, float y, float z, bool useMaps) const
{
- float mapHeight;
- float vmapHeight;
- if (useMaps)
- {
- mapHeight = GetHeight(x, y, z, false);
- if (fabs(mapHeight - z) < 0.1)
- return mapHeight;
- }
- else
- mapHeight = INVALID_HEIGHT;
- VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager();
- if (vmgr->isLineOfSightCalcEnabled())
- bool result = vmgr->getObjectHitPos(GetId(), x, y, z + 2.0f, x, y, mapHeight, x, y, vmapHeight, 0);
- else
- return INVALID_HEIGHT;
- return vmapHeight;
+ float mapHeight;
+ float vmapHeight;
+ if (useMaps)
+ {
+ mapHeight = GetHeight(x, y, z, false);
+ if (fabs(mapHeight - z) < 0.1)
+ return mapHeight;
+ }
+ else
+ mapHeight = INVALID_HEIGHT;
+ VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager();
+ if (vmgr->isLineOfSightCalcEnabled())
+ bool result = vmgr->getObjectHitPos(GetId(), x, y, z + 2.0f, x, y, mapHeight, x, y, vmapHeight, 0);
+ else
+ return INVALID_HEIGHT;
+ return vmapHeight;
}
uint16 Map::GetAreaFlag(float x, float y, float z) const
@@ -1781,7 +1781,7 @@ bool InstanceMap::CanEnter(Player *player)
// cannot enter while players in the instance are in combat
Group *pGroup = player->GetGroup();
- if(!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId())
+ if(!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())
{
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
return false;