mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
allow disabling checkpoints client side respawn
This commit is contained in:
parent
18c10ceadd
commit
4ed9ded251
@ -38,7 +38,7 @@ namespace MCGalaxy.Blocks {
|
||||
internal static bool Train(Player p, BlockID block, ushort x, ushort y, ushort z) {
|
||||
if (!p.trainInvincible && p.level.Config.KillerBlocks) p.HandleDeath(Block.Train);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool DoPortal(Player p, BlockID block, ushort x, ushort y, ushort z) {
|
||||
if (p.level.PosToInt(x, y, z) == p.lastWalkthrough) return true;
|
||||
@ -59,8 +59,10 @@ namespace MCGalaxy.Blocks {
|
||||
if (index != p.lastCheckpointIndex) {
|
||||
Position pos = p.Pos;
|
||||
pos.X = x * 32 + 16; pos.Z = z * 32 + 16;
|
||||
p.SendPos(Entities.SelfID, pos, p.Rot);
|
||||
Entities.Spawn(p, p);
|
||||
if (Server.Config.CheckpointsRespawnClientside) {
|
||||
p.SendPos(Entities.SelfID, pos, p.Rot);
|
||||
Entities.Spawn(p, p);
|
||||
}
|
||||
p.lastCheckpointIndex = index;
|
||||
}
|
||||
return true;
|
||||
|
@ -78,6 +78,8 @@ namespace MCGalaxy {
|
||||
public bool CheckForUpdates = true;
|
||||
[ConfigBool("enable-cpe", "Server", true)]
|
||||
public bool EnableCPE = true;
|
||||
[ConfigBool("checkpoints-respawn-clientside", "Other", true)]
|
||||
public bool CheckpointsRespawnClientside = true;
|
||||
|
||||
[ConfigInt("rplimit", "Other", 500, 0, 50000)]
|
||||
public int PhysicsRestartLimit = 500;
|
||||
|
Loading…
x
Reference in New Issue
Block a user