mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 21:20:04 +00:00
Added /path here
This commit is contained in:
parent
ebd3b7b75a
commit
0ccc66208d
@ -947,7 +947,7 @@ static void pathCommand(std::string full, std::vector<std::string>& args, CNSock
|
||||
|
||||
if (args.size() < 2) {
|
||||
Chat::sendServerMessage(sock, "[PATH] Too few arguments");
|
||||
Chat::sendServerMessage(sock, "[PATH] Usage: /path <start/kf/undo/test/cancel/end>");
|
||||
Chat::sendServerMessage(sock, "[PATH] Usage: /path <start/kf/undo/here/test/cancel/end>");
|
||||
goto update;
|
||||
}
|
||||
|
||||
@ -956,7 +956,7 @@ static void pathCommand(std::string full, std::vector<std::string>& args, CNSock
|
||||
// make sure the player doesn't have a follower
|
||||
if (TableData::RunningNPCPaths.find(plr->iID) != TableData::RunningNPCPaths.end()) {
|
||||
Chat::sendServerMessage(sock, "[PATH] An NPC is already following you");
|
||||
Chat::sendServerMessage(sock, "[PATH] Run '/path end <endType>' first, if you're done");
|
||||
Chat::sendServerMessage(sock, "[PATH] Run '/path end' first, if you're done");
|
||||
goto update;
|
||||
}
|
||||
|
||||
@ -994,6 +994,17 @@ static void pathCommand(std::string full, std::vector<std::string>& args, CNSock
|
||||
goto update;
|
||||
}
|
||||
|
||||
// /path here
|
||||
if (args[1] == "here") {
|
||||
// bring the NPC to where the player is standing
|
||||
Transport::NPCQueues.erase(npc->appearanceData.iNPC_ID); // delete transport queue
|
||||
NPCManager::updateNPCPosition(npc->appearanceData.iNPC_ID, plr->x, plr->y, plr->z, npc->instanceID, 0);
|
||||
npc->disappearFromViewOf(sock);
|
||||
npc->enterIntoViewOf(sock);
|
||||
Chat::sendServerMessage(sock, "[PATH] Come here");
|
||||
goto update;
|
||||
}
|
||||
|
||||
// /path undo
|
||||
if (args[1] == "undo") {
|
||||
if (entry->second.size() == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user