mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
[Fix] teleport to invalid map or invalid coordinates (x , y , z 200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o ) (#1538)
* MoveSplineInitArgs::Validate: expression 'velocity > 0.01f' failed for GUID Full * Update BotMovementUtils.h * Playerbots: guard against invalid-Z teleports
This commit is contained in:
@@ -1772,7 +1772,8 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector<WorldLocation>&
|
||||
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||
if (botAI)
|
||||
botAI->Reset(true);
|
||||
bot->TeleportTo(loc.GetMapId(), x, y, z, 0);
|
||||
//bot->TeleportTo(loc.GetMapId(), x, y, z, 0);
|
||||
TeleportToSafe(bot, loc.GetMapId(), x, y, z, 0); // [Fix] Avoid silly teleports
|
||||
bot->SendMovementFlagUpdate();
|
||||
|
||||
if (pmo)
|
||||
@@ -3047,7 +3048,8 @@ void RandomPlayerbotMgr::OnPlayerLogin(Player* player)
|
||||
} while (true);
|
||||
}
|
||||
|
||||
player->TeleportTo(botPos);
|
||||
// player->TeleportTo(botPos);
|
||||
TeleportToSafe(player, botPos); // [Fix] Avoid silly teleports
|
||||
|
||||
// player->Relocate(botPos.getX(), botPos.getY(), botPos.getZ(), botPos.getO());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user