mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 15:41:30 +00:00
133e1367d8
Visual mode: when "Synch camera position" setting is enabled, and the cursor was outside of a sector when entering Visual mode, camera height is now adjusted based on nearest sector (previously the height was adjusted only when the cursor was inside of a sector). "Auto-align textures X", "Auto-align textures X and Y" actions, UDMF: alignment source sidedef part's horizontal scale is now applied to all aligned sidedefs. Visual mode, UDMF: 'lightfog' flag is now automatically updated when changing sidedef brightness or using "Match Brightness" action. Linedefs mode: added "Update 'lightfog' flag" menu item. Game configurations: cosmetic changes in UDMF linedef flag names. Updated ZDoom_DECORATE.cfg.
29 lines
753 B
C#
29 lines
753 B
C#
#region === Copyright (c) 2010 Pascal van der Heiden ===
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
using CodeImp.DoomBuilder.Map;
|
|
|
|
#endregion
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
{
|
|
internal class SectorLevelComparer : IComparer<SectorLevel>
|
|
{
|
|
// Center of sector to use for plane comparison
|
|
public Vector2D center;
|
|
|
|
// Constructor
|
|
public SectorLevelComparer(Sector s)
|
|
{
|
|
this.center = new Vector2D(s.BBox.Left + s.BBox.Width / 2, s.BBox.Top + s.BBox.Height / 2);
|
|
}
|
|
|
|
// Comparer
|
|
public int Compare(SectorLevel x, SectorLevel y)
|
|
{
|
|
return (x == y ? 0 : Math.Sign(x.plane.GetZ(center) - y.plane.GetZ(center))); //mxd. Added equality check
|
|
}
|
|
}
|
|
}
|