mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-16 17:11:28 +00:00
Don't clamp floor/ceiling texture offsets prematurely
This commit is contained in:
parent
f1d1ac0e55
commit
56a38ee16d
2 changed files with 8 additions and 4 deletions
|
@ -302,9 +302,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
//mxd
|
||||
Sector s = GetControlSector();
|
||||
double texsizex = General.Map.Config.ScaledFlatOffsets ? Texture.ScaledWidth : (Texture.ScaledWidth / s.Fields.GetValue("xscaleceiling", 1.0));
|
||||
double texsizey = General.Map.Config.ScaledFlatOffsets ? Texture.ScaledHeight : (Texture.ScaledHeight / s.Fields.GetValue("yscaleceiling", 1.0));
|
||||
s.Fields.BeforeFieldsChange();
|
||||
double nx = (s.Fields.GetValue("xpanningceiling", 0.0) + offsetx) % (Texture.ScaledWidth / s.Fields.GetValue("xscaleceiling", 1.0));
|
||||
double ny = (s.Fields.GetValue("ypanningceiling", 0.0) + offsety) % (Texture.ScaledHeight / s.Fields.GetValue("yscaleceiling", 1.0));
|
||||
double nx = (s.Fields.GetValue("xpanningceiling", 0.0) + offsetx) % texsizex;
|
||||
double ny = (s.Fields.GetValue("ypanningceiling", 0.0) + offsety) % texsizey;
|
||||
s.Fields["xpanningceiling"] = new UniValue(UniversalType.Float, nx);
|
||||
s.Fields["ypanningceiling"] = new UniValue(UniversalType.Float, ny);
|
||||
s.UpdateNeeded = true;
|
||||
|
|
|
@ -256,9 +256,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
//mxd
|
||||
Sector s = GetControlSector();
|
||||
double texsizex = General.Map.Config.ScaledFlatOffsets ? Texture.ScaledWidth : (Texture.ScaledWidth / s.Fields.GetValue("xscalefloor", 1.0));
|
||||
double texsizey = General.Map.Config.ScaledFlatOffsets ? Texture.ScaledHeight : (Texture.ScaledHeight / s.Fields.GetValue("yscalefloor", 1.0));
|
||||
s.Fields.BeforeFieldsChange();
|
||||
double nx = (s.Fields.GetValue("xpanningfloor", 0.0) + offsetx) % (Texture.ScaledWidth / s.Fields.GetValue("xscalefloor", 1.0));
|
||||
double ny = (s.Fields.GetValue("ypanningfloor", 0.0) + offsety) % (Texture.ScaledHeight / s.Fields.GetValue("yscalefloor", 1.0));
|
||||
double nx = (s.Fields.GetValue("xpanningfloor", 0.0) + offsetx) % texsizex;
|
||||
double ny = (s.Fields.GetValue("ypanningfloor", 0.0) + offsety) % texsizey;
|
||||
s.Fields["xpanningfloor"] = new UniValue(UniversalType.Float, nx);
|
||||
s.Fields["ypanningfloor"] = new UniValue(UniversalType.Float, ny);
|
||||
s.UpdateNeeded = true;
|
||||
|
|
Loading…
Reference in a new issue