hedgewars/uScript.pas
branchwebgl
changeset 8833 c13ebed437cb
parent 8444 75db7bb8dce8
parent 8473 555235e90010
child 9127 e350500c4edb
equal deleted inserted replaced
8450:404ddce27b23 8833:c13ebed437cb
  1278     lc_settag:= 0
  1278     lc_settag:= 0
  1279 end;
  1279 end;
  1280 
  1280 
  1281 function lc_endgame(L : Plua_State) : LongInt; Cdecl;
  1281 function lc_endgame(L : Plua_State) : LongInt; Cdecl;
  1282 begin
  1282 begin
  1283    {$IFNDEF PAS2C}
       
  1284     L:= L; // avoid compiler hint
  1283     L:= L; // avoid compiler hint
  1285    {$ENDIF}
  1284     AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000);
  1286     GameState:= gsExit;
       
  1287     lc_endgame:= 0
  1285     lc_endgame:= 0
  1288 end;
  1286 end;
  1289 
  1287 
  1290 function lc_findplace(L : Plua_State) : LongInt; Cdecl;
  1288 function lc_findplace(L : Plua_State) : LongInt; Cdecl;
  1291 var gear: PGear;
  1289 var gear: PGear;
  2046 
  2044 
  2047 procedure SetGlobals;
  2045 procedure SetGlobals;
  2048 begin
  2046 begin
  2049 ScriptSetInteger('TurnTimeLeft', TurnTimeLeft);
  2047 ScriptSetInteger('TurnTimeLeft', TurnTimeLeft);
  2050 ScriptSetInteger('GameTime', GameTicks);
  2048 ScriptSetInteger('GameTime', GameTicks);
  2051 ScriptSetInteger('RealTime', RealTicks);
       
  2052 ScriptSetInteger('TotalRounds', TotalRounds);
  2049 ScriptSetInteger('TotalRounds', TotalRounds);
  2053 ScriptSetInteger('WaterLine', cWaterLine);
  2050 ScriptSetInteger('WaterLine', cWaterLine);
  2054 if GameTicks = 0 then
  2051 if GameTicks = 0 then
  2055     begin
  2052     begin
  2056     ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
  2053     ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);