diff --git a/src/replay/replay.cpp b/src/replay/replay.cpp index 6a7cc71e3..d03b27ddd 100644 --- a/src/replay/replay.cpp +++ b/src/replay/replay.cpp @@ -18,7 +18,6 @@ #include "replay/replay.hpp" -#include #include "io/file_manager.hpp" #include "modes/world.hpp" @@ -29,6 +28,9 @@ #include "tracks/track.hpp" #include "utils/constants.hpp" +#include +#include + bool Replay::m_do_replay = false; Replay *Replay::m_replay = NULL; @@ -211,7 +213,7 @@ void Replay::Load() fd = fopen(filename.c_str(), "r"); if(!fd) { - printf("Can't read '%', ghost replay disabled.\n", + printf("Can't read '%s', ghost replay disabled.\n", filename.c_str()); m_do_replay = false; initRecording(); @@ -320,7 +322,7 @@ void Replay::Load() // Check for EV_TRANSFORM event: // ----------------------------- - if(sscanf(s, "0 %f %d %f %f %f %f %f %f %f %f\n", + if(sscanf(s, "0 %f %d %f %f %f %f %f %f %f\n", &time, &kart_id, &x, &y, &z, &rx, &ry, &rz, &rw diff --git a/src/replay/replay.hpp b/src/replay/replay.hpp index 2695ee44d..5d46f8fd5 100644 --- a/src/replay/replay.hpp +++ b/src/replay/replay.hpp @@ -22,6 +22,7 @@ #include "LinearMath/btTransform.h" #include "utils/no_copy.hpp" +#include #include class GhostKart; @@ -39,16 +40,8 @@ private: /** Time at which this event happens. */ float m_time; enum {EV_TRANSFORM, EV_NONE} m_type; - union - { - struct - { + struct { btTransform m_t; - }; - struct - { - int m_int_test; int a; int b; - }; } m_event; // union }; // ReplayEvent // ------------------------------------------------------------------------