Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarLuaComponents.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/scripting/StarLuaComponents.hpp')
-rw-r--r--source/game/scripting/StarLuaComponents.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/game/scripting/StarLuaComponents.hpp b/source/game/scripting/StarLuaComponents.hpp
index f370679..ac18106 100644
--- a/source/game/scripting/StarLuaComponents.hpp
+++ b/source/game/scripting/StarLuaComponents.hpp
@@ -6,6 +6,7 @@
#include "StarListener.hpp"
#include "StarWorld.hpp"
#include "StarWorldLuaBindings.hpp"
+#include "StarInputLuaBindings.hpp"
namespace Star {
@@ -282,6 +283,11 @@ void LuaWorldComponent<Base>::init(World* world) {
Base::setLuaRoot(world->luaRoot());
Base::addCallbacks("world", LuaBindings::makeWorldCallbacks(world));
+
+ if (world->isClient()) {
+ Base::addCallbacks("input", LuaBindings::makeInputCallbacks());
+ }
+
Base::init();
}
@@ -289,6 +295,8 @@ template <typename Base>
void LuaWorldComponent<Base>::uninit() {
Base::uninit();
Base::removeCallbacks("world");
+
+ Base::removeCallbacks("input");
}
template <typename Base>