This commit is contained in:
aozhiwei 2022-08-17 10:55:36 +08:00
parent d47c4f2961
commit 853ba8477d
2 changed files with 12 additions and 0 deletions

View File

@ -4064,3 +4064,13 @@ bool Room::CanAddObstacle(const a8::Vec2& pos, int obstacle_id)
int rad = std::max(thing_meta->i->width(), thing_meta->i->height()); int rad = std::max(thing_meta->i->width(), thing_meta->i->height());
return map_service->CanAdd(pos, rad); return map_service->CanAdd(pos, rad);
} }
bool Room::IsDestoryRoom()
{
return GetMapMeta()->i->map_id() == 1002;
}
bool Room::IsSurvivalRoom()
{
return GetMapMeta()->i->map_id() == 1003;
}

View File

@ -113,6 +113,8 @@ public:
#endif #endif
bool IsBattleStarting() { return battle_starting_; }; bool IsBattleStarting() { return battle_starting_; };
bool IsPveRoom(); bool IsPveRoom();
bool IsDestoryRoom();
bool IsSurvivalRoom();
int GetPlayerNum(); int GetPlayerNum();
int GetHumanNum(); int GetHumanNum();