348 // read demo |
348 // read demo |
349 toSendBuf = demofile.readAll(); |
349 toSendBuf = demofile.readAll(); |
350 |
350 |
351 // run engine |
351 // run engine |
352 demo.clear(); |
352 demo.clear(); |
353 Start(); |
353 Start(false); |
354 SetGameState(gsStarted); |
354 SetGameState(gsStarted); |
355 } |
355 } |
356 |
356 |
357 void HWGame::StartNet() |
357 void HWGame::StartNet() |
358 { |
358 { |
359 gameType = gtNet; |
359 gameType = gtNet; |
360 demo.clear(); |
360 demo.clear(); |
361 Start(); |
361 Start(false); |
362 SetGameState(gsStarted); |
362 SetGameState(gsStarted); |
363 } |
363 } |
364 |
364 |
365 void HWGame::StartLocal() |
365 void HWGame::StartLocal() |
366 { |
366 { |
367 gameType = gtLocal; |
367 gameType = gtLocal; |
368 demo.clear(); |
368 demo.clear(); |
369 Start(); |
369 Start(false); |
370 SetGameState(gsStarted); |
370 SetGameState(gsStarted); |
371 } |
371 } |
372 |
372 |
373 void HWGame::StartQuick() |
373 void HWGame::StartQuick() |
374 { |
374 { |
375 gameType = gtQLocal; |
375 gameType = gtQLocal; |
376 demo.clear(); |
376 demo.clear(); |
377 Start(); |
377 Start(false); |
378 SetGameState(gsStarted); |
378 SetGameState(gsStarted); |
379 } |
379 } |
380 |
380 |
381 void HWGame::StartTraining(const QString & file) |
381 void HWGame::StartTraining(const QString & file) |
382 { |
382 { |
383 gameType = gtTraining; |
383 gameType = gtTraining; |
384 training = "Missions/Training/" + file + ".lua"; |
384 training = "Missions/Training/" + file + ".lua"; |
385 demo.clear(); |
385 demo.clear(); |
386 Start(); |
386 Start(false); |
387 SetGameState(gsStarted); |
387 SetGameState(gsStarted); |
388 } |
388 } |
389 |
389 |
390 void HWGame::StartCampaign(const QString & camp, const QString & campScript, const QString & campTeam) |
390 void HWGame::StartCampaign(const QString & camp, const QString & campScript, const QString & campTeam) |
391 { |
391 { |
392 gameType = gtCampaign; |
392 gameType = gtCampaign; |
393 campaign = camp; |
393 campaign = camp; |
394 campaignScript = "Missions/Campaign/" + camp + "/" + campScript; |
394 campaignScript = "Missions/Campaign/" + camp + "/" + campScript; |
395 campaignTeam = campTeam; |
395 campaignTeam = campTeam; |
396 demo.clear(); |
396 demo.clear(); |
397 Start(); |
397 Start(false); |
398 SetGameState(gsStarted); |
398 SetGameState(gsStarted); |
399 } |
399 } |
400 |
400 |
401 void HWGame::SetGameState(GameState state) |
401 void HWGame::SetGameState(GameState state) |
402 { |
402 { |