hedgewars/uCommandHandlers.pas
branchhedgeroid
changeset 6328 d14adf1c7721
parent 6224 42b256eca362
parent 6313 12567f6f6f02
child 6415 af2047bb4f70
--- a/hedgewars/uCommandHandlers.pas	Sat Nov 12 15:48:55 2011 +0100
+++ b/hedgewars/uCommandHandlers.pas	Sat Nov 12 17:06:49 2011 +0100
@@ -130,6 +130,7 @@
 begin
 if s[1]='"' then Delete(s, 1, 1);
 if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+cScriptName:= s;
 ScriptLoad(s)
 end;
 
@@ -457,7 +458,7 @@
     InitStepsFlags:= InitStepsFlags or cifMap
     end;
 
-ScriptLoad(s)
+ScriptLoad('Maps/' + s + '/map.lua')
 end;
 
 procedure chSetTheme(var s: shortstring);
@@ -526,7 +527,7 @@
     else begin
     AddCaption('Auto Camera On', $CCCCCC, capgrpVolume);
     bShowFinger:= true;
-    FollowGear:= CurrentHedgehog^.Gear;
+    if not CurrentHedgehog^.Unplaced then FollowGear:= CurrentHedgehog^.Gear;
     autoCameraOn:= true
     end
 end;
@@ -614,7 +615,7 @@
     RegisterVariable('seed'    , vtCommand, @chSetSeed      , false);
     RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false);
     RegisterVariable('mapgen'  , vtLongInt, @cMapGen        , false);
-    RegisterVariable('maze_size',vtLongInt, @cMazeSize      , false);
+    RegisterVariable('maze_size',vtLongInt, @cTemplateFilter, false);
     RegisterVariable('delay'   , vtLongInt, @cInactDelay    , false);
     RegisterVariable('ready'   , vtLongInt, @cReadyDelay    , false);
     RegisterVariable('casefreq', vtLongInt, @cCaseFactor    , false);