diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 21:49:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | e8a4474319aca4a32869fa1ebb8b5ebbd98237f6 (patch) | |
tree | 889a347ac3fb3998566fe07d2c170ad5748aa1f3 /src/main.cpp | |
parent | 1a59946dd91a9de55f114413a520bf36204222ff (diff) | |
download | ManaVerse-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.gz ManaVerse-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.bz2 ManaVerse-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.tar.xz ManaVerse-e8a4474319aca4a32869fa1ebb8b5ebbd98237f6.zip |
save Client object into global variable.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7bedd1b9d..f367d80fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -308,17 +308,21 @@ int main(int argc, char *argv[]) SetCurrentDirectory(PhysFs::getBaseDir()); #endif setPriority(true); - Client client(options); + client = new Client(options); + int ret = 0; if (!options.testMode) { - client.gameInit(); - return client.gameExec(); + client->gameInit(); + ret = client->gameExec(); } else { - client.testsInit(); - return client.testsExec(); + client->testsInit(); + ret = client->testsExec(); } + delete client; + client = nullptr; + return ret; } #else |