mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-13 22:34:53 +02:00
introduce new walking ticks when creature has to move but doesnt have anything to follow
This commit is contained in:
@@ -277,6 +277,13 @@ void Creature::addEventWalk(bool firstStep)
|
||||
g_game.checkCreatureWalk(getID());
|
||||
}
|
||||
|
||||
if (const Monster* monster = getMonster()) {
|
||||
Creature* creature = monster->getFollowCreature();
|
||||
if (!creature) {
|
||||
ticks = ticks * 1.25;
|
||||
}
|
||||
}
|
||||
|
||||
eventWalk = g_scheduler.addEvent(createSchedulerTask(ticks, std::bind(&Game::checkCreatureWalk, &g_game, getID())));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user