This commit is contained in:
aozhiwei 2023-01-13 11:57:57 +08:00
parent f6a945d6a8
commit ef7df2b543
2 changed files with 7 additions and 2 deletions

View File

@ -500,6 +500,9 @@ bool MapInstance::Raycast(int layer, const glm::vec3& start, const glm::vec3& en
}
}
}
if (!ok) {
return false;
}
assert(ok);
hit_pos_[0] = hit_pos_copy[0];
hit_pos_[1] = h;

View File

@ -968,9 +968,11 @@ bool Room::CanJoin(class MatchTeam* team)
if (GetGasData().GetGasMode() != GasInactive) {
return false;
}
#if 0
if (map_instance->map_id != team->GetMapId()) {
return false;
}
#endif
if (team->GetOwner()->msg->pve_instance_id() && !pve_instance){
return false;
}
@ -987,7 +989,7 @@ bool Room::CanJoin(class MatchTeam* team)
return false;
}
#endif
if (GetPlayerNum() < (int)GetRoomMaxPlayerNum()) {
if (GetPlayerNum() > (int)GetRoomMaxPlayerNum()) {
return false;
}
for (auto& member : team->GetCurrMembers()) {
@ -995,7 +997,7 @@ bool Room::CanJoin(class MatchTeam* team)
return false;
}
}
return false;
return true;
}
void Room::OnPlayerOffline(Player* hum)