mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-11 14:09:20 +02:00
introduce new walking ticks when creature has to move but doesnt have anything to follow
This commit is contained in:
parent
0cd1af211e
commit
abed251a30
@ -54,7 +54,7 @@ timeBetweenExActions = 1000
|
|||||||
|
|
||||||
-- Map
|
-- Map
|
||||||
-- NOTE: set mapName WITHOUT .otbm at the end
|
-- NOTE: set mapName WITHOUT .otbm at the end
|
||||||
mapName = "map"
|
mapName = "mymap"
|
||||||
mapAuthor = "CipSoft"
|
mapAuthor = "CipSoft"
|
||||||
|
|
||||||
-- MySQL
|
-- MySQL
|
||||||
|
@ -277,6 +277,13 @@ void Creature::addEventWalk(bool firstStep)
|
|||||||
g_game.checkCreatureWalk(getID());
|
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())));
|
eventWalk = g_scheduler.addEvent(createSchedulerTask(ticks, std::bind(&Game::checkCreatureWalk, &g_game, getID())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user