diff --git a/game_root.cpp b/game_root.cpp index 22b5143..3d87f07 100644 --- a/game_root.cpp +++ b/game_root.cpp @@ -138,6 +138,14 @@ void GameRoot::set_game_mode(Ref prototype) { } while(new_player_id != 0); } +Ref GameRoot::get_game_mode() const { + return this->game_mode; +} + +Ref GameRoot::get_game_state() const { + return this->game_mode->get_game_state(); +} + IPlayer *GameRoot::spawn_player(uint32_t id) { UtilityFunctions::push_error("GameRoot::spawn_player not implemented"); return nullptr; diff --git a/game_root.hpp b/game_root.hpp index e34bba0..84c7243 100644 --- a/game_root.hpp +++ b/game_root.hpp @@ -45,6 +45,8 @@ public: // override the current gamemode // force-respawns all players void set_game_mode(Ref prototype); + Ref get_game_mode() const; + Ref get_game_state() const; protected: // attempt to make 'this' the current singleton instance void grab_singleton();