mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
f5e40a5fda
commit
f67d89f109
43 changed files with 1254 additions and 1128 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue