Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-01-21 14:41:35 +0000
committerStijn Buys <ingar@osirion.org>2011-01-21 14:41:35 +0000
commit035653e94a3d74b8f18c993034199d7cd08a895a (patch)
tree6acc56c14a86b499657b6e7faaf50f9e6f7ff57d /src/core/gameconnection.cc
parent4af61dca099d2b7010d4fa83833ceeeef01b0b0f (diff)
Support structures for complex entity collision,
renamed sv_arrysize cvar to mem_vertex.
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index ba18bd5..982ac7d 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -8,6 +8,7 @@
#include <sstream>
#include "sys/sys.h"
+#include "filesystem/filesystem.h"
#include "core/cvar.h"
#include "core/gameconnection.h"
#include "core/net.h"
@@ -62,7 +63,28 @@ GameConnection::GameConnection(std::string const &connectionstr)
game_players.push_back(localplayer());
set_playerlist_timestamp(timestamp());
-
+
+ // generate player GUID
+ // we do it here because offline play doesn't require it
+ if (!localplayer()->guid().size()) {
+
+ // read keys.ini
+
+ // write keys.ini
+ std::string filename(filesystem::homedir());
+ filename.append("keys.ini");
+
+ std::ofstream ofs(filename.c_str());
+ if (!ofs.is_open()) {
+ con_warn << "Could not write " << filename << std::endl;
+ } else {
+ ofs << "; keys.ini - osirion client identification" << std::endl;
+ ofs << "; DO NOT EDIT OR DELETE THIS FILE" << std::endl;
+ ofs << "; If you do you will not be able to use existing characters on a remote server" << std::endl;
+ ofs.close();
+ }
+ }
+
connection_running = true;
}