Some changes to fixz while pathing

This commit is contained in:
KimLS
2018-11-29 23:11:39 -08:00
parent 1654dd6baf
commit dacbce1c5f
9 changed files with 44 additions and 62 deletions
+1 -19
View File
@@ -112,8 +112,6 @@ Mob::Mob(const char* in_name,
tmHidden(-1),
mitigation_ac(0),
m_specialattacks(eSpecialAttacks::None),
fix_z_timer(300),
fix_z_timer_engaged(100),
attack_anim_timer(1000),
position_update_melee_push_timer(500),
hate_list_cleanup_timer(6000)
@@ -3426,7 +3424,7 @@ float Mob::FindDestGroundZ(glm::vec3 dest, float z_offset)
if (zone->zonemap != nullptr)
{
dest.z += z_offset;
best_z = zone->zonemap->FindBestZ(dest, nullptr);
best_z = zone->zonemap->FindClosestZ(dest, nullptr);
}
return best_z;
}
@@ -6003,22 +6001,6 @@ float Mob::GetDefaultRaceSize() const {
return GetRaceGenderDefaultHeight(race, gender);
}
void Mob::TryFixZ(int32 z_find_offset, bool fix_client_z)
{
if (fix_z_timer.Check() && flymode != GravityBehavior::Flying) {
auto watermap = zone->watermap;
if (watermap) {
if (!watermap->InLiquid(m_Position)) {
FixZ();
}
}
else {
FixZ();
}
}
}
#ifdef BOTS
bool Mob::JoinHealRotationTargetPool(std::shared_ptr<HealRotation>* heal_rotation)
{