mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-21 21:12:24 +00:00
Logs::Pathing to LogPathing
This commit is contained in:
parent
b738f8852d
commit
b4339691f9
@ -1775,7 +1775,7 @@ void NPC::AI_DoMovement() {
|
|||||||
else if (gridno < 0) { // this mob is under quest control
|
else if (gridno < 0) { // this mob is under quest control
|
||||||
if (pause_timer_complete == true) { // time to pause has ended
|
if (pause_timer_complete == true) { // time to pause has ended
|
||||||
SetGrid(0 - GetGrid()); // revert to AI control
|
SetGrid(0 - GetGrid()); // revert to AI control
|
||||||
Log(Logs::Detail, Logs::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid());
|
LogPathing("Quest pathing is finished. Resuming on grid [{}]", GetGrid());
|
||||||
|
|
||||||
SetAppearance(eaStanding, false);
|
SetAppearance(eaStanding, false);
|
||||||
|
|
||||||
@ -1843,10 +1843,10 @@ void NPC::AI_SetupNextWaypoint() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pause_timer_complete = false;
|
pause_timer_complete = false;
|
||||||
Log(Logs::Detail, Logs::Pathing, "We are departing waypoint %d.", cur_wp);
|
LogPathing("We are departing waypoint [{}]", cur_wp);
|
||||||
//if we were under quest control (with no grid), we are done now..
|
//if we were under quest control (with no grid), we are done now..
|
||||||
if (cur_wp == EQEmu::WaypointStatus::QuestControlNoGrid) {
|
if (cur_wp == EQEmu::WaypointStatus::QuestControlNoGrid) {
|
||||||
Log(Logs::Detail, Logs::Pathing, "Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode.");
|
LogPathing("Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode");
|
||||||
roamer = false;
|
roamer = false;
|
||||||
cur_wp = 0;
|
cur_wp = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,7 @@ void NPC::StopWandering()
|
|||||||
roamer = false;
|
roamer = false;
|
||||||
CastToNPC()->SetGrid(0);
|
CastToNPC()->SetGrid(0);
|
||||||
StopNavigation();
|
StopNavigation();
|
||||||
Log(Logs::Detail, Logs::Pathing, "Stop Wandering requested.");
|
LogPathing("Stop Wandering requested");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,11 +123,11 @@ void NPC::ResumeWandering()
|
|||||||
cur_wp = save_wp;
|
cur_wp = save_wp;
|
||||||
UpdateWaypoint(cur_wp); // have him head to last destination from here
|
UpdateWaypoint(cur_wp); // have him head to last destination from here
|
||||||
}
|
}
|
||||||
Log(Logs::Detail, Logs::Pathing, "Resume Wandering requested. Grid %d, wp %d", GetGrid(), cur_wp);
|
LogPathing("Resume Wandering requested. Grid [{}], wp [{}]", GetGrid(), cur_wp);
|
||||||
}
|
}
|
||||||
else if (AI_walking_timer->Enabled())
|
else if (AI_walking_timer->Enabled())
|
||||||
{ // we are at a waypoint paused normally
|
{ // we are at a waypoint paused normally
|
||||||
Log(Logs::Detail, Logs::Pathing, "Resume Wandering on timed pause. Grid %d, wp %d", GetGrid(), cur_wp);
|
LogPathing("Resume Wandering on timed pause. Grid [{}], wp [{}]", GetGrid(), cur_wp);
|
||||||
AI_walking_timer->Trigger(); // disable timer to end pause now
|
AI_walking_timer->Trigger(); // disable timer to end pause now
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -159,7 +159,7 @@ void NPC::PauseWandering(int pausetime)
|
|||||||
if (GetGrid() != 0) {
|
if (GetGrid() != 0) {
|
||||||
moving = false;
|
moving = false;
|
||||||
DistractedFromGrid = true;
|
DistractedFromGrid = true;
|
||||||
Log(Logs::Detail, Logs::Pathing, "Paused Wandering requested. Grid %d. Resuming in %d ms (0=not until told)", GetGrid(), pausetime);
|
LogPathing("Paused Wandering requested. Grid [{}]. Resuming in [{}] ms (0=not until told)", GetGrid(), pausetime);
|
||||||
StopNavigation();
|
StopNavigation();
|
||||||
if (pausetime < 1) { // negative grid number stops him dead in his tracks until ResumeWandering()
|
if (pausetime < 1) { // negative grid number stops him dead in his tracks until ResumeWandering()
|
||||||
SetGrid(0 - GetGrid());
|
SetGrid(0 - GetGrid());
|
||||||
@ -609,7 +609,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) {
|
|||||||
|
|
||||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||||
|
|
||||||
Log(Logs::Moderate, Logs::Pathing, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz, m_Position.x, m_Position.y, m_Position.z);
|
LogPathing("BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz, m_Position.x, m_Position.y, m_Position.z);
|
||||||
|
|
||||||
if ((newz > -2000) && std::abs(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaSendTo)) // Sanity check.
|
if ((newz > -2000) && std::abs(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaSendTo)) // Sanity check.
|
||||||
m_Position.z = newz + 1;
|
m_Position.z = newz + 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user