--- a/hedgewars/hwengine.pas Tue Jan 14 11:45:52 2014 +0100
+++ b/hedgewars/hwengine.pas Tue Jan 14 22:56:13 2014 +0100
@@ -381,13 +381,20 @@
WriteLnToConsole(msgGettingConfig);
- if recordFileName = '' then
+ if cTestLua then
begin
- InitIPC;
- SendIPCAndWaitReply(_S'C'); // ask for game config
+ ParseCommand('script ' + cScriptName, true);
end
else
- LoadRecordFromFile(recordFileName);
+ begin
+ if recordFileName = '' then
+ begin
+ InitIPC;
+ SendIPCAndWaitReply(_S'C'); // ask for game config
+ end
+ else
+ LoadRecordFromFile(recordFileName);
+ end;
ScriptOnGameInit;
s:= 'eproto ' + inttostr(cNetProtoVersion);