267 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
267 ControllerInit(); // has to happen before InitKbdKeyTable to map keys |
268 InitKbdKeyTable(); |
268 InitKbdKeyTable(); |
269 |
269 |
270 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
270 LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english |
271 if cLocaleFName <> 'en.txt' then |
271 if cLocaleFName <> 'en.txt' then |
272 begin |
272 begin |
273 // Try two letter locale first before trying specific locale overrides |
273 // Try two letter locale first before trying specific locale overrides |
274 if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then |
274 if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then |
275 LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt'); |
275 LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt'); |
276 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
276 LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); |
277 end; |
277 end; |
278 |
278 |
279 WriteLnToConsole(msgGettingConfig); |
279 WriteLnToConsole(msgGettingConfig); |
|
280 |
280 if recordFileName = '' then |
281 if recordFileName = '' then |
281 begin |
282 begin |
282 InitIPC; |
283 InitIPC; |
283 SendIPCAndWaitReply('C'); // ask for game config |
284 SendIPCAndWaitReply('C'); // ask for game config |
284 end |
285 end |
285 else |
286 else |
286 begin |
287 begin |
287 LoadRecordFromFile(recordFileName); |
288 LoadRecordFromFile(recordFileName); |
288 perfExt_SaveBeganSynching(); |
289 perfExt_SaveBeganSynching(); |
289 end; |
290 end; |
290 |
291 |
291 ScriptOnGameInit; |
292 ScriptOnGameInit; |
292 |
293 |
293 s:= 'eproto ' + inttostr(cNetProtoVersion); |
294 s:= 'eproto ' + inttostr(cNetProtoVersion); |
294 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |
295 SendIPCRaw(@s[0], Length(s) + 1); // send proto version |