mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-24 12:50:05 +00:00
Minor tweaks.
* The server now refuses to start if any JSONs fail to load * Mobs now take height into account when losing aggro on a player * Mobs now aggro on the closest player in range, rather then on the earliest one to connect to the server of the ones in range * /summonW now works in IZs and Lairs as well * Lowered the extra height that mobs spawn at with /summonW to prevent glitching problems
This commit is contained in:
@@ -50,7 +50,8 @@ void TableData::init() {
|
||||
}
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed NPCs.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed NPCs.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
|
||||
// load everything else from xdttable
|
||||
@@ -176,7 +177,8 @@ void TableData::init() {
|
||||
std::cout << "[INFO] Loaded " << NanoManager::NanoTable.size() << " nanos" << std::endl;
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed xdt.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed xdt.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
|
||||
// load temporary mob dump
|
||||
@@ -203,7 +205,8 @@ void TableData::init() {
|
||||
std::cout << "[INFO] Populated " << NPCManager::NPCs.size() << " NPCs" << std::endl;
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed mobs.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed mobs.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
|
||||
loadDrops();
|
||||
@@ -300,7 +303,8 @@ void TableData::loadPaths(int* nextId) {
|
||||
std::cout << "[INFO] Loaded " << TransportManager::NPCQueues.size() << " NPC paths" << std::endl;
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed paths.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed paths.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +417,8 @@ void TableData::loadDrops() {
|
||||
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed drops.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed drops.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,7 +568,8 @@ void TableData::loadGruntwork(int32_t *nextId) {
|
||||
std::cout << "[INFO] Loaded gruntwork.json" << std::endl;
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
std::cerr << "[WARN] Malformed gruntwork.json file! Reason:" << err.what() << std::endl;
|
||||
std::cerr << "[FATAL] Malformed gruntwork.json file! Reason:" << err.what() << std::endl;
|
||||
terminate(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -623,7 +629,7 @@ void TableData::flush() {
|
||||
mob["iX"] = m->spawnX;
|
||||
mob["iY"] = m->spawnY;
|
||||
mob["iZ"] = m->spawnZ;
|
||||
mob["iMapNum"] = m->instanceID;
|
||||
mob["iMapNum"] = m->instanceID & 0xffffffff;
|
||||
// this is a bit imperfect, since this is a live angle, not a spawn angle so it'll change often, but eh
|
||||
mob["iAngle"] = m->appearanceData.iAngle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user