mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-30 17:12:38 -04:00
Make zombie survival work with other non-zombie map players.
This commit is contained in:
parent
b4bb5d098a
commit
ac6fd1afd8
@ -83,6 +83,7 @@ namespace MCGalaxy.Games {
|
||||
|
||||
Player[] online = PlayerInfo.Online.Items;
|
||||
foreach (Player p in online) {
|
||||
if (p.level == null || p.level != CurLevel) continue;
|
||||
if (p != first) Alive.Add(p);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,14 @@ namespace MCGalaxy.Games {
|
||||
}
|
||||
|
||||
public override bool PlayerCanJoinLevel(Player p, Level lvl, Level oldLvl) {
|
||||
return base.PlayerCanJoinLevel(p, lvl, oldLvl);
|
||||
if (!oldLvl.name.CaselessEq(CurLevelName)) return true;
|
||||
if (lvl.name.CaselessEq(CurLevelName)) return true;
|
||||
|
||||
if (RoundInProgress && !p.referee) {
|
||||
p.SendMessage("Sorry, you cannot leave a zombie survival map until the current round has ended.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlayerMoneyChanged(Player p) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user