diff --git a/src/xrGame/Level_input.cpp b/src/xrGame/Level_input.cpp index 7da83c0119..94da02fe89 100644 --- a/src/xrGame/Level_input.cpp +++ b/src/xrGame/Level_input.cpp @@ -23,6 +23,12 @@ #include "../Include/xrRender/DebugRender.h" +//Alundaio +#include "pch_script.h" +#include "../../xrScripts/script_engine.h" +using namespace luabind; +//-Alundaio + #ifdef DEBUG # include "ai/monsters/BaseMonster/base_monster.h" @@ -174,6 +180,13 @@ void CLevel::IR_OnKeyboardPress (int key) if ( game && game->OnKeyboardPress(get_binded_action(key)) ) return; + luabind::functor funct; + if (ai().script_engine().functor("level_input.on_key_press", funct)) + { + if (funct(key, _curr)) + return; + } + if(_curr == kQUICK_SAVE && IsGameTypeSingle()) { Console->Execute ("save");