summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/client.h b/src/client.h
index f2e1b86d7..a5fda98d7 100644
--- a/src/client.h
+++ b/src/client.h
@@ -57,6 +57,12 @@ struct QueuedMeshUpdate
~QueuedMeshUpdate();
};
+enum LocalClientState {
+ LC_Created,
+ LC_Init,
+ LC_Ready
+};
+
/*
A thread-safe queue of mesh update tasks
*/
@@ -319,14 +325,7 @@ public:
calling this, as it is sent in the initialization.
*/
void connect(Address address);
- /*
- returns true when
- m_con.Connected() == true
- AND m_server_ser_ver != SER_FMT_VER_INVALID
- throws con::PeerNotFoundException if connection has been deleted,
- eg. timed out.
- */
- bool connectedAndInitialized();
+
/*
Stuff that references the environment is valid only as
long as this is not called. (eg. Players)
@@ -354,6 +353,7 @@ public:
void sendDamage(u8 damage);
void sendBreath(u16 breath);
void sendRespawn();
+ void sendReady();
ClientEnvironment& getEnv()
{ return m_env; }
@@ -454,6 +454,8 @@ public:
// Send a notification that no conventional media transfer is needed
void received_media();
+ LocalClientState getState() { return m_state; }
+
private:
// Virtual methods from con::PeerHandler
@@ -537,6 +539,9 @@ private:
// Storage for mesh data for creating multiple instances of the same mesh
std::map<std::string, std::string> m_mesh_data;
+
+ // own state
+ LocalClientState m_state;
};
#endif // !CLIENT_HEADER