Fixed some issues with 3D circle rendering, plus UDMF config changes:

- Added unique sprite sprites for custom rows/circles of items
- Set default values for hoops and custom rows/circles of items
This commit is contained in:
spherallic 2023-09-20 02:18:22 +02:00
parent 4aa373aba8
commit aaa469e838
4 changed files with 31 additions and 8 deletions

View file

@ -2341,7 +2341,7 @@ udmf
arrow = 1; arrow = 1;
title = "Special Placement Patterns"; title = "Special Placement Patterns";
width = 16; width = 16;
height = 384; height = 64;
sprite = "RINGA0"; sprite = "RINGA0";
600 600
@ -2349,6 +2349,7 @@ udmf
arrow = 0; arrow = 0;
title = "5 Vertical Rings (Yellow Spring)"; title = "5 Vertical Rings (Yellow Spring)";
sprite = "internal:ringverticalyellow"; sprite = "internal:ringverticalyellow";
height = 384;
} }
601 601
{ {
@ -2382,6 +2383,7 @@ udmf
title = "Circle of Rings (Big)"; title = "Circle of Rings (Big)";
sprite = "internal:circlebigring"; sprite = "internal:circlebigring";
width = 192; width = 192;
height = 384;
centerhitbox = true; centerhitbox = true;
} }
606 606
@ -2397,6 +2399,7 @@ udmf
title = "Circle of Blue Spheres (Big)"; title = "Circle of Blue Spheres (Big)";
sprite = "internal:circlebigsphere"; sprite = "internal:circlebigsphere";
width = 192; width = 192;
height = 384;
centerhitbox = true; centerhitbox = true;
} }
608 608
@ -2412,23 +2415,29 @@ udmf
title = "Circle of Rings and Spheres (Big)"; title = "Circle of Rings and Spheres (Big)";
sprite = "internal:circlebigringsphere"; sprite = "internal:circlebigringsphere";
width = 192; width = 192;
height = 384;
centerhitbox = true; centerhitbox = true;
} }
610 610
{ {
title = "Row of Items"; title = "Row of Items";
sprite = "RINGA0"; sprite = "internal:customrow";
width = 32;
height = 384;
arg0 arg0
{ {
title = "Number of items"; title = "Number of items";
default = 5;
} }
arg1 arg1
{ {
title = "Horizontal spacing"; title = "Horizontal spacing";
default = 64;
} }
arg2 arg2
{ {
title = "Vertical spacing"; title = "Vertical spacing";
default = 64;
} }
stringarg0 stringarg0
{ {
@ -2439,17 +2448,21 @@ udmf
611 611
{ {
title = "Circle of Items"; title = "Circle of Items";
sprite = "RINGA0"; sprite = "internal:customcircle";
width = 32;
height = 64;
centerhitbox = true; centerhitbox = true;
arg0 arg0
{ {
title = "Number of items"; title = "Number of items";
default = 8;
} }
arg1 arg1
{ {
title = "Radius"; title = "Radius";
renderstyle = "circle"; renderstyle = "circle";
rendercolor = "#6600FF"; rendercolor = "#6600FF";
default = 192;
} }
stringarg0 stringarg0
{ {
@ -4538,6 +4551,7 @@ udmf
arg0 arg0
{ {
title = "Radius"; title = "Radius";
default = 96;
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
Build/Sprites/customrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

View file

@ -497,7 +497,10 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
if(tti == null) continue; if(tti == null) continue;
Vector3D pos = t.Position; Vector3D pos = t.Position;
pos.z += GetCorrectHeight(t, blockmap, false); if (t.AbsoluteZ)
pos.z = GetCorrectHeight(t, blockmap, tti.CenterHitbox);
else
pos.z += GetCorrectHeight(t, blockmap, tti.CenterHitbox);
for(int i = 0; i < t.Args.Length; i++) for(int i = 0; i < t.Args.Length; i++)
{ {
@ -1051,10 +1054,16 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
// Required only when called from VisualMode // Required only when called from VisualMode
private static double GetCorrectHeight(Thing thing, VisualBlockMap blockmap, bool usethingcenter) private static double GetCorrectHeight(Thing thing, VisualBlockMap blockmap, bool usethingcenter)
{ {
if(blockmap == null) return 0f; if (blockmap == null) return 0f;
double height = (usethingcenter ? thing.Height / 2f : 0f); double height = (usethingcenter ? 0f : (thing.IsFlipped ? thing.Height : 0f));
if(thing.Sector == null) thing.DetermineSector(blockmap);
if(thing.Sector != null) height += thing.Sector.FloorHeight; if (thing.AbsoluteZ)
height = thing.Position.z + height;
else
{
if (thing.Sector == null) thing.DetermineSector(blockmap);
if (thing.Sector != null) height += thing.Sector.FloorHeight;
}
return height; return height;
} }