mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Fixed, Scale control (UDMF): in some cases default values were shown when displaying mixed values.
Fixed, long texture names support: in some cases long texture names were not processed correctly when pasting map geometry. Fixed, Visual mode: in some cases combined sidedef brightness was calculated incorrectly. Also, MAPINFO FadeColor and OutsideFogColor properties are now taken into account. Hexen_linedefs.cfg: "Door Raise" and "Door Locked Raise" used incorrect enums for "Close Delay".
This commit is contained in:
parent
e4d872536a
commit
54fccb73e7
11 changed files with 43 additions and 42 deletions
|
@ -460,7 +460,7 @@ door
|
|||
{
|
||||
title = "Close Delay";
|
||||
type = 11;
|
||||
enum = "delay_tics";
|
||||
enum = "reset_tics";
|
||||
default = 105;
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ door
|
|||
{
|
||||
title = "Close Delay";
|
||||
type = 11;
|
||||
enum = "delay_tics";
|
||||
enum = "reset_tics";
|
||||
default = 105;
|
||||
}
|
||||
|
||||
|
|
|
@ -297,9 +297,8 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Convert UDMF fields back to flags and activations, if needed
|
||||
if(!(General.Map.FormatInterface is UniversalMapSetIO)) General.Map.Map.TranslateFromUDMF();
|
||||
|
||||
//mxd. Translate texture names if needed
|
||||
if(reader.UseLongTextureNames != General.Map.Config.UseLongTextureNames)
|
||||
General.Map.Map.TranslateTextureNames(General.Map.Config.UseLongTextureNames, true);
|
||||
//mxd. Translate texture names
|
||||
General.Map.Map.TranslateTextureNames(General.Map.Config.UseLongTextureNames, true);
|
||||
|
||||
// Modify tags and actions if preferred
|
||||
if(options.ChangeTags == PasteOptions.TAGS_REMOVE) Tools.RemoveMarkedTags();
|
||||
|
|
|
@ -83,10 +83,10 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
|
|||
value1.Text = newValue1;
|
||||
value2.Text = newValue2;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
value1.Text = ((!string.IsNullOrEmpty(value1.Text) && value1.Text != newValue1) ? string.Empty : newValue1);
|
||||
value2.Text = ((!string.IsNullOrEmpty(value2.Text) && value2.Text != newValue2) ? string.Empty : newValue2);
|
||||
if(!string.IsNullOrEmpty(value1.Text)) value1.Text = (value1.Text != newValue1 ? string.Empty : newValue1);
|
||||
if(!string.IsNullOrEmpty(value2.Text)) value2.Text = (value2.Text != newValue2 ? string.Empty : newValue2);
|
||||
}
|
||||
CheckValues();
|
||||
|
||||
|
|
|
@ -3317,7 +3317,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
string ft = GetShortTextureName(s.FloorTexture);
|
||||
if (ft != s.FloorTexture)
|
||||
{
|
||||
s.SetFloorTexture(Lump.MakeLongName(ft));
|
||||
s.SetFloorTexture(ft);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -3326,7 +3326,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
string ct = GetShortTextureName(s.CeilTexture);
|
||||
if (ct != s.CeilTexture)
|
||||
{
|
||||
s.SetCeilTexture(Lump.MakeLongName(ct));
|
||||
s.SetCeilTexture(ct);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -3339,7 +3339,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
string ht = GetShortTextureName(s.HighTexture);
|
||||
if (ht != s.HighTexture)
|
||||
{
|
||||
s.SetTextureHigh(Lump.MakeLongName(ht));
|
||||
s.SetTextureHigh(ht);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -3348,7 +3348,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
string mt = GetShortTextureName(s.MiddleTexture);
|
||||
if (mt != s.MiddleTexture)
|
||||
{
|
||||
s.SetTextureMid(Lump.MakeLongName(mt));
|
||||
s.SetTextureMid(mt);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -3357,7 +3357,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
string lt = GetShortTextureName(s.LowTexture);
|
||||
if (lt != s.LowTexture)
|
||||
{
|
||||
s.SetTextureLow(Lump.MakeLongName(lt));
|
||||
s.SetTextureLow(lt);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,9 +121,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// From UDMF field
|
||||
string field = Sidedef.Line.Fields.GetValue("renderstyle", "translucent");
|
||||
alpha = (byte)(Sidedef.Line.Fields.GetValue("alpha", 1.0f) * 255.0f);
|
||||
if(alpha == 255 && Sidedef.Line.IsFlagSet("transparent")) { //mxd
|
||||
alpha = 64;
|
||||
}
|
||||
if(alpha == 255 && Sidedef.Line.IsFlagSet("transparent")) alpha = 64; //mxd
|
||||
|
||||
if(field == "add")
|
||||
this.RenderPass = RenderPass.Additive;
|
||||
|
@ -157,12 +155,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
|
||||
// This creates vertices from a wall polygon and applies lighting
|
||||
protected List<WorldVertex> CreatePolygonVertices(WallPolygon poly, TexturePlane tp, SectorData sd, int lightvalue, bool lightabsolute)
|
||||
/*protected List<WorldVertex> CreatePolygonVertices(WallPolygon poly, TexturePlane tp, SectorData sd, int lightvalue, bool lightabsolute)
|
||||
{
|
||||
List<WallPolygon> polylist = new List<WallPolygon>(1);
|
||||
polylist.Add(poly);
|
||||
return CreatePolygonVertices(polylist, tp, sd, lightvalue, lightabsolute);
|
||||
}
|
||||
}*/
|
||||
|
||||
// This creates vertices from a wall polygon and applies lighting
|
||||
protected List<WorldVertex> CreatePolygonVertices(List<WallPolygon> poly, TexturePlane tp, SectorData sd, int lightvalue, bool lightabsolute)
|
||||
|
@ -371,6 +369,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
poly = newp;
|
||||
}
|
||||
|
||||
//mxd
|
||||
protected void GetLightValue(out int lightvalue, out bool lightabsolute)
|
||||
{
|
||||
lightabsolute = Sidedef.IsFlagSet("lightabsolute");
|
||||
bool affectedbyfog = General.Map.Data.MapInfo.HasFadeColor || (Sector.Sector.CeilTexture == General.Map.Config.SkyFlatName && General.Map.Data.MapInfo.HasOutsideFogColor) || Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
bool ignorelight = affectedbyfog && !Sidedef.IsFlagSet("lightfog") && !lightabsolute;
|
||||
lightvalue = ignorelight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if(ignorelight) lightabsolute = false;
|
||||
}
|
||||
|
||||
//mxd
|
||||
protected static float GetRoundedTextureOffset(float oldValue, float offset, float scale, float textureSize)
|
||||
{
|
||||
|
|
|
@ -64,10 +64,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Vector2D vl, vr;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(Sidedef.Fields.GetValue("scalex_bottom", 1.0f),
|
||||
Sidedef.Fields.GetValue("scaley_bottom", 1.0f));
|
||||
|
|
|
@ -68,10 +68,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.extrafloor = extrafloor;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(sourceside.Fields.GetValue("scalex_mid", 1.0f),
|
||||
sourceside.Fields.GetValue("scaley_mid", 1.0f));
|
||||
|
|
|
@ -46,10 +46,9 @@ namespace CodeImp.DoomBuilder.BuilderModes {
|
|||
this.extrafloor = extrafloor;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(sourceside.Fields.GetValue("scalex_mid", 1.0f),
|
||||
sourceside.Fields.GetValue("scaley_mid", 1.0f));
|
||||
|
|
|
@ -74,10 +74,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Vector2D vl, vr;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(Sidedef.Fields.GetValue("scalex_mid", 1.0f),
|
||||
Sidedef.Fields.GetValue("scaley_mid", 1.0f));
|
||||
|
|
|
@ -64,10 +64,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Vector2D vl, vr;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(Sidedef.Fields.GetValue("scalex_mid", 1.0f),
|
||||
Sidedef.Fields.GetValue("scaley_mid", 1.0f));
|
||||
|
|
|
@ -64,10 +64,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Vector2D vl, vr;
|
||||
|
||||
//mxd. lightfog flag support
|
||||
bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false);
|
||||
bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor");
|
||||
int lightvalue = ignoreUDMFLight ? 0 : Sidedef.Fields.GetValue("light", 0); //mxd
|
||||
if (ignoreUDMFLight) lightabsolute = false;
|
||||
int lightvalue;
|
||||
bool lightabsolute;
|
||||
GetLightValue(out lightvalue, out lightabsolute);
|
||||
|
||||
Vector2D tscale = new Vector2D(Sidedef.Fields.GetValue("scalex_top", 1.0f),
|
||||
Sidedef.Fields.GetValue("scaley_top", 1.0f));
|
||||
|
|
Loading…
Reference in a new issue