summaryrefslogtreecommitdiff
path: root/src/gui/game/GameController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/game/GameController.cpp')
-rw-r--r--src/gui/game/GameController.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
index ed1a866..d7b808b 100644
--- a/src/gui/game/GameController.cpp
+++ b/src/gui/game/GameController.cpp
@@ -145,8 +145,12 @@ GameController::GameController():
gameView->AttachController(this);
gameModel->AddObserver(gameView);
- commandInterface = new LuaScriptInterface(this, gameModel);//new TPTScriptInterface();
+#ifdef LUACONSOLE
+ commandInterface = new LuaScriptInterface(this, gameModel);
((LuaScriptInterface*)commandInterface)->SetWindow(gameView);
+#else
+ commandInterface = new TPTScriptInterface(this, gameModel);
+#endif
commandInterface->OnBrushChanged(gameModel->GetBrushID(), gameModel->GetBrush()->GetRadius().X, gameModel->GetBrush()->GetRadius().X);
ActiveToolChanged(0, gameModel->GetActiveTool(0));
@@ -706,7 +710,9 @@ void GameController::Tick()
{
if(firstTick)
{
+#ifdef LUACONSOLE
((LuaScriptInterface*)commandInterface)->Init();
+#endif
if(!Client::Ref().GetPrefBool("InstallCheck", false))
{
Client::Ref().SetPref("InstallCheck", true);