mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-22 12:00:03 +00:00
Implemented static paths for mobs (like Don Doom and Bad Max).
* Mobs now retreat to where they were when they were roaming; not their spawn point * /toggleai still sends them back to their spawn point however * Fixed a bug where mobs would respawn where they were killed instead of their proper spawn point * Fixed mobs roaming despite simulatemobs being set to false * Updated tdata submodule
This commit is contained in:
@@ -45,7 +45,6 @@ bool runCmd(std::string full, CNSocket* sock) {
|
||||
void helpCommand(std::string full, std::vector<std::string>& args, CNSocket* sock) {
|
||||
ChatManager::sendServerMessage(sock, "Commands available to you");
|
||||
Player *plr = PlayerManager::getPlayer(sock);
|
||||
int i = 1;
|
||||
|
||||
for (auto& cmd : ChatManager::commands) {
|
||||
if (cmd.second.requiredAccLevel >= plr->accountId)
|
||||
@@ -280,6 +279,10 @@ void toggleAiCommand(std::string full, std::vector<std::string>& args, CNSocket*
|
||||
for (auto& pair : MobManager::Mobs) {
|
||||
pair.second->state = MobState::RETREAT;
|
||||
pair.second->target = nullptr;
|
||||
|
||||
pair.second->roamX = pair.second->spawnX;
|
||||
pair.second->roamY = pair.second->spawnY;
|
||||
pair.second->roamZ = pair.second->spawnZ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user