修复中级房组队问题

This commit is contained in:
aozhiwei 2020-06-02 17:46:51 +08:00
parent 10a74eb413
commit e8d0846b76
5 changed files with 10 additions and 7 deletions

View File

@ -28,8 +28,9 @@ class Entity
int GetEntityUniId() const { return entity_uniid_; } int GetEntityUniId() const { return entity_uniid_; }
EntityType_e GetEntityType() const { return entity_type_; } EntityType_e GetEntityType() const { return entity_type_; }
EntitySubType_e GetEntitySubType() const { return entity_subtype_; } EntitySubType_e GetEntitySubType() const { return entity_subtype_; }
virtual bool IsEntityType(EntityType_e type) { return type == entity_type_;} virtual bool IsEntityType(EntityType_e type) const { return type == entity_type_;}
virtual bool IsEntitySubType(EntitySubType_e subtype) { return subtype == entity_subtype_;} virtual bool IsEntitySubType(EntitySubType_e subtype) const
{ return subtype == entity_subtype_;}
int GetGridId() const { return grid_id_; } int GetGridId() const { return grid_id_; }
bool TestCollision(Room* room, Entity* b); bool TestCollision(Room* room, Entity* b);
bool TestCollision(Room* room, ColliderComponent* b); bool TestCollision(Room* room, ColliderComponent* b);

View File

@ -2740,12 +2740,12 @@ float Human::GetBuffAttrRate(int attr_type)
return 0; return 0;
} }
bool Human::IsPlayer() bool Human::IsPlayer() const
{ {
return IsEntitySubType(EST_Player); return IsEntitySubType(EST_Player);
} }
bool Human::IsAndroid() bool Human::IsAndroid() const
{ {
return IsEntitySubType(EST_Android); return IsEntitySubType(EST_Android);
} }

View File

@ -252,8 +252,8 @@ class Human : public MoveableEntity
void DecItem(int item_id, int item_num); void DecItem(int item_id, int item_num);
float GetBuffAttrAbs(int attr_id); float GetBuffAttrAbs(int attr_id);
float GetBuffAttrRate(int attr_id); float GetBuffAttrRate(int attr_id);
bool IsPlayer(); bool IsPlayer() const;
bool IsAndroid(); bool IsAndroid() const;
void DropItems(Obstacle* obstacle); void DropItems(Obstacle* obstacle);
void ProcNewBieLogic(); void ProcNewBieLogic();
void OnEnable(); void OnEnable();

View File

@ -2355,6 +2355,8 @@ void Room::CombineTeamBornPoint()
hum->FindLocation(); hum->FindLocation();
hum->RefreshView(); hum->RefreshView();
grid_service->MoveHuman(hum); grid_service->MoveHuman(hum);
} else if (room_type_ == RT_MidBrid && !hum->team_uuid.empty()){
EnableHuman(hum);
} }
} }
} }

View File

@ -31,7 +31,7 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg)
} }
//游戏次数,吃鸡数,击杀数 //游戏次数,吃鸡数,击杀数
int game_times = a8::XValue(tmp_strings[0]); int game_times = a8::XValue(tmp_strings[0]);
if (RoomMgr::Instance()->IsGM(msg)) { if (!f8::IsOnlineEnv() || RoomMgr::Instance()->IsGM(msg)) {
game_times = 0; game_times = 0;
if (!msg.team_uuid().empty()) { if (!msg.team_uuid().empty()) {
game_times = 1; game_times = 1;