hedgewars/uScript.pas
changeset 11520 663ecfb05df6
parent 11515 4dd77731453b
child 11532 bf86c6cb9341
--- a/hedgewars/uScript.pas	Sat Jan 23 07:53:57 2016 +0100
+++ b/hedgewars/uScript.pas	Sat Jan 23 08:11:14 2016 +0100
@@ -440,6 +440,20 @@
     lc_setweapon:= 0;
 end;
 
+// enable/disable cinematic effects
+function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl;
+var at: LongInt;
+const
+    call = 'SetCinematicMode';
+    params = 'enable';
+begin
+    if (CheckLuaParamCount(L, 1, call, params)) then
+        begin
+        CinematicScript:= lua_toboolean(L, 1);
+        end;
+    lc_setcinematicmode:= 0;
+end;
+
 // no parameter means reset to default (and 0 means unlimited)
 function lc_setmaxbuilddistance(L : Plua_State) : LongInt; Cdecl;
 var np: LongInt;
@@ -3340,6 +3354,7 @@
 lua_register(luaState, _P'SetWaterLine', @lc_setwaterline);
 lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon);
 lua_register(luaState, _P'SetWeapon', @lc_setweapon);
+lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode);
 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance);
 // drawn map functions
 lua_register(luaState, _P'AddPoint', @lc_addPoint);