mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
MoveTo while saving guard position no longer hops.
This commit is contained in:
+13
-2
@@ -123,8 +123,6 @@ Mob::Mob(const char* in_name,
|
||||
tar_vector=0;
|
||||
currently_fleeing = false;
|
||||
|
||||
last_z = 0;
|
||||
|
||||
last_major_update_position = m_Position;
|
||||
|
||||
AI_Init();
|
||||
@@ -3439,6 +3437,19 @@ void Mob::SetTarget(Mob* mob) {
|
||||
this->GetTarget()->SendHPUpdate(false, true);
|
||||
}
|
||||
|
||||
// For when we want a Ground Z at a location we are not at yet
|
||||
// Like MoveTo.
|
||||
float Mob::FindDestGroundZ(glm::vec3 dest, float z_offset)
|
||||
{
|
||||
float best_z = BEST_Z_INVALID;
|
||||
if (zone->zonemap != nullptr)
|
||||
{
|
||||
dest.z += z_offset;
|
||||
best_z = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
}
|
||||
return best_z;
|
||||
}
|
||||
|
||||
float Mob::FindGroundZ(float new_x, float new_y, float z_offset)
|
||||
{
|
||||
float ret = BEST_Z_INVALID;
|
||||
|
||||
Reference in New Issue
Block a user