author | Wuzzy <Wuzzy2@mail.ru> |
Mon, 29 Apr 2019 23:12:40 +0200 | |
changeset 14873 | 56293aa24e81 |
parent 14620 | b86e6e4f3c58 |
permissions | -rw-r--r-- |
10256 | 1 |
#include "hwmapoptimizer.h" |
2 |
#include "hwconsts.h" |
|
3 |
||
4 |
HWMapOptimizer::HWMapOptimizer(QObject *parent) : |
|
14620
b86e6e4f3c58
Make game engine load the user's locale correctly (bug 688)
Wuzzy <Wuzzy2@mail.ru>
parents:
10256
diff
changeset
|
5 |
TCPBase(false, false, parent) |
10256 | 6 |
{ |
7 |
} |
|
8 |
||
9 |
bool HWMapOptimizer::couldBeRemoved() |
|
10 |
{ |
|
11 |
return !m_hasStarted; |
|
12 |
} |
|
13 |
||
14 |
void HWMapOptimizer::optimizeMap(const Paths &paths) |
|
15 |
{ |
|
16 |
m_paths = paths; |
|
17 |
||
18 |
Start(true); |
|
19 |
} |
|
20 |
||
21 |
QStringList HWMapOptimizer::getArguments() |
|
22 |
{ |
|
23 |
QStringList arguments; |
|
24 |
arguments << "--internal"; |
|
25 |
arguments << "--port"; |
|
26 |
arguments << QString("%1").arg(ipc_port); |
|
27 |
arguments << "--user-prefix"; |
|
28 |
arguments << cfgdir->absolutePath(); |
|
29 |
arguments << "--prefix"; |
|
30 |
arguments << datadir->absolutePath(); |
|
31 |
arguments << "--landpreview"; |
|
32 |
return arguments; |
|
33 |
} |
|
34 |
||
35 |
void HWMapOptimizer::onClientDisconnect() |
|
36 |
{ |
|
37 |
||
38 |
} |
|
39 |
||
40 |
void HWMapOptimizer::SendToClientFirst() |
|
41 |
{ |
|
42 |
SendIPC("e$mapgen 4"); |
|
43 |
||
44 |
/*QByteArray data = m_drawMapData; |
|
45 |
while(data.size() > 0) |
|
46 |
{ |
|
47 |
QByteArray tmp = data; |
|
48 |
tmp.truncate(200); |
|
49 |
SendIPC("edraw " + tmp); |
|
50 |
data.remove(0, 200); |
|
51 |
} |
|
52 |
||
53 |
SendIPC("!");*/ |
|
54 |
} |