]> git.lizzy.rs Git - minetest.git/blobdiff - src/clientiface.h
Fix segfaults caused by the Environment not being initialized yet
[minetest.git] / src / clientiface.h
index 598662e2dd1374813976f006de14d989485555d0..f6c4294e2b335c5823082d2c096b9dddb7109dfb 100644 (file)
@@ -49,14 +49,14 @@ class EmergeManager;
       \-----------------/
                |                  depending of the incoming packet
                +---------------------------------------
-               v                                      |
+               v                                      v
 +-----------------------------+        +-----------------------------+
 |IN:                          |        |IN:                          |
 | TOSERVER_INIT_LEGACY        |-----   | TOSERVER_INIT               |      invalid playername,
 +-----------------------------+    |   +-----------------------------+  password (for _LEGACY),
                |                   |                  |                       or denied by mod
                | Auth ok           -------------------+---------------------------------
-               |                                      |                                |
+               v                                      v                                |
 +-----------------------------+        +-----------------------------+                 |
 |OUT:                         |        |OUT:                         |                 |
 | TOCLIENT_INIT_LEGACY        |        | TOCLIENT_HELLO              |                 |
@@ -104,7 +104,7 @@ class EmergeManager;
                |                      +-----------------------------+                  |
                |      ^                           |                                    |
                |      -----------------------------                                    |
-               |                                                                       |
+               v                                                                       |
 +-----------------------------+                        --------------------------------+
 |IN:                          |                        |                               |
 | TOSERVER_CLIENT_READY       |                        v                               |
@@ -128,13 +128,13 @@ class EmergeManager;
       |                 |---------------------------------------------------------------
  ---->|     Active      |
  |    |                 |----------------------------------------------
- |    \-----------------/      timeout                                |
+ |    \-----------------/      timeout                                v
  |       |           |                                  +-----------------------------+
  |       |           |                                  |OUT:                         |
  |       |           |                                  | TOCLIENT_DISCONNECT         |
  |       |           |                                  +-----------------------------+
  |       |           |                                                |
- |       |           |                                                v
+ |       |           v                                                v
  |       |  +-----------------------------+                    /-----------------\
  |       |  |IN:                          |                    |                 |
  |       |  | TOSERVER_DISCONNECT         |------------------->|  Disconnecting  |
@@ -158,7 +158,7 @@ class EmergeManager;
  |                  |                               +-----------------------------+
  |                  |    sets password accordingly  |IN:                          |
  -------------------+-------------------------------| TOSERVER_FIRST_SRP          |
-                                                   +-----------------------------+
+                                                    +-----------------------------+
 
 */
 namespace con {
@@ -232,6 +232,7 @@ class RemoteClient
 
        /* Authentication information */
        std::string enc_pwd;
+       bool create_player_on_auth_success;
        AuthMechanism chosen_mech;
        void * auth_data;
        u32 allowed_auth_mechs;
@@ -246,6 +247,7 @@ class RemoteClient
                peer_id(PEER_ID_INEXISTENT),
                serialization_version(SER_FMT_VER_INVALID),
                net_proto_version(0),
+               create_player_on_auth_success(false),
                chosen_mech(AUTH_MECHANISM_NONE),
                auth_data(NULL),
                m_time_from_building(9999),