Major redesign: The game can not be left without disconnecting from the server. This happens if a player is kicked, if he wishes to leave, or for other reasons. Error packets from the server will always cause a disconnect, however.
If joining a game fails, there is a proper failure packet now.
This commit is contained in:
+25
-14
@@ -44,20 +44,31 @@
|
||||
// The following errors are game errors.
|
||||
#define ERR_NET_VERSION_NOT_SUPPORTED 101
|
||||
#define ERR_NET_SERVER_FULL 102
|
||||
#define ERR_NET_GAME_ALREADY_RUNNING 103
|
||||
#define ERR_NET_INVALID_PASSWORD 104
|
||||
#define ERR_NET_INVALID_PASSWORD_STR 105
|
||||
#define ERR_NET_PLAYER_NAME_IN_USE 106
|
||||
#define ERR_NET_INVALID_PLAYER_NAME 107
|
||||
#define ERR_NET_INVALID_PLAYER_CARDS 108
|
||||
#define ERR_NET_INVALID_PLAYER_RESULTS 109
|
||||
#define ERR_NET_INVALID_GAME_NAME 110
|
||||
#define ERR_NET_UNKNOWN_GAME 111
|
||||
#define ERR_NET_INVALID_CHAT_TEXT 112
|
||||
#define ERR_NET_UNKNOWN_PLAYER_ID 113
|
||||
#define ERR_NET_INVALID_ROUND 114
|
||||
#define ERR_NET_PLAYER_KICKED 115
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 116
|
||||
#define ERR_NET_INVALID_PASSWORD 103
|
||||
#define ERR_NET_INVALID_PASSWORD_STR 104
|
||||
#define ERR_NET_PLAYER_NAME_IN_USE 105
|
||||
#define ERR_NET_INVALID_PLAYER_NAME 106
|
||||
#define ERR_NET_INVALID_PLAYER_CARDS 107
|
||||
#define ERR_NET_INVALID_PLAYER_RESULTS 108
|
||||
#define ERR_NET_INVALID_GAME_NAME 109
|
||||
#define ERR_NET_UNKNOWN_GAME 110
|
||||
#define ERR_NET_INVALID_CHAT_TEXT 111
|
||||
#define ERR_NET_UNKNOWN_PLAYER_ID 112
|
||||
#define ERR_NET_INVALID_ROUND 113
|
||||
#define ERR_NET_PLAYER_KICKED 114
|
||||
#define ERR_NET_INVALID_PLAYER_COUNT 115
|
||||
|
||||
// Notifications - removed from game
|
||||
#define NTF_NET_INTERNAL 201
|
||||
#define NTF_NET_REMOVED_ON_REQUEST 202
|
||||
#define NTF_NET_REMOVED_GAME_FULL 203
|
||||
#define NTF_NET_REMOVED_ALREADY_RUNNING 204
|
||||
#define NTF_NET_REMOVED_KICKED 205
|
||||
|
||||
// Notifications - join failed
|
||||
#define NTF_NET_JOIN_GAME_FULL 206
|
||||
#define NTF_NET_JOIN_ALREADY_RUNNING 207
|
||||
#define NTF_NET_JOIN_INVALID_PASSWORD 208
|
||||
|
||||
// This is an internal message which is not reported.
|
||||
#define MSG_SOCK_INTERNAL_PENDING 0
|
||||
|
||||
Reference in New Issue
Block a user