mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 15:00:06 +00:00
[refac] Stylistic changes
This commit is contained in:
parent
438eba4aa8
commit
f58c6b72b3
@ -37,8 +37,7 @@ public:
|
|||||||
/*
|
/*
|
||||||
* Create a full and properly-paced path by interpolating between keyframes.
|
* Create a full and properly-paced path by interpolating between keyframes.
|
||||||
*/
|
*/
|
||||||
static void constructPathSkyway(json::iterator _pathData) {
|
static void constructPathSkyway(json& pathData) {
|
||||||
auto pathData = _pathData.value();
|
|
||||||
// Interpolate
|
// Interpolate
|
||||||
json pathPoints = pathData["points"];
|
json pathPoints = pathData["points"];
|
||||||
std::queue<WarpLocation> points;
|
std::queue<WarpLocation> points;
|
||||||
@ -56,8 +55,7 @@ static void constructPathSkyway(json::iterator _pathData) {
|
|||||||
Transport::SkywayPaths[pathData["iRouteID"]] = points;
|
Transport::SkywayPaths[pathData["iRouteID"]] = points;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void constructPathNPC(json::iterator _pathData, int32_t id=0) {
|
static void constructPathNPC(json& pathData, int32_t id=0) {
|
||||||
auto pathData = _pathData.value();
|
|
||||||
// Interpolate
|
// Interpolate
|
||||||
json pathPoints = pathData["points"];
|
json pathPoints = pathData["points"];
|
||||||
std::queue<WarpLocation> points;
|
std::queue<WarpLocation> points;
|
||||||
@ -277,7 +275,7 @@ static void loadPaths(json& pathData, int32_t* nextId) {
|
|||||||
// skyway paths
|
// skyway paths
|
||||||
json pathDataSkyway = pathData["skyway"];
|
json pathDataSkyway = pathData["skyway"];
|
||||||
for (json::iterator skywayPath = pathDataSkyway.begin(); skywayPath != pathDataSkyway.end(); skywayPath++) {
|
for (json::iterator skywayPath = pathDataSkyway.begin(); skywayPath != pathDataSkyway.end(); skywayPath++) {
|
||||||
constructPathSkyway(skywayPath);
|
constructPathSkyway(*skywayPath);
|
||||||
}
|
}
|
||||||
std::cout << "[INFO] Loaded " << Transport::SkywayPaths.size() << " skyway paths" << std::endl;
|
std::cout << "[INFO] Loaded " << Transport::SkywayPaths.size() << " skyway paths" << std::endl;
|
||||||
|
|
||||||
@ -358,7 +356,7 @@ static void loadPaths(json& pathData, int32_t* nextId) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
constructPathNPC(npcPath, pair.first);
|
constructPathNPC(*npcPath, pair.first);
|
||||||
mob->staticPath = true;
|
mob->staticPath = true;
|
||||||
break; // only one NPC per path
|
break; // only one NPC per path
|
||||||
}
|
}
|
||||||
@ -943,13 +941,7 @@ void TableData::init() {
|
|||||||
int32_t nextId = INT32_MAX; // next dynamic ID to hand out
|
int32_t nextId = INT32_MAX; // next dynamic ID to hand out
|
||||||
|
|
||||||
// base JSON tables
|
// base JSON tables
|
||||||
json xdt;
|
json xdt, paths, drops, eggs, npcs, mobs, gruntwork;
|
||||||
json paths;
|
|
||||||
json drops;
|
|
||||||
json eggs;
|
|
||||||
json npcs;
|
|
||||||
json mobs;
|
|
||||||
json gruntwork;
|
|
||||||
|
|
||||||
// open file streams
|
// open file streams
|
||||||
std::ifstream fXDT(settings::XDTJSON);
|
std::ifstream fXDT(settings::XDTJSON);
|
||||||
|
Loading…
Reference in New Issue
Block a user