Better login handling
This commit is contained in:
@@ -78,14 +78,13 @@ public:
|
||||
//
|
||||
PrintBuffer print_buffer_;
|
||||
|
||||
// Is Controlled Flag.
|
||||
// Client ID
|
||||
//
|
||||
// This flag is set to true when a client is controlling this player.
|
||||
// It gets set back to false when the client logs out or attaches
|
||||
// to a different player. If this is set, then the connections_
|
||||
// table contains a map from a client ID to this actor.
|
||||
// This variable is set to nonzero when a client is controlling this
|
||||
// player. If this is set, then the connections_ table contains a map
|
||||
// from a client ID to this actor.
|
||||
//
|
||||
bool is_controlled_;
|
||||
int64_t client_id_ = 0;
|
||||
|
||||
// Delete on Logout Flag.
|
||||
//
|
||||
@@ -421,23 +420,17 @@ public:
|
||||
// Find out what actor the given client is controlling.
|
||||
//
|
||||
// This is used by the DrivenEngine to check if the given client has
|
||||
// changed actor, or if it has been forced to disconnect.
|
||||
// changed actor, or if it has been forced to disconnect. Returns
|
||||
// zero if the client is not controlling anything.
|
||||
//
|
||||
int64_t connection_get_actor(int64_t client_id) const;
|
||||
|
||||
// Connection get client.
|
||||
//
|
||||
// Get the ID of the client that is controlling the specified actor.
|
||||
//
|
||||
int64_t connection_get_client(Tangible *tan) const;
|
||||
|
||||
// Connection redirection.
|
||||
//
|
||||
// This is used by lua code to force changes in connection status.
|
||||
// It can be used to redirect a client, or disconnect a client
|
||||
// if actor2 == nullptr.
|
||||
// This is used by lua code to cause the client who is controlling
|
||||
// actor1 to control actor2 instead.
|
||||
//
|
||||
eng::string connection_redirect(Tangible *actor1, Tangible *actor2);
|
||||
void connection_redirect(Tangible *actor1, Tangible *actor2);
|
||||
|
||||
// Close all connections.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user