summaryrefslogtreecommitdiff
path: root/src/clientiface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/clientiface.h')
-rw-r--r--src/clientiface.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/clientiface.h b/src/clientiface.h
index 2f265b128..cc303734a 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -426,9 +426,12 @@ public:
/* event to update client state */
void event(u16 peer_id, ClientStateEvent event);
- /* set environment */
- void setEnv(ServerEnvironment* env)
- { assert(m_env == 0); m_env = env; }
+ /* Set environment. Do not call this function if environment is already set */
+ void setEnv(ServerEnvironment *env)
+ {
+ assert(m_env == NULL); // pre-condition
+ m_env = env;
+ }
static std::string state2Name(ClientState state);