436 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
436 at:= LuaToAmmoTypeOrd(L, 1, call, params); |
437 if at >= 0 then |
437 if at >= 0 then |
438 ParseCommand('setweap ' + char(at), true, true); |
438 ParseCommand('setweap ' + char(at), true, true); |
439 end; |
439 end; |
440 lc_setweapon:= 0; |
440 lc_setweapon:= 0; |
|
441 end; |
|
442 |
|
443 // enable/disable cinematic effects |
|
444 function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl; |
|
445 var at: LongInt; |
|
446 const |
|
447 call = 'SetCinematicMode'; |
|
448 params = 'enable'; |
|
449 begin |
|
450 if (CheckLuaParamCount(L, 1, call, params)) then |
|
451 begin |
|
452 CinematicScript:= lua_toboolean(L, 1); |
|
453 end; |
|
454 lc_setcinematicmode:= 0; |
441 end; |
455 end; |
442 |
456 |
443 // no parameter means reset to default (and 0 means unlimited) |
457 // no parameter means reset to default (and 0 means unlimited) |
444 function lc_setmaxbuilddistance(L : Plua_State) : LongInt; Cdecl; |
458 function lc_setmaxbuilddistance(L : Plua_State) : LongInt; Cdecl; |
445 var np: LongInt; |
459 var np: LongInt; |
3338 lua_register(luaState, _P'GetGravity', @lc_getgravity); |
3352 lua_register(luaState, _P'GetGravity', @lc_getgravity); |
3339 lua_register(luaState, _P'SetGravity', @lc_setgravity); |
3353 lua_register(luaState, _P'SetGravity', @lc_setgravity); |
3340 lua_register(luaState, _P'SetWaterLine', @lc_setwaterline); |
3354 lua_register(luaState, _P'SetWaterLine', @lc_setwaterline); |
3341 lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon); |
3355 lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon); |
3342 lua_register(luaState, _P'SetWeapon', @lc_setweapon); |
3356 lua_register(luaState, _P'SetWeapon', @lc_setweapon); |
|
3357 lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode); |
3343 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance); |
3358 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance); |
3344 // drawn map functions |
3359 // drawn map functions |
3345 lua_register(luaState, _P'AddPoint', @lc_addPoint); |
3360 lua_register(luaState, _P'AddPoint', @lc_addPoint); |
3346 lua_register(luaState, _P'FlushPoints', @lc_flushPoints); |
3361 lua_register(luaState, _P'FlushPoints', @lc_flushPoints); |
3347 |
3362 |