mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 07:56:20 -04:00
Fix CPE messages not being reset for zombie survival, fixes #124.
This commit is contained in:
parent
16a3341282
commit
dfd65bbd77
@ -56,7 +56,7 @@ namespace MCGalaxy {
|
||||
|
||||
if (i >= red && i <= white)
|
||||
Properties[i].KilledByLava = true;
|
||||
if (i == air || i == shrub || (i >= yellowflower && i <= redmushroom) {
|
||||
if (i == air || i == shrub || (i >= yellowflower && i <= redmushroom)) {
|
||||
Properties[i].KilledByLava = true;
|
||||
Properties[i].KilledByWater = true;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace MCGalaxy
|
||||
{
|
||||
public static bool Walkthrough(byte type) {
|
||||
return type == air || type == shrub || (type >= water && type <= lavastill)
|
||||
&& (type >= yelllowflower && type <= redmushroom);
|
||||
&& (type >= yellowflower && type <= redmushroom);
|
||||
}
|
||||
|
||||
public static bool AllowBreak(byte type)
|
||||
@ -85,7 +85,7 @@ namespace MCGalaxy
|
||||
}
|
||||
|
||||
public static bool Placable(byte type) {
|
||||
return !(type == blackrock || (type >= water && type <= lavstill)
|
||||
return !(type == blackrock || (type >= water && type <= lavastill))
|
||||
&& type < Block.CpeCount;
|
||||
}
|
||||
|
||||
|
@ -152,15 +152,21 @@ namespace MCGalaxy.Games {
|
||||
return;
|
||||
}
|
||||
|
||||
p.SendCpeMessage(CpeMessageType.Status1, "");
|
||||
p.SendCpeMessage(CpeMessageType.Status2, "");
|
||||
p.SendCpeMessage(CpeMessageType.Status3, "");
|
||||
ResetCpeMessages(p);
|
||||
Alive.Remove(p);
|
||||
Infected.Remove(p);
|
||||
if (oldLvl != null && oldLvl.name.CaselessEq(CurLevelName))
|
||||
UpdateAllPlayerStatus();
|
||||
}
|
||||
|
||||
void ResetCpeMessages(Player p) {
|
||||
p.SendCpeMessage(CpeMessageType.Status1, "");
|
||||
p.SendCpeMessage(CpeMessageType.Status2, "");
|
||||
p.SendCpeMessage(CpeMessageType.Status3, "");
|
||||
p.SendCpeMessage(CpeMessageType.BottomRight1, "");
|
||||
p.SendCpeMessage(CpeMessageType.BottomRight2, "");
|
||||
}
|
||||
|
||||
public override bool PlayerCanJoinLevel(Player p, Level lvl, Level oldLvl) {
|
||||
if (!oldLvl.name.CaselessEq(CurLevelName)) return true;
|
||||
if (lvl.name.CaselessEq(CurLevelName)) return true;
|
||||
|
@ -203,11 +203,18 @@ namespace MCGalaxy.Games {
|
||||
RoundInProgress = false;
|
||||
RoundStart = DateTime.MinValue;
|
||||
RoundEnd = DateTime.MinValue;
|
||||
Player[] online = PlayerInfo.Online.Items;
|
||||
foreach (Player pl in online) {
|
||||
pl.Game.RatedMap = false;
|
||||
pl.Game.PledgeSurvive = false;
|
||||
if (pl.level == null || !pl.level.name.CaselessEq(CurLevelName))
|
||||
continue;
|
||||
ResetCpeMessages(pl);
|
||||
}
|
||||
|
||||
LastLevelName = "";
|
||||
CurLevelName = "";
|
||||
CurLevel = null;
|
||||
|
||||
Player[] online = PlayerInfo.Online.Items;
|
||||
foreach (Player pl in online) {
|
||||
pl.Game.RatedMap = false;
|
||||
pl.Game.PledgeSurvive = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user