mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix fall damage not killing when falling from non full block, fix changing map MOTD not re-sending motd, fixes #471
This commit is contained in:
parent
58cbef023e
commit
3caa6bde36
@ -77,8 +77,15 @@ namespace MCGalaxy {
|
||||
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player pl in players) {
|
||||
if (pl.level != lvl || !pl.HasCpeExt(CpeExt.HackControl)) continue;
|
||||
pl.Send(Hacks.MakeHackControl(pl));
|
||||
// Unfortunately, some clients will freeze or crash if we send a MOTD packet,
|
||||
// but don't follow it up by a new map. Thus, we have to use the ugly approach
|
||||
// of only sending to whitelisted clients.
|
||||
if (pl.appName != null && pl.appName.CaselessStarts("classicalsharp")) {
|
||||
pl.SendMapMotd();
|
||||
} else {
|
||||
LevelActions.ReloadMap(p, pl, false);
|
||||
if (pl.HasCpeExt(CpeExt.HackControl)) pl.Send(Hacks.MakeHackControl(pl));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,8 @@ namespace MCGalaxy.Blocks.Physics {
|
||||
allGas = allGas && collide == CollideType.WalkThrough;
|
||||
if (!CollideType.IsSolid(collide)) continue;
|
||||
|
||||
int fallHeight = (p.startFallY - bb.Min.Y) / 32;
|
||||
if (fallHeight > p.level.Config.FallHeight)
|
||||
int fallHeight = p.startFallY - bb.Min.Y;
|
||||
if (fallHeight > p.level.Config.FallHeight * 32)
|
||||
p.HandleDeath(ExtBlock.Air, null, false, true);
|
||||
|
||||
p.startFallY = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user