diff --git a/server/gameserver/player.h b/server/gameserver/player.h index 8b30503..bacf92e 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -22,7 +22,6 @@ class Player : public Human public: int team_mode = 0; - int player_count = 0; bool auto_fill = false; bool use_touch = false; long long create_tick = 0; diff --git a/server/gameserver/playermgr.cc b/server/gameserver/playermgr.cc index c9cb7a6..9ae02b1 100644 --- a/server/gameserver/playermgr.cc +++ b/server/gameserver/playermgr.cc @@ -48,7 +48,6 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ hum->health = 0; hum->team_uuid = msg.team_uuid(); hum->team_mode = msg.team_mode(); - hum->player_count = msg.player_count(); hum->auto_fill = msg.auto_fill(); hum->use_touch = msg.use_touch(); hum->avatar_url = msg.avatar_url(); diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 47cb6d4..f03880f 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -47,6 +47,12 @@ package cs; 客户端可以根据protobuf反射得到字段名和字段id的对应关系做到自动化判断 */ +//常量 +enum Constant_e +{ + ProtoVersion = 2019071501; //系统版本 +} + //心跳 message CMPing { @@ -548,8 +554,8 @@ message CMJoin optional string team_uuid = 2; //队伍唯一id (没组队时为空字符串) optional string account_id = 3; //账号id account_id optional string session_id = 4; //session_id + optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion optional int32 team_mode = 20; //队伍模式 0:单人 1:多人 - optional int32 player_count = 5; //玩家数(单人时为1) optional bool auto_fill = 6; //是否自动填充玩家 optional int32 bot = 7; //是否机器人 optional string name = 8; //角色名