2741 lua_pushstring(L, PChar(trammo[Ammoz[TAmmoType(at)].NameId])); |
2741 lua_pushstring(L, PChar(trammo[Ammoz[TAmmoType(at)].NameId])); |
2742 end |
2742 end |
2743 else |
2743 else |
2744 lua_pushnil(L); |
2744 lua_pushnil(L); |
2745 lc_getammoname:= 1; |
2745 lc_getammoname:= 1; |
|
2746 end; |
|
2747 |
|
2748 function lc_setvampiric(L : Plua_state) : LongInt; Cdecl; |
|
2749 begin |
|
2750 if CheckLuaParamCount(L, 1, 'SetVampiric', 'bool') then |
|
2751 cVampiric := lua_toboolean(L, 1); |
|
2752 lc_setvampiric := 0; |
|
2753 end; |
|
2754 |
|
2755 function lc_setlasersight(L : Plua_state) : LongInt; Cdecl; |
|
2756 begin |
|
2757 if CheckLuaParamCount(L, 1, 'SetLaserSight', 'bool') then |
|
2758 cLaserSighting:= lua_toboolean(L, 1); |
|
2759 lc_setlasersight:= 0; |
2746 end; |
2760 end; |
2747 |
2761 |
2748 function lc_startghostpoints(L : Plua_State) : LongInt; Cdecl; |
2762 function lc_startghostpoints(L : Plua_State) : LongInt; Cdecl; |
2749 begin |
2763 begin |
2750 if CheckLuaParamCount(L, 1, 'StartGhostPoints', 'count') then |
2764 if CheckLuaParamCount(L, 1, 'StartGhostPoints', 'count') then |
3675 lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon); |
3689 lua_register(luaState, _P'SetNextWeapon', @lc_setnextweapon); |
3676 lua_register(luaState, _P'SetWeapon', @lc_setweapon); |
3690 lua_register(luaState, _P'SetWeapon', @lc_setweapon); |
3677 lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode); |
3691 lua_register(luaState, _P'SetCinematicMode', @lc_setcinematicmode); |
3678 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance); |
3692 lua_register(luaState, _P'SetMaxBuildDistance', @lc_setmaxbuilddistance); |
3679 lua_register(luaState, _P'GetAmmoName', @lc_getammoname); |
3693 lua_register(luaState, _P'GetAmmoName', @lc_getammoname); |
|
3694 lua_register(luaState, _P'SetVampiric', @lc_setvampiric); |
|
3695 lua_register(luaState, _P'SetLaserSight', @lc_setlasersight); |
3680 // drawn map functions |
3696 // drawn map functions |
3681 lua_register(luaState, _P'AddPoint', @lc_addPoint); |
3697 lua_register(luaState, _P'AddPoint', @lc_addPoint); |
3682 lua_register(luaState, _P'FlushPoints', @lc_flushPoints); |
3698 lua_register(luaState, _P'FlushPoints', @lc_flushPoints); |
3683 |
3699 |
3684 lua_register(luaState, _P'SetGearAIHints', @lc_setgearaihints); |
3700 lua_register(luaState, _P'SetGearAIHints', @lc_setgearaihints); |