[10727] Map system re-engineered. Special thanks to Blueboy for tests.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2010-11-16 21:07:58 +02:00
parent f5e40a5fda
commit f67d89f109
43 changed files with 1254 additions and 1128 deletions

View file

@ -1237,7 +1237,7 @@ bool Creature::LoadFromDB(uint32 guidlow, Map *map)
m_deathState = DEAD;
if(CanFly())
{
float tz = GetMap()->GetHeight(data->posX, data->posY, data->posZ, false);
float tz = GetTerrain()->GetHeight(data->posX, data->posY, data->posZ, false);
if(data->posZ - tz > 0.1)
Relocate(data->posX, data->posY, tz);
}
@ -1427,7 +1427,7 @@ bool Creature::FallGround()
return false;
// use larger distance for vmap height search than in most other cases
float tz = GetMap()->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true, MAX_FALL_DISTANCE);
float tz = GetTerrain()->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz < INVALID_HEIGHT)
{