hedgewars/hwengine.pas
changeset 4046 cfdbddc4b385
parent 3976 abaf741a4e21
child 4343 19cbea33e4d2
child 4357 a1fcfc341a52
equal deleted inserted replaced
4045:e3a2a39a8277 4046:cfdbddc4b385
   265     ControllerInit(); // has to happen before InitKbdKeyTable to map keys
   265     ControllerInit(); // has to happen before InitKbdKeyTable to map keys
   266     InitKbdKeyTable();
   266     InitKbdKeyTable();
   267 
   267 
   268     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   268     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   269     if cLocaleFName <> 'en.txt' then
   269     if cLocaleFName <> 'en.txt' then
   270     begin
   270         begin
   271         // Try two letter locale first before trying specific locale overrides
   271         // Try two letter locale first before trying specific locale overrides
   272         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
   272         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
   273             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   273             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   274         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   274         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   275     end;
   275         end;
   276 
   276 
   277     WriteLnToConsole(msgGettingConfig);
   277     WriteLnToConsole(msgGettingConfig);
       
   278 
   278     if recordFileName = '' then
   279     if recordFileName = '' then
   279     begin
   280         begin
   280         InitIPC;
   281         InitIPC;
   281         SendIPCAndWaitReply('C');        // ask for game config
   282         SendIPCAndWaitReply('C');        // ask for game config
   282     end
   283         end
   283     else
   284     else
   284     begin
   285         begin
   285         LoadRecordFromFile(recordFileName);
   286         LoadRecordFromFile(recordFileName);
   286         perfExt_SaveBeganSynching();
   287         perfExt_SaveBeganSynching();
   287     end;
   288         end;
   288 
   289 
   289     ScriptOnGameInit;
   290     ScriptOnGameInit;
   290 
   291 
   291     s:= 'eproto ' + inttostr(cNetProtoVersion);
   292     s:= 'eproto ' + inttostr(cNetProtoVersion);
   292     SendIPCRaw(@s[0], Length(s) + 1); // send proto version
   293     SendIPCRaw(@s[0], Length(s) + 1); // send proto version