Skip to content

Commit

Permalink
CTF: Set default Y of spawn and flags to middle of level, so that the…
Browse files Browse the repository at this point in the history
…y are visible on a normal flatgrass level
  • Loading branch information
UnknownShadow200 committed Oct 20, 2022
1 parent 3865c7e commit a17c717
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 9 additions & 5 deletions MCGalaxy/Games/CTF/CtfConfig.cs
Expand Up @@ -75,12 +75,16 @@ public sealed class CTFMapConfig : RoundsGameMapConfig {
ZDivider = lvl.Length / 2;
RedFlagBlock = Block.Red;
BlueFlagBlock = Block.Blue;
ushort midX = (ushort)(lvl.Width / 2), maxZ = (ushort)(lvl.Length - 1);

ushort midX = (ushort)(lvl.Width / 2);
ushort midY = (ushort)(lvl.Height / 2);
ushort topY = (ushort)(midY + 2);
ushort maxZ = (ushort)(lvl.Length - 1);

RedFlagPos = new Vec3U16(midX, 6, 0);
RedSpawn = new Vec3U16(midX, 4, 0);
BlueFlagPos = new Vec3U16(midX, 6, maxZ);
BlueSpawn = new Vec3U16(midX, 4, maxZ);
RedFlagPos = new Vec3U16(midX, topY, 0);
RedSpawn = new Vec3U16(midX, midY, 0);
BlueFlagPos = new Vec3U16(midX, topY, maxZ);
BlueSpawn = new Vec3U16(midX, midY, maxZ);
}
}
}
3 changes: 0 additions & 3 deletions MCGalaxy/Games/CTF/CtfGame.cs
Expand Up @@ -19,9 +19,6 @@
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using MCGalaxy.Commands.World;
using MCGalaxy.Maths;
using MCGalaxy.SQL;
using BlockID = System.UInt16;
Expand Down
1 change: 0 additions & 1 deletion MCGalaxy/Games/IGame.cs
Expand Up @@ -50,7 +50,6 @@ public abstract class IGame
}



/// <summary> Whether this game intercepts the given chat message </summary>
/// <example> RoundsGame uses this when voting for next level at end of rounds </example>
public virtual bool HandlesChatMessage(Player p, string message) { return false; }
Expand Down

0 comments on commit a17c717

Please sign in to comment.