diff options
Diffstat (limited to 'src/core/gameinterface.cc')
-rw-r--r-- | src/core/gameinterface.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/gameinterface.cc b/src/core/gameinterface.cc index 9aa50fc..1f8f265 100644 --- a/src/core/gameinterface.cc +++ b/src/core/gameinterface.cc @@ -12,11 +12,17 @@ #include "core/cvar.h" #include "core/func.h" #include "core/gameinterface.h" +#include "core/model.h" #include "core/player.h" namespace core { +void func_list_model(std::string const &args) +{ + Model::list(); +} + Player GameInterface::game_localplayer; EntityControlable *localcontrol() @@ -54,10 +60,13 @@ GameInterface::GameInterface() } + core::Func::add("list_model", (core::FuncPtr) func_list_model); } GameInterface::~GameInterface() { + core::Func::remove("list_model"); + clear(); } @@ -87,6 +96,9 @@ void GameInterface::clear() Cvar::registry.erase(it); } } + + // remove all models + Model::clear(); } |