diff --git a/src/karts/controller/controller.hpp b/src/karts/controller/controller.hpp index 5251592f1..eecfb12df 100644 --- a/src/karts/controller/controller.hpp +++ b/src/karts/controller/controller.hpp @@ -1,4 +1,4 @@ -// $Id$ + // $Id$ // // SuperTuxKart - a fun racing game with go-kart // Copyright (C) 2010 Joerg Henrichs @@ -23,12 +23,12 @@ #include "irrlicht.h" using namespace irr; +#include "input/input.hpp" #include "karts/controller/kart_control.hpp" #include "states_screens/state_manager.hpp" class Kart; class Item; -enum PlayerAction; /** This is the base class for kart controller - that can be a player * or a a robot. @@ -64,7 +64,7 @@ public: virtual bool isPlayerController () const {return false;} virtual bool isNetworkController() const {return false;} /** Default: ignore actions. Only PlayerController get them. */ - virtual void action (const PlayerAction &action, int value) {} + virtual void action (PlayerAction action, int value) {} virtual const irr::core::stringw& getNamePostfix() const; }; // Controller diff --git a/src/karts/controller/end_controller.cpp b/src/karts/controller/end_controller.cpp index 7527d4c15..15454e701 100644 --- a/src/karts/controller/end_controller.cpp +++ b/src/karts/controller/end_controller.cpp @@ -138,7 +138,7 @@ void EndController::reset() //----------------------------------------------------------------------------- /** The end controller must forward 'fire' presses to the race gui. */ -void EndController::action(const PlayerAction &action, int value) +void EndController::action(PlayerAction action, int value) { if(action!=PA_FIRE) return; RaceResultGUI *race_result_gui = dynamic_cast(World::getWorld()->getRaceGUI()); diff --git a/src/karts/controller/end_controller.hpp b/src/karts/controller/end_controller.hpp index bec8d9128..fc7c071b1 100644 --- a/src/karts/controller/end_controller.hpp +++ b/src/karts/controller/end_controller.hpp @@ -83,7 +83,7 @@ public: * controller. This way e.g. highscores can still be assigned * to the right player. */ virtual bool isPlayerController () const {return m_player!=NULL;} - virtual void action (const PlayerAction &action, int value); + virtual void action (PlayerAction action, int value); }; // EndKart diff --git a/src/karts/controller/player_controller.cpp b/src/karts/controller/player_controller.cpp index 7dda7a2f9..4325db587 100644 --- a/src/karts/controller/player_controller.cpp +++ b/src/karts/controller/player_controller.cpp @@ -113,7 +113,7 @@ void PlayerController::resetInputState() * and if it's 0 it indicates that the corresponding button * was released. */ -void PlayerController::action(const PlayerAction &action, int value) +void PlayerController::action(PlayerAction action, int value) { switch (action) { diff --git a/src/karts/controller/player_controller.hpp b/src/karts/controller/player_controller.hpp index c22697c81..326f0b026 100644 --- a/src/karts/controller/player_controller.hpp +++ b/src/karts/controller/player_controller.hpp @@ -51,7 +51,7 @@ public: unsigned int player_index); ~PlayerController (); void update (float); - void action (const PlayerAction &action, int value); + void action (PlayerAction action, int value); void handleZipper (); void collectedItem (const Item &item, int add_info=-1, float previous_energy=0);