diff --git a/server/gameserver/entity.h b/server/gameserver/entity.h index 4dcfab9..610d20f 100644 --- a/server/gameserver/entity.h +++ b/server/gameserver/entity.h @@ -28,8 +28,9 @@ class Entity int GetEntityUniId() const { return entity_uniid_; } EntityType_e GetEntityType() const { return entity_type_; } EntitySubType_e GetEntitySubType() const { return entity_subtype_; } - virtual bool IsEntityType(EntityType_e type) { return type == entity_type_;} - virtual bool IsEntitySubType(EntitySubType_e subtype) { return subtype == entity_subtype_;} + virtual bool IsEntityType(EntityType_e type) const { return type == entity_type_;} + virtual bool IsEntitySubType(EntitySubType_e subtype) const + { return subtype == entity_subtype_;} int GetGridId() const { return grid_id_; } bool TestCollision(Room* room, Entity* b); bool TestCollision(Room* room, ColliderComponent* b); diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 5a37c7d..7d802a1 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -2740,12 +2740,12 @@ float Human::GetBuffAttrRate(int attr_type) return 0; } -bool Human::IsPlayer() +bool Human::IsPlayer() const { return IsEntitySubType(EST_Player); } -bool Human::IsAndroid() +bool Human::IsAndroid() const { return IsEntitySubType(EST_Android); } diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 220f876..1334494 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -252,8 +252,8 @@ class Human : public MoveableEntity void DecItem(int item_id, int item_num); float GetBuffAttrAbs(int attr_id); float GetBuffAttrRate(int attr_id); - bool IsPlayer(); - bool IsAndroid(); + bool IsPlayer() const; + bool IsAndroid() const; void DropItems(Obstacle* obstacle); void ProcNewBieLogic(); void OnEnable(); diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 36a94e1..dc02a72 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2355,6 +2355,8 @@ void Room::CombineTeamBornPoint() hum->FindLocation(); hum->RefreshView(); grid_service->MoveHuman(hum); + } else if (room_type_ == RT_MidBrid && !hum->team_uuid.empty()){ + EnableHuman(hum); } } } diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 9fa3605..251c81f 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -31,7 +31,7 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg) } //游戏次数,吃鸡数,击杀数 int game_times = a8::XValue(tmp_strings[0]); - if (RoomMgr::Instance()->IsGM(msg)) { + if (!f8::IsOnlineEnv() || RoomMgr::Instance()->IsGM(msg)) { game_times = 0; if (!msg.team_uuid().empty()) { game_times = 1;