Visual mode, auto align textures: vertical texture offsets of middle sidedefs are no longer clamped by texture height when said sidedefs are parts of 3d floor or are double-sided and not wrapped.

This commit is contained in:
MaxED 2013-11-06 13:07:48 +00:00
parent 1be5a9e2ab
commit 766e4d46f3

View file

@ -3218,9 +3218,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(j.sidedef.Index != j.controlSide.Index) {
offset -= j.controlSide.OffsetY;
offset -= j.controlSide.Fields.GetValue("offsety_mid", 0.0f);
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset % texture.Height);
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset);
} else {
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetMiddleOffsetY(j.sidedef, offset, j.scaleY, true) % texture.Height);//mxd
offset = GetMiddleOffsetY(j.sidedef, offset, j.scaleY, true);
//mxd. Clamp offset if this part is middle single or wrapped middle double
if(j.sidedef.Other == null || j.sidedef.IsFlagSet("wrapmidtex") || j.sidedef.Line.IsFlagSet("wrapmidtex")) {
offset %= texture.Height;
}
j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset);//mxd
}
}
}