First attempt at multi-tagging.

97-99 seem mostly functional.
This commit is contained in:
sphere 2021-11-10 01:05:54 +01:00
parent af673f3270
commit ce8a15ad92
2 changed files with 232 additions and 15 deletions

View File

@ -880,6 +880,44 @@ linedeftypes
flags64text = "[6] Inverse movement";
}
}
multitagging
{
title = "Multi-tagging";
96
{
title = "Apply Tag to Tagged Sectors";
prefix = "(96)";
flags1024text = "[10] Offsets are target tags";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
97
{
title = "Apply Tag to Front Sector";
prefix = "(97)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
98
{
title = "Apply Tag to Back Sector";
prefix = "(98)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
99
{
title = "Apply Tag to Front and Back Sectors";
prefix = "(99)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
}
fofsolid
{
@ -1348,6 +1386,7 @@ linedeftypes
flags8text = "[3] Slope skew sides";
flags32text = "[5] Only block player";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
3dfloor = true;
3dfloorflags = "10019F";
}
@ -1371,6 +1410,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
3dfloor = true;
3dfloorflags = "210841F";
flags643dfloorflagsadd = "40";
@ -1397,6 +1437,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Don't cast shadow";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
flags8192text = "[13] Cut cyan flat pixels";
3dfloor = true;
3dfloorflags = "210959F";
@ -1425,6 +1466,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Spindash to move";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
3dfloor = true;
3dfloorflags = "14019F";
}
@ -1448,6 +1490,7 @@ linedeftypes
flags8text = "[3] Slope skew sides";
flags32text = "[5] Only block player";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
3dfloor = true;
3dfloorflags = "14019F";
}
@ -1471,6 +1514,7 @@ linedeftypes
flags32text = "[5] Only block player";
flags64text = "[6] Spindash to move";
flags128text = "[7] Only block non-players";
flags256text = "[8] Set respawn time to X offset";
3dfloor = true;
3dfloorflags = "10019F";
}
@ -2010,6 +2054,7 @@ linedeftypes
title = "Set Tagged Sector's Ceiling Height/Texture";
prefix = "(401)";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Don't change ceiling texture";
}
402
@ -2428,6 +2473,7 @@ linedeftypes
flags2text = "[1] Flags determine respawn";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Don't respawn";
flags256text = "[8] Front X is timer instead of tag";
}
447
@ -2960,7 +3006,7 @@ linedeftypes
prefix = "(700)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 1;
copyslopeargs = 1;
@ -2972,7 +3018,7 @@ linedeftypes
prefix = "(701)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 2;
copyslopeargs = 4;
@ -2984,7 +3030,7 @@ linedeftypes
prefix = "(702)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 3;
copyslopeargs = 5;
@ -2996,7 +3042,7 @@ linedeftypes
prefix = "(703)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 9;
copyslopeargs = 8;
@ -3030,7 +3076,7 @@ linedeftypes
prefix = "(710)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 4;
copyslopeargs = 2;
@ -3042,7 +3088,7 @@ linedeftypes
prefix = "(711)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 8;
copyslopeargs = 8;
@ -3054,7 +3100,7 @@ linedeftypes
prefix = "(712)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 12;
copyslopeargs = 10;
@ -3066,7 +3112,7 @@ linedeftypes
prefix = "(713)";
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
//flags32768text = "[15] Copy to other side"; SUPPORTED FROM 2.2.10
flags32768text = "[15] Copy to other side";
slope = "regular";
slopeargs = 6;
copyslopeargs = 6;
@ -3118,6 +3164,78 @@ linedeftypes
slopeargs = 3;
}
723
{
title = "Copy Backside Floor Slope from Line Tag";
prefix = "(723)";
slope = "copy";
slopeargs = 4;
}
724
{
title = "Copy Backside Ceiling Slope from Line Tag";
prefix = "(724)";
slope = "copy";
slopeargs = 8;
}
725
{
title = "Copy Backside Floor and Ceiling Slope from Line Tag";
prefix = "(725)";
slope = "copy";
slopeargs = 12;
}
730
{
title = "Copy Frontside Floor Slope to Backside";
prefix = "(730)";
slope = "copy";
copyslopeargs = 1;
}
731
{
title = "Copy Frontside Ceiling Slope to Backside";
prefix = "(731)";
slope = "copy";
copyslopeargs = 4;
}
732
{
title = "Copy Frontside Floor and Ceiling Slope to Backside";
prefix = "(732)";
slope = "copy";
copyslopeargs = 5;
}
733
{
title = "Copy Backside Floor Slope to Frontside";
prefix = "(733)";
slope = "copy";
copyslopeargs = 2;
}
734
{
title = "Copy Backside Ceiling Slope to Frontside";
prefix = "(734)";
slope = "copy";
copyslopeargs = 8;
}
735
{
title = "Copy Backside Floor and Ceiling Slope to Frontside";
prefix = "(735)";
slope = "copy";
copyslopeargs = 10;
}
799
{
title = "Set Tagged Dynamic Slope Vertex to Front Sector Height";
@ -3188,6 +3306,12 @@ linedeftypes
title = "Fog Wall";
prefix = "(909)";
}
910
{
title = "100% Additive";
prefix = "(910)";
}
}
}

View File

@ -996,7 +996,76 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
if (General.Map.SRB2)
{
{
//sphere: Multi-tagging
if (l.Action == 96)
{
int[] tags = new int[5];
tags[0] = l.Tag;
if (l.IsFlagSet("8192"))
{
tags[1] = l.Front.OffsetX;
tags[2] = l.Front.OffsetY;
}
if (l.IsFlagSet("32768") && l.Back != null)
{
tags[3] = l.Back.OffsetX;
tags[4] = l.Back.OffsetY;
}
if (!sectortags.ContainsKey(l.Front.Sector.Tag)) sectortags[l.Front.Sector.Tag] = new List<Sector>();
if (l.IsFlagSet("1024"))
{
for (int i = 0; i <= 4; i++)
{
if (tags[i] == 0 || !sectortags.ContainsKey(tags[i])) continue;
foreach (Sector s in sectortags[tags[i]])
sectortags[l.Front.Sector.Tag].Add(s);
}
}
else
{
foreach (Sector s in sectortags[l.Tag])
{
sectortags[l.Front.Sector.Tag].Add(s);
for (int i = 1; i <= 4; i++) // only iterate over offset/extra tags
{
if (tags[i] != 0) continue;
if (!sectortags.ContainsKey(tags[i])) sectortags[tags[i]] = new List<Sector>();
sectortags[tags[i]].Add(s);
}
}
}
}
if (l.Action == 97 || l.Action == 98 || l.Action == 99)
{
int[] tags = new int[5];
tags[0] = l.Tag;
if (l.IsFlagSet("8192"))
{
tags[1] = l.Front.OffsetX;
tags[2] = l.Front.OffsetY;
}
if (l.IsFlagSet("32768") && l.Back != null)
{
tags[3] = l.Back.OffsetX;
tags[4] = l.Back.OffsetY;
}
foreach (int tag in tags)
{
if (tag == 0) continue;
if (!sectortags.ContainsKey(tag)) sectortags[tag] = new List<Sector>();
if (l.Action == 97 || l.Action == 99) sectortags[tag].Add(l.Front.Sector);
if (l.Action == 98 || l.Action == 99) sectortags[tag].Add(l.Back.Sector);
}
}
//MascaraSnake: Flat alignment
//With flat offset/rotation fixes by Justburner
if (l.IsFlatAlignment)
@ -1029,9 +1098,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
ApplyFlatAlignment(l, s, alignfloor, alignceiling, offset, rotation);
}
}
//MascaraSnake: Colormap
if (l.IsColormap && l.Front != null && General.Settings.ShowColormaps)
//MascaraSnake: Colormap
if (l.IsColormap && l.Front != null && General.Settings.ShowColormaps)
{
int sectortag = l.Tag;
int color;
@ -3829,7 +3898,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
RebuildElementData();
UpdateChangedObjects();
General.Interface.DisplayStatus(StatusType.Action, "Reset actions and tags for " + selection.Count + (selection.Count == 1 ? " surface." : " surfaces."));
ClearSelection();
ShowTargetInfo();
}
@ -3873,7 +3941,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
//update changed geometry
RebuildElementData();
UpdateChangedObjects();
ClearSelection();
ShowTargetInfo();
General.Interface.DisplayStatus(StatusType.Action, "Reset flags for " +
selection.Count + (selection.Count == 1 ? " surface and " : " surfaces and ") +
@ -4215,7 +4282,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
RebuildElementData();
UpdateChangedObjects();
ClearSelection();
ShowTargetInfo();
}
@ -4245,6 +4311,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
int counter = 0;
List<IVisualEventReceiver> selected = GetSelectedObjects(true, true, true, true);
if (selected.Count == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "Selecting single-sided lines only requires selected surfaces!");
return;
}
foreach (IVisualEventReceiver i in selected)
if (i is BaseVisualGeometrySidedef)
{
@ -4269,6 +4342,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
int counter = 0;
List<IVisualEventReceiver> selected = GetSelectedObjects(true, true, true, true);
if (selected.Count == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "Selecting double-sided lines only requires selected surfaces!");
return;
}
foreach (IVisualEventReceiver i in selected)
if (i is BaseVisualGeometrySidedef)
{
@ -4292,6 +4372,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
int counter = 0;
List<IVisualEventReceiver> selected = GetSelectedObjects(true, true, true, true);
if (selected.Count == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "Selecting floors only requires selected surfaces!");
return;
}
foreach (IVisualEventReceiver i in selected)
if (i is VisualFloor)
counter++;
@ -4312,6 +4398,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
int counter = 0;
List<IVisualEventReceiver> selected = GetSelectedObjects(true, true, true, true);
if (selected.Count == 0)
{
General.Interface.DisplayStatus(StatusType.Warning, "Selecting ceilings only requires selected surfaces!");
return;
}
foreach (IVisualEventReceiver i in selected)
if (i is VisualCeiling)
counter++;