1
This commit is contained in:
parent
fa046e5481
commit
543d06564d
@ -50,7 +50,7 @@ void MapMgr::UnInit()
|
||||
void MapMgr::AttachRoom(Room* room, RoomInitInfo& init_info)
|
||||
{
|
||||
if (init_info.pve_instance_id) {
|
||||
init_info.room_mode = (RoomMode_e)((rand() % 2) + (int)kChiJiMode);
|
||||
init_info.room_mode = (RoomMode_e)((rand() % 2) + 1 + (int)kChiJiMode);
|
||||
room->pve_mode_meta = MetaMgr::Instance()->GetPveGeminiMode(init_info.room_mode);
|
||||
if (!room->pve_mode_meta) {
|
||||
abort();
|
||||
@ -59,7 +59,15 @@ void MapMgr::AttachRoom(Room* room, RoomInitInfo& init_info)
|
||||
room->pve_instance = MetaMgr::Instance()->GetPveGemini(init_info.pve_instance_id);
|
||||
if (!room->pve_instance) {
|
||||
abort();
|
||||
|
||||
}
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("attachRoom pve_instance_id:%d room_mode:%d\n",
|
||||
{
|
||||
init_info.pve_instance_id,
|
||||
init_info.room_mode
|
||||
});
|
||||
#endif
|
||||
}
|
||||
MapInstance* map_instance = init_info.init_map_id == 0 ?
|
||||
RandMapInstance(init_info.room_mode) : GetMapInstance(init_info.init_map_id);
|
||||
|
@ -1276,7 +1276,6 @@ void Player::PushJoinRoomMsg()
|
||||
if (!a8::HasBitFlag(status, CS_ForceTeam)) {
|
||||
cs::SMJoinedNotify notifymsg;
|
||||
notifymsg.set_error_code(0);
|
||||
notifymsg.set_room_mode((int)room->GetRoomMode());
|
||||
notifymsg.set_server_info(JsonDataMgr::Instance()->server_info);
|
||||
room->FillSMJoinedNotify(this, notifymsg);
|
||||
GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg);
|
||||
@ -1289,7 +1288,7 @@ void Player::PushJoinRoomMsg()
|
||||
#endif
|
||||
notifymsg.set_map_width(room->GetMapMeta()->i->map_width());
|
||||
notifymsg.set_map_height(room->GetMapMeta()->i->map_height());
|
||||
//notifymsg.set_room_mode((int)room->GetRoomMode());
|
||||
notifymsg.set_room_mode((int)room->GetRoomMode());
|
||||
notifymsg.set_server_info(JsonDataMgr::Instance()->server_info);
|
||||
//notifymsg.set_team_mode(team_mode());
|
||||
notifymsg.set_player_id(GetUniId());
|
||||
|
@ -1184,7 +1184,7 @@ void Room::UpdateGas()
|
||||
break;
|
||||
}
|
||||
if (gas_data_.gas_mode != GasInactive && gas_data_.gas_mode != GasJump) {
|
||||
if (gas_data_.gas_mode != GasInactive && GetRoomMode() == kChiJiMode) {
|
||||
if (gas_data_.gas_mode != GasInactive) {
|
||||
if (IsPveRoom()) {
|
||||
|
||||
} else {
|
||||
|
@ -125,10 +125,12 @@ void RoomMgr::Update(int delta_time)
|
||||
|
||||
void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
{
|
||||
#if 0
|
||||
if (msg.proto_version() < 2021073001) {
|
||||
JoinErrorHandle(msg, 6, hdr.socket_handle);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (IsLimitJoin()) {
|
||||
JoinErrorHandle(msg, 2, hdr.socket_handle);
|
||||
return;
|
||||
|
@ -1238,7 +1238,6 @@ message SMJoinedNotify
|
||||
|
||||
optional int32 error_code = 7; //错误 1:服务器维护中 2:服务器繁忙请稍后再进入
|
||||
optional int32 error_msg = 10; //错误描述
|
||||
optional int32 room_mode = 8; //0:吃鸡模式 1:歼灭模式 2:生存模式
|
||||
|
||||
optional string server_info = 9; //服务器信息(重连时使用) 已经废弃移动到SMMapInfo
|
||||
}
|
||||
@ -1254,6 +1253,7 @@ message SMMapInfo
|
||||
optional bool started = 8; //游戏是否已开始
|
||||
optional string room_uuid = 9; //房间唯一id
|
||||
optional string server_info = 10; //服务器信息(重连时使用)
|
||||
optional int32 room_mode = 11; //0:吃鸡模式 1:歼灭模式 2:生存模式
|
||||
}
|
||||
|
||||
//玩家信息
|
||||
|
Loading…
x
Reference in New Issue
Block a user