From 1a7dde88d1891bd5d60e51e2d153c3ccad7bc8f5 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 27 Feb 2012 12:16:25 +0000 Subject: [PATCH] Fixed compilation on linux. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10899 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/replay/replay.cpp | 8 +++++--- src/replay/replay.hpp | 11 ++--------- 2 files changed, 7 insertions(+), 12 deletions(-) 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 // ------------------------------------------------------------------------