fix map/template override, remove some pointless command calls
authornemo
Wed, 09 Nov 2011 22:21:05 -0500
changeset 6312 658055a3f160
parent 6311 1f7af64d5565
child 6313 12567f6f6f02
fix map/template override, remove some pointless command calls
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Wed Nov 09 18:40:12 2011 +0300
+++ b/hedgewars/uScript.pas	Wed Nov 09 22:21:05 2011 -0500
@@ -1624,23 +1624,24 @@
 
 // pop game variables
 ParseCommand('seed ' + ScriptGetString('Seed'), true);
-ParseCommand('template_filter ' + IntToStr(ScriptGetInteger('TemplateFilter')), true);
-ParseCommand('mapgen ' + IntToStr(ScriptGetInteger('MapGen')), true);
-ParseCommand('$gmflags ' + ScriptGetString('GameFlags'), true);
-ParseCommand('$turntime ' + ScriptGetString('TurnTime'), true);
-ParseCommand('$casefreq ' + ScriptGetString('CaseFreq'), true);
-ParseCommand('$healthprob ' + ScriptGetString('HealthCaseProb'), true);
-ParseCommand('$hcaseamount ' + ScriptGetString('HealthCaseAmount'), true);
-ParseCommand('$damagepct ' + ScriptGetString('DamagePercent'), true);
-ParseCommand('$minesnum ' + ScriptGetString('MinesNum'), true);
-ParseCommand('$minestime ' + ScriptGetString('MinesTime'), true);
-ParseCommand('$minedudpct ' + ScriptGetString('MineDudPercent'), true);
-ParseCommand('$explosives ' + ScriptGetString('Explosives'), true);
-ParseCommand('$delay ' + ScriptGetString('Delay'), true);
-ParseCommand('$ready ' + ScriptGetString('Ready'), true);
-ParseCommand('$sd_turns ' + ScriptGetString('SuddenDeathTurns'), true);
-ParseCommand('$waterrise ' + ScriptGetString('WaterRise'), true);
-ParseCommand('$healthdec ' + ScriptGetString('HealthDecrease'), true);
+cTemplateFilter  := ScriptGetInteger('TemplateFilter');
+cMapGen          := ScriptGetInteger('MapGen');
+GameFlags        := ScriptGetInteger('GameFlags');
+cHedgehogTurnTime:= ScriptGetInteger('TurnTime');
+cCaseFactor      := ScriptGetInteger('CaseFreq');
+cHealthCaseProb  := ScriptGetInteger('HealthCaseProb');
+cHealthCaseAmount:= ScriptGetInteger('HealthCaseAmount');
+cDamagePercent   := ScriptGetInteger('DamagePercent');
+cLandMines       := ScriptGetInteger('MinesNum');
+cMinesTime       := ScriptGetInteger('MinesTime');
+cMineDudPercent  := ScriptGetInteger('MineDudPercent');
+cExplosives      := ScriptGetInteger('Explosives');
+cInactDelay      := ScriptGetInteger('Delay');
+cReadyDelay      := ScriptGetInteger('Ready');
+cSuddenDTurns    := ScriptGetInteger('SuddenDeathTurns');
+cWaterRise       := ScriptGetInteger('WaterRise');
+cHealthDecrease  := ScriptGetInteger('HealthDecrease');
+
 if ScriptGetString('Map') <> '' then
     ParseCommand('map ' + ScriptGetString('Map'), true);
 if ScriptGetString('Theme') <> '' then