Znalazłem taką funkcję w npc.cpp
Przeniosłem ją do creature.cpp, by móc sobie z niej korzystać, ale zauważyłem, że nie działa w ogóle. Wie może ktoś co jest przyczyną takiego zachowania?
Teoretycznie powinno być dobrze, ale tak nie jest.
PHP:
void Npc::doMoveTo(Position target)
{
std::list<Direction> listDir;
if(!g_game.getPathToEx(this, target, listDir, 1, 1, true, true))
return;
startAutoWalk(listDir);
}
PHP:
void Creature::doMoveTo(Position target)
{
std::list<Direction> listDir;
if(!g_game.getPathToEx(this, target, listDir, 1, 1, true, true, g_config.getNumber(ConfigManager::DEFAULT_DESPAWNRADIUS)))
return;
startAutoWalk(listDir);
}