[refac] Stop using WarpLocation for coordinates and introduce a Vec3

This commit is contained in:
gsemaj
2021-05-01 11:04:28 -04:00
committed by Gent Semaj
parent a0e758f5b7
commit e546d3948c
6 changed files with 51 additions and 47 deletions

View File

@@ -127,7 +127,7 @@ static void mssCommand(std::string full, std::vector<std::string>& args, CNSocke
}
// get the route (if it doesn't exist yet, this will also make it)
std::vector<WarpLocation>* route = &TableData::RunningSkywayRoutes[routeNum];
std::vector<Vec3>* route = &TableData::RunningSkywayRoutes[routeNum];
// mss <route> add <height>
if (args[2] == "add") {
@@ -158,7 +158,7 @@ static void mssCommand(std::string full, std::vector<std::string>& args, CNSocke
return;
}
WarpLocation pulled = route->back();
Vec3 pulled = route->back();
route->pop_back(); // remove point at top of stack
Chat::sendServerMessage(sock, "[MSS] Removed point (" + std::to_string(pulled.x) + ", " + std::to_string(pulled.y) + ", " + std::to_string(pulled.z) + ") from route " + std::to_string(routeNum));
return;
@@ -171,7 +171,7 @@ static void mssCommand(std::string full, std::vector<std::string>& args, CNSocke
return;
}
WarpLocation pulled = route->back();
Vec3 pulled = route->back();
PlayerManager::sendPlayerTo(sock, pulled.x, pulled.y, pulled.z);
return;
}
@@ -190,7 +190,7 @@ static void mssCommand(std::string full, std::vector<std::string>& args, CNSocke
return;
}
WarpLocation pulled = route->front();
Vec3 pulled = route->front();
PlayerManager::sendPlayerTo(sock, pulled.x, pulled.y, pulled.z);
Transport::testMssRoute(sock, route);
return;