Fixed "fixed things scale" option behaving weirdly

This commit is contained in:
spherallic 2023-02-06 11:08:00 +01:00
parent 398bd9fee7
commit 4321beca2d
2 changed files with 10 additions and 11 deletions

View file

@ -3544,8 +3544,8 @@ namespace CodeImp.DoomBuilder.Map
float ts;
if(t.FixedSize && General.Map.Renderer2D.Scale > 1.0f)
ts = t.Size / General.Map.Renderer2D.Scale;
else if(General.Settings.FixedThingsScale && t.Size * General.Map.Renderer2D.Scale > Renderer2D.FIXED_THING_SIZE)
ts = Renderer2D.FIXED_THING_SIZE / General.Map.Renderer2D.Scale;
else if(General.Settings.FixedThingsScale)
ts = General.Map.Renderer2D.Scale;
else
ts = t.Size;

View file

@ -52,7 +52,6 @@ namespace CodeImp.DoomBuilder.Rendering
private const int THING_BUFFER_SIZE = 100;
private const float MINIMUM_THING_RADIUS = 1.5f; //mxd
private const float MINIMUM_SPRITE_RADIUS = 8.0f; //mxd
internal const float FIXED_THING_SIZE = 48.0f; //mxd
internal const int NUM_VIEW_MODES = 4;
#endregion
@ -963,17 +962,17 @@ namespace CodeImp.DoomBuilder.Rendering
if(t.FixedSize && scale > 1.0f)
{
circlesize = t.Size;
circlesize = thingsize;
bboxsize = -1;
}
else if(General.Settings.FixedThingsScale && t.Size * scale > FIXED_THING_SIZE)
else if(General.Settings.FixedThingsScale)
{
circlesize = FIXED_THING_SIZE;
circlesize = thingsize;
bboxsize = t.Size * scale;
}
else
{
circlesize = t.Size * scale;
circlesize = thingsize * scale;
bboxsize = -1;
}
@ -1050,8 +1049,8 @@ namespace CodeImp.DoomBuilder.Rendering
float arrowsize;
if(t.FixedSize && scale > 1.0f)
arrowsize = thingsize * THING_ARROW_SIZE;
else if(General.Settings.FixedThingsScale && thingsize * scale > FIXED_THING_SIZE)
arrowsize = FIXED_THING_SIZE * THING_ARROW_SIZE;
else if(General.Settings.FixedThingsScale)
arrowsize = thingsize * THING_ARROW_SIZE;
else
arrowsize = thingsize * scale * THING_ARROW_SIZE;
@ -1288,9 +1287,9 @@ namespace CodeImp.DoomBuilder.Rendering
spritescale = 1.0f;
forcespriterendering = true; // Always render sprite when thing size is affected by FixedSize setting
}
else if(General.Settings.FixedThingsScale && t.Size * scale > FIXED_THING_SIZE)
else if(General.Settings.FixedThingsScale)
{
spritescale = FIXED_THING_SIZE / t.Size;
spritescale = 1.0f;
forcespriterendering = true; // Always render sprite when thing size is affected by FixedThingsScale setting
}
else