mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
Fix for bots disappearing while idle (update)
This commit is contained in:
+11
-17
@@ -2013,12 +2013,20 @@ bool Bot::Process() {
|
||||
if(GetAppearance() == eaDead && GetHP() > 0)
|
||||
SetAppearance(eaStanding);
|
||||
|
||||
if (IsMoving()) {
|
||||
ping_timer.Disable();
|
||||
}
|
||||
else {
|
||||
if (!ping_timer.Enabled())
|
||||
ping_timer.Start(BOT_KEEP_ALIVE_INTERVAL);
|
||||
|
||||
if (ping_timer.Check())
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
}
|
||||
|
||||
if (IsStunned() || IsMezzed())
|
||||
return true;
|
||||
|
||||
if (!IsMoving() && ping_timer.Check())
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
|
||||
// Bot AI
|
||||
AI_Process();
|
||||
return true;
|
||||
@@ -9082,18 +9090,4 @@ std::string Bot::CreateSayLink(Client* c, const char* message, const char* name)
|
||||
return saylink;
|
||||
}
|
||||
|
||||
void Bot::StopMoving() {
|
||||
if (!ping_timer.Enabled())
|
||||
ping_timer.Start(8000);
|
||||
|
||||
Mob::StopMoving();
|
||||
}
|
||||
|
||||
void Bot::StopMoving(float new_heading) {
|
||||
if (!ping_timer.Enabled())
|
||||
ping_timer.Start(8000);
|
||||
|
||||
Mob::StopMoving(new_heading);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user