Fixed speed stuff

Should be tested more.
This commit is contained in:
David Markowitz
2023-08-21 12:33:13 -07:00
parent e3ae0b6304
commit 294efe0fe0
7 changed files with 121 additions and 108 deletions

View File

@@ -491,7 +491,7 @@ void Zone::LoadPath(std::istream& file) {
if (path.pathType == PathType::MovingPlatform) {
BinaryIO::BinaryRead(file, waypoint.movingPlatform.lockPlayer);
BinaryIO::BinaryRead(file, waypoint.movingPlatform.speed);
BinaryIO::BinaryRead(file, waypoint.speed);
BinaryIO::BinaryRead(file, waypoint.movingPlatform.wait);
if (path.pathVersion >= 13) {
uint8_t count1;
@@ -522,7 +522,7 @@ void Zone::LoadPath(std::istream& file) {
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);
if (path.pathVersion > 16) BinaryIO::BinaryRead(file, waypoint.speed);
}
// object LDF configs

View File

@@ -50,7 +50,6 @@ struct SceneTransition {
struct MovingPlatformPathWaypoint {
uint8_t lockPlayer;
float speed;
float wait;
std::string departSound;
std::string arriveSound;
@@ -72,17 +71,13 @@ struct RacingPathWaypoint {
float shortestDistanceToEnd;
};
struct RailPathWaypoint {
float speed;
};
struct PathWaypoint {
NiPoint3 position;
NiQuaternion rotation; // not included in all, but it's more convenient here
MovingPlatformPathWaypoint movingPlatform;
CameraPathWaypoint camera;
RacingPathWaypoint racing;
RailPathWaypoint rail;
float speed = 1.0f;
std::vector<LDFBaseData*> config;
std::vector<WaypointCommand> commands;
};