mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 03:55:18 -04:00
Fix join message showing for first round of zombie survival.
This commit is contained in:
parent
df0bf301f2
commit
7f6a451530
@ -116,8 +116,7 @@ namespace MCGalaxy.Commands.World {
|
||||
CheckGamesJoin(p, oldLevel);
|
||||
p.prevMsg = "";
|
||||
|
||||
bool showJoin = p.level.ShouldSaveChanges() || (oldLevel != null && oldLevel.ShouldSaveChanges());
|
||||
if (!p.hidden && showJoin) {
|
||||
if (!p.hidden && p.level.ShouldShowJoinMessage(oldLevel)) {
|
||||
Player.SendChatFrom(p, p.color + "*" + p.DisplayName + " %Swent to &b" + lvl.name, false);
|
||||
Player.RaisePlayerAction(p, PlayerAction.JoinWorld, lvl.name);
|
||||
}
|
||||
|
@ -127,6 +127,13 @@ namespace MCGalaxy {
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool ShouldShowJoinMessage(Level prev) {
|
||||
if (Server.zombie.Running && name.CaselessEq(Server.zombie.CurLevelName)
|
||||
&& (prev == this || prev.name.CaselessEq(Server.zombie.LastLevelName))) return false;
|
||||
if (Server.lava.active && Server.lava.HasMap(name)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary> The currently active game running on this map,
|
||||
/// or null if there is no game running. </summary>
|
||||
public IGame CurrentGame() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user