mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -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);
|
CheckGamesJoin(p, oldLevel);
|
||||||
p.prevMsg = "";
|
p.prevMsg = "";
|
||||||
|
|
||||||
bool showJoin = p.level.ShouldSaveChanges() || (oldLevel != null && oldLevel.ShouldSaveChanges());
|
if (!p.hidden && p.level.ShouldShowJoinMessage(oldLevel)) {
|
||||||
if (!p.hidden && showJoin) {
|
|
||||||
Player.SendChatFrom(p, p.color + "*" + p.DisplayName + " %Swent to &b" + lvl.name, false);
|
Player.SendChatFrom(p, p.color + "*" + p.DisplayName + " %Swent to &b" + lvl.name, false);
|
||||||
Player.RaisePlayerAction(p, PlayerAction.JoinWorld, lvl.name);
|
Player.RaisePlayerAction(p, PlayerAction.JoinWorld, lvl.name);
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,13 @@ namespace MCGalaxy {
|
|||||||
return true;
|
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,
|
/// <summary> The currently active game running on this map,
|
||||||
/// or null if there is no game running. </summary>
|
/// or null if there is no game running. </summary>
|
||||||
public IGame CurrentGame() {
|
public IGame CurrentGame() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user