mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Fix ninjago crashes (#837)
Fixed reading speed from rail paths Made the config of rail paths be read in sanely due to not having a type Fixes #835
This commit is contained in:
parent
37524af549
commit
3fa6ea4cea
@ -504,6 +504,8 @@ void Zone::LoadPath(std::istream& file) {
|
||||
BinaryIO::BinaryRead(file, waypoint.racing.planeWidth);
|
||||
BinaryIO::BinaryRead(file, waypoint.racing.planeHeight);
|
||||
BinaryIO::BinaryRead(file, waypoint.racing.shortestDistanceToEnd);
|
||||
} else if (path.pathType == PathType::Rail) {
|
||||
if (path.pathVersion > 16) BinaryIO::BinaryRead(file, waypoint.rail.speed);
|
||||
}
|
||||
|
||||
// object LDF configs
|
||||
@ -529,7 +531,7 @@ void Zone::LoadPath(std::istream& file) {
|
||||
}
|
||||
|
||||
LDFBaseData* ldfConfig = nullptr;
|
||||
if (path.pathType == PathType::Movement) {
|
||||
if (path.pathType == PathType::Movement || path.pathType == PathType::Rail) {
|
||||
ldfConfig = LDFBaseData::DataFromString(parameter + "=0:" + value);
|
||||
} else {
|
||||
ldfConfig = LDFBaseData::DataFromString(parameter + "=" + value);
|
||||
|
@ -75,7 +75,6 @@ struct RacingPathWaypoint {
|
||||
|
||||
struct RailPathWaypoint {
|
||||
float speed;
|
||||
std::vector<LDFBaseData*> config;
|
||||
};
|
||||
|
||||
struct PathWaypoint {
|
||||
|
Loading…
Reference in New Issue
Block a user