fix(Core/Creature): Reduce z offset for automated spawn correction (#18153)
- this is necessary to correctly spawn creatures within small defines - 0.42f is as good as 1.0f to detect and correct reasonable z errors in DB spawn data
This commit is contained in:
parent
7ec2585cc8
commit
96d8d1d89a
1 changed files with 2 additions and 2 deletions
|
|
@ -1669,8 +1669,8 @@ bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool ad
|
|||
// xinef: fix from db
|
||||
if ((addToMap || gridLoad) && !data->overwrittenZ)
|
||||
{
|
||||
float tz = map->GetHeight(data->posX, data->posY, data->posZ + 1.0f, true);
|
||||
if (tz >= data->posZ && tz - data->posZ <= 1.0f)
|
||||
float tz = map->GetHeight(data->posX, data->posY, data->posZ + 0.42f, true);
|
||||
if (tz >= data->posZ && tz - data->posZ <= 0.42f)
|
||||
const_cast<CreatureData*>(data)->posZ = tz + 0.1f;
|
||||
|
||||
const_cast<CreatureData*>(data)->overwrittenZ = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue