mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Rename SRB2Type back to Type
This commit is contained in:
parent
ee37a21720
commit
fc748c18c9
59 changed files with 175 additions and 175 deletions
|
@ -712,7 +712,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
foreach(string f in defaultthingflags) t.SetFlag(f, true);
|
||||
|
||||
//mxd. Set default arguments
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(tti != null)
|
||||
{
|
||||
t.Args[0] = (int)tti.Args[0].DefaultValue;
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
flagsPanel.Left = spritepanel.Left + spritepanel.Width + spritepanel.Margin.Right + flagsPanel.Margin.Left; //mxd
|
||||
|
||||
// Lookup thing info
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
|
||||
// Get thing action information
|
||||
LinedefActionInfo act;
|
||||
|
@ -103,7 +103,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
// Thing info
|
||||
infopanel.Text = " Thing " + t.Index + " ";
|
||||
type.Text = t.SRB2Type + " - " + ti.Title;
|
||||
type.Text = t.Type + " - " + ti.Title;
|
||||
if(ti.IsObsolete) type.Text += " - OBSOLETE"; //mxd
|
||||
action.Text = actioninfo;
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(t.SRB2Type == 1)
|
||||
if(t.Type == 1)
|
||||
{
|
||||
//store thing and position
|
||||
if(start == null)
|
||||
|
|
|
@ -361,10 +361,10 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
bool qualifies = true;
|
||||
|
||||
// Get thing info
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
|
||||
// Check against simple properties
|
||||
qualifies &= (thingtype == -1) || (t.SRB2Type == thingtype);
|
||||
qualifies &= (thingtype == -1) || (t.Type == thingtype);
|
||||
qualifies &= (thingangle == -1) || (Angle2D.RealToDoom(t.Angle) == thingangle);
|
||||
qualifies &= (thingzheight == int.MinValue) || ((int)(t.Position.z) == thingzheight);
|
||||
qualifies &= (thingaction == -1) || (t.Action == thingaction);
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
// Process oh so special things
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info == null) continue;
|
||||
switch(info.ClassName.ToLowerInvariant())
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
// We may need all of these actors...
|
||||
foreach(Thing t in General.Map.ThingsFilter.VisibleThings)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info == null) continue;
|
||||
switch(info.ClassName.ToLowerInvariant())
|
||||
{
|
||||
|
|
|
@ -47,15 +47,15 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(thingcounts.ContainsKey(t.SRB2Type))
|
||||
if(thingcounts.ContainsKey(t.Type))
|
||||
{
|
||||
thingcounts[t.SRB2Type]++;
|
||||
thingcounts[t.Type]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
thingcounts.Add(t.SRB2Type, 1);
|
||||
thingtitles.Add(t.SRB2Type, "Unknown thing");
|
||||
thingclasses.Add(t.SRB2Type, "-");
|
||||
thingcounts.Add(t.Type, 1);
|
||||
thingtitles.Add(t.Type, "Unknown thing");
|
||||
thingclasses.Add(t.Type, "-");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
{
|
||||
List<Thing> list = new List<Thing>();
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
if(t.SRB2Type == type) list.Add(t);
|
||||
if(t.Type == type) list.Add(t);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -667,7 +667,7 @@ namespace CodeImp.DoomBuilder
|
|||
// Remove all flags from all 3D Start things
|
||||
foreach (Thing t in outputset.Things)
|
||||
{
|
||||
if (t.SRB2Type == config.Start3DModeThingType)
|
||||
if (t.Type == config.Start3DModeThingType)
|
||||
{
|
||||
// We're not using SetFlag here, this doesn't have to be undone.
|
||||
// Please note that this is totally exceptional!
|
||||
|
|
|
@ -2155,7 +2155,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
// Checks if there's a wall at appropriate height to align thing to
|
||||
private static bool CanAlignThingTo(Thing t, Sector front, Sector back)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
int absz = GetThingAbsoluteZ(t, ti);
|
||||
int height = ti.Height == 0 ? 1 : (int)ti.Height;
|
||||
Rectangle thing = new Rectangle(0, t.IsFlipped ? absz - height : absz, 1, height);
|
||||
|
@ -2178,7 +2178,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
// Checks if there's a wall at appropriate height to align thing to
|
||||
private static bool CanAlignThingTo(Thing t, Sector sector)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
int absz = GetThingAbsoluteZ(t, ti);
|
||||
Rectangle thing = new Rectangle(0, absz, 1, ti.Height == 0 ? 1 : (int)ti.Height);
|
||||
|
||||
|
@ -2206,7 +2206,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
//keep thing height constant
|
||||
if(initialSector != t.Sector && General.Map.FormatInterface.HasThingHeight)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
if(ti.AbsoluteZ) return;
|
||||
|
||||
if(t.IsFlipped && initialSector.CeilHeight != t.Sector.CeilHeight)
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
public MapSet Map { get { return map; } }
|
||||
public int FullType { get { return type; } set { BeforePropsChange(); type = value; } } //mxd
|
||||
public int SRB2Type { get { if (General.Map.SRB2) return type % 4096; else return type; } set { BeforePropsChange(); if (General.Map.SRB2) type = (type / 4096) * 4096 + value; else type = value; } }
|
||||
public int Type { get { if (General.Map.SRB2) return type % 4096; else return type; } set { BeforePropsChange(); if (General.Map.SRB2) type = (type / 4096) * 4096 + value; else type = value; } }
|
||||
public int Parameter { get { if (General.Map.SRB2) return type / 4096; else return 0; } set { BeforePropsChange(); if (General.Map.SRB2) type = value * 4096 + (type % 4096); } }
|
||||
public Vector3D Position { get { return pos; } }
|
||||
public float ScaleX { get { return scaleX; } } //mxd. This is UDMF property, not actual scale!
|
||||
|
@ -121,17 +121,17 @@ namespace CodeImp.DoomBuilder.Map
|
|||
public bool IsModel { get { return ismodel; } } //mxd
|
||||
public bool IsDirectional { get { return directional; } } //mxd
|
||||
public bool Highlighted { get { return highlighted; } set { highlighted = value; } } //mxd
|
||||
public bool IsSlopeVertex { get { return General.Map.FormatInterface.SlopeVertexType == this.SRB2Type; } }
|
||||
public bool IsSlopeVertex { get { return General.Map.FormatInterface.SlopeVertexType == this.Type; } }
|
||||
public bool IsFlipped
|
||||
{
|
||||
get
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(Type);
|
||||
return ti.Hangs ^ IsReverse;
|
||||
}
|
||||
}
|
||||
public bool IsReverse { get { return General.Map.SRB2 && !Unflippable && IsFlagSet("2"); } }
|
||||
public bool Unflippable { get { return General.Map.Data.GetThingInfo(SRB2Type).IsUnflippable; } }
|
||||
public bool Unflippable { get { return General.Map.Data.GetThingInfo(Type).IsUnflippable; } }
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
@ -424,7 +424,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Change position
|
||||
this.pos = newpos;
|
||||
|
||||
if (SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if (Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Change position
|
||||
this.pos = p;
|
||||
|
||||
if (SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if (Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.anglerad = newangle;
|
||||
this.angledoom = Angle2D.RealToDoom(newangle);
|
||||
|
||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if(Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
anglerad = Angle2D.DoomToReal(newangle);
|
||||
angledoom = newangle;
|
||||
|
||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if(Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
|
@ -486,9 +486,9 @@ namespace CodeImp.DoomBuilder.Map
|
|||
BeforePropsChange();
|
||||
|
||||
pitch = General.ClampAngle(newpitch);
|
||||
pitchrad = ((ismodel && General.Map.Data.ModeldefEntries[SRB2Type].InheritActorPitch) ? Angle2D.DegToRad(pitch) : 0);
|
||||
pitchrad = ((ismodel && General.Map.Data.ModeldefEntries[Type].InheritActorPitch) ? Angle2D.DegToRad(pitch) : 0);
|
||||
|
||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if(Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
|
@ -498,9 +498,9 @@ namespace CodeImp.DoomBuilder.Map
|
|||
BeforePropsChange();
|
||||
|
||||
roll = General.ClampAngle(newroll);
|
||||
rollrad = ( (rollsprite || (ismodel && General.Map.Data.ModeldefEntries[SRB2Type].InheritActorRoll)) ? Angle2D.DegToRad(roll) : 0);
|
||||
rollrad = ( (rollsprite || (ismodel && General.Map.Data.ModeldefEntries[Type].InheritActorRoll)) ? Angle2D.DegToRad(roll) : 0);
|
||||
|
||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if(Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
scaleX = scalex;
|
||||
scaleY = scaley;
|
||||
|
||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||
if(Type != General.Map.Config.Start3DModeThingType)
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
|
@ -543,7 +543,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
public void UpdateConfiguration()
|
||||
{
|
||||
// Lookup settings
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(Type);
|
||||
|
||||
// Apply size
|
||||
size = ti.Radius;
|
||||
|
@ -587,14 +587,14 @@ namespace CodeImp.DoomBuilder.Map
|
|||
return;
|
||||
}
|
||||
|
||||
ismodel = General.Map.Data.ModeldefEntries.ContainsKey(SRB2Type);
|
||||
if(ismodel && General.Map.Data.ModeldefEntries[SRB2Type].LoadState == ModelLoadState.None)
|
||||
ismodel = General.Map.Data.ProcessModel(SRB2Type);
|
||||
ismodel = General.Map.Data.ModeldefEntries.ContainsKey(Type);
|
||||
if(ismodel && General.Map.Data.ModeldefEntries[Type].LoadState == ModelLoadState.None)
|
||||
ismodel = General.Map.Data.ProcessModel(Type);
|
||||
|
||||
if(ismodel)
|
||||
{
|
||||
rollrad = (General.Map.Data.ModeldefEntries[SRB2Type].InheritActorRoll ? Angle2D.DegToRad(roll) : 0);
|
||||
pitchrad = (General.Map.Data.ModeldefEntries[SRB2Type].InheritActorPitch ? Angle2D.DegToRad(pitch) : 0);
|
||||
rollrad = (General.Map.Data.ModeldefEntries[Type].InheritActorRoll ? Angle2D.DegToRad(roll) : 0);
|
||||
pitchrad = (General.Map.Data.ModeldefEntries[Type].InheritActorPitch ? Angle2D.DegToRad(pitch) : 0);
|
||||
}
|
||||
else if(rollsprite)
|
||||
{
|
||||
|
|
|
@ -538,11 +538,11 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
if(t.Selected) return General.Colors.Selection;
|
||||
|
||||
//mxd. If thing is light, set it's color to light color:
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type) != -1)
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Type) != -1)
|
||||
{
|
||||
if(t.SRB2Type == 1502) //vavoom light
|
||||
if(t.Type == 1502) //vavoom light
|
||||
return new PixelColor(255, 255, 255, 255);
|
||||
if(t.SRB2Type == 1503) //vavoom colored light
|
||||
if(t.Type == 1503) //vavoom colored light
|
||||
return new PixelColor(255, (byte)t.Args[1], (byte)t.Args[2], (byte)t.Args[3]);
|
||||
return new PixelColor(255, (byte)t.Args[0], (byte)t.Args[1], (byte)t.Args[2]);
|
||||
}
|
||||
|
@ -1190,8 +1190,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
//collect models
|
||||
if(t.IsModel)
|
||||
{
|
||||
if(!modelsByType.ContainsKey(t.SRB2Type)) modelsByType.Add(t.SRB2Type, new List<Thing>());
|
||||
modelsByType[t.SRB2Type].Add(t);
|
||||
if(!modelsByType.ContainsKey(t.Type)) modelsByType.Add(t.Type, new List<Thing>());
|
||||
modelsByType[t.Type].Add(t);
|
||||
}
|
||||
|
||||
// Create vertices
|
||||
|
@ -1202,8 +1202,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
buffercount++;
|
||||
|
||||
//mxd
|
||||
if(!thingsByType.ContainsKey(t.SRB2Type)) thingsByType.Add(t.SRB2Type, new List<Thing>());
|
||||
thingsByType[t.SRB2Type].Add(t);
|
||||
if(!thingsByType.ContainsKey(t.Type)) thingsByType.Add(t.Type, new List<Thing>());
|
||||
thingsByType[t.Type].Add(t);
|
||||
}
|
||||
|
||||
totalcount++;
|
||||
|
@ -1458,7 +1458,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
|
||||
Matrix rotation = Matrix.RotationY(-t.RollRad) * Matrix.RotationX(t.PitchRad) * Matrix.RotationZ(t.Angle);
|
||||
Matrix position = Matrix.Translation(screenpos.x, screenpos.y, 0.0f);
|
||||
Matrix world = General.Map.Data.ModeldefEntries[t.SRB2Type].Transform * modelscale * rotation * viewscale * position;
|
||||
Matrix world = General.Map.Data.ModeldefEntries[t.Type].Transform * modelscale * rotation * viewscale * position;
|
||||
|
||||
graphics.Shaders.Things2D.SetTransformSettings(world);
|
||||
graphics.Shaders.Things2D.ApplySettings();
|
||||
|
@ -1505,7 +1505,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
|
||||
foreach (Thing t in things)
|
||||
{
|
||||
int type = t.SRB2Type;
|
||||
int type = t.Type;
|
||||
if (type == General.Map.FormatInterface.AxisType) axes.Add(t);
|
||||
if (type == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t);
|
||||
if (type == General.Map.FormatInterface.WaypointType) waypoints.Add(t);
|
||||
|
|
|
@ -853,7 +853,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
world = CreateThingPositionMatrix(t);
|
||||
|
||||
//mxd. If current thing is light - set it's color to light color
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness)
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
|
||||
{
|
||||
wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor
|
||||
vertexcolor = t.LightColor;
|
||||
|
@ -1190,7 +1190,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
world = CreateThingPositionMatrix(t);
|
||||
|
||||
//mxd. If current thing is light - set it's color to light color
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness)
|
||||
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
|
||||
{
|
||||
wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor
|
||||
vertexcolor = t.LightColor;
|
||||
|
@ -1449,7 +1449,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
|
||||
Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle);
|
||||
|
||||
world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position;
|
||||
world = General.Map.Data.ModeldefEntries[t.Thing.Type].Transform * modelscale * modelrotation * t.Position;
|
||||
ApplyMatrices3D();
|
||||
|
||||
//mxd. Set variables for fog rendering
|
||||
|
@ -1558,7 +1558,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
|
||||
Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle);
|
||||
|
||||
world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position;
|
||||
world = General.Map.Data.ModeldefEntries[t.Thing.Type].Transform * modelscale * modelrotation * t.Position;
|
||||
ApplyMatrices3D();
|
||||
|
||||
//mxd. Set variables for fog rendering
|
||||
|
@ -1569,7 +1569,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor);
|
||||
}
|
||||
|
||||
GZModel model = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Model;
|
||||
GZModel model = General.Map.Data.ModeldefEntries[t.Thing.Type].Model;
|
||||
for(int i = 0; i < model.Meshes.Count; i++)
|
||||
{
|
||||
graphics.Shaders.World3D.Texture1 = model.Textures[i];
|
||||
|
@ -1647,7 +1647,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
foreach(VisualThing lt in lightthings)
|
||||
{
|
||||
// Don't light self
|
||||
if(General.Map.Data.GldefsEntries.ContainsKey(t.Thing.SRB2Type) && General.Map.Data.GldefsEntries[t.Thing.SRB2Type].DontLightSelf && t.Thing.Index == lt.Thing.Index)
|
||||
if(General.Map.Data.GldefsEntries.ContainsKey(t.Thing.Type) && General.Map.Data.GldefsEntries[t.Thing.Type].DontLightSelf && t.Thing.Index == lt.Thing.Index)
|
||||
continue;
|
||||
|
||||
float distSquared = Vector3.DistanceSquared(lt.Center, t.PositionV3);
|
||||
|
@ -1760,7 +1760,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
{
|
||||
case RenderPass.Mask:
|
||||
case RenderPass.Solid:
|
||||
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type];
|
||||
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.Type];
|
||||
if(!maskedmodelthings.ContainsKey(mde)) maskedmodelthings.Add(mde, new List<VisualThing>());
|
||||
maskedmodelthings[mde].Add(t);
|
||||
break;
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace CodeImp.DoomBuilder.Types
|
|||
// Check target class?
|
||||
if(arginfo.TargetClasses.Count > 0)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info != null && !arginfo.TargetClasses.Contains(info.ClassName)) continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
// Find a 3D Mode thing
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
|
||||
if(t.Type == General.Map.Config.Start3DModeThingType)
|
||||
{
|
||||
modething = t;
|
||||
break; //mxd
|
||||
|
@ -147,7 +147,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
// Find a 3D Mode thing
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
|
||||
if(t.Type == General.Map.Config.Start3DModeThingType)
|
||||
{
|
||||
modething = t;
|
||||
break; //mxd
|
||||
|
|
|
@ -290,7 +290,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
Thing start = null;
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(t.SRB2Type == 1)
|
||||
if(t.Type == 1)
|
||||
{
|
||||
//store thing and position
|
||||
if (start == null)
|
||||
|
|
|
@ -504,7 +504,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
protected void CheckLightState()
|
||||
{
|
||||
//mxd. Check if thing is light
|
||||
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.SRB2Type);
|
||||
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.Type);
|
||||
if(light_id != -1)
|
||||
{
|
||||
isGldefsLight = false;
|
||||
|
@ -513,7 +513,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
UpdateBoundingBox(lightRadius, lightRadius * 2);
|
||||
}
|
||||
//check if we have light from GLDEFS
|
||||
else if(General.Map.Data.GldefsEntries.ContainsKey(thing.SRB2Type))
|
||||
else if(General.Map.Data.GldefsEntries.ContainsKey(thing.Type))
|
||||
{
|
||||
isGldefsLight = true;
|
||||
UpdateGldefsLight();
|
||||
|
@ -536,7 +536,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
//mxd. Used in ColorPicker to update light
|
||||
public void UpdateLight()
|
||||
{
|
||||
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.SRB2Type);
|
||||
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.Type);
|
||||
if(light_id != -1)
|
||||
{
|
||||
UpdateLight(light_id);
|
||||
|
@ -578,7 +578,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
thing.Args[1] / SUBLIGHT_INTENSITY_SCALER,
|
||||
thing.Args[2] / SUBLIGHT_INTENSITY_SCALER);
|
||||
}
|
||||
lightType = (DynamicLightType)(thing.SRB2Type - 9800 - n);
|
||||
lightType = (DynamicLightType)(thing.Type - 9800 - n);
|
||||
|
||||
if(lightType == DynamicLightType.SECTOR)
|
||||
{
|
||||
|
@ -595,7 +595,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
else //it's one of vavoom lights
|
||||
{
|
||||
lightRenderStyle = DynamicLightRenderStyle.VAVOOM;
|
||||
lightType = (DynamicLightType)thing.SRB2Type;
|
||||
lightType = (DynamicLightType)thing.Type;
|
||||
if(lightType == DynamicLightType.VAVOOM_COLORED)
|
||||
{
|
||||
lightColor = new Color4((float)lightRenderStyle / 100.0f,
|
||||
|
@ -617,7 +617,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
//mxd
|
||||
private void UpdateGldefsLight()
|
||||
{
|
||||
DynamicLightData light = General.Map.Data.GldefsEntries[thing.SRB2Type];
|
||||
DynamicLightData light = General.Map.Data.GldefsEntries[thing.Type];
|
||||
|
||||
//apply settings
|
||||
lightRenderStyle = light.Subtractive ? DynamicLightRenderStyle.NEGATIVE : DynamicLightRenderStyle.NORMAL;
|
||||
|
|
|
@ -3817,8 +3817,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(IsInfoPanelExpanded) thinginfo.ShowInfo(t);
|
||||
|
||||
// Show info on collapsed label
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
labelcollapsedinfo.Text = t.SRB2Type + " - " + ti.Title;
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
labelcollapsedinfo.Text = t.Type + " - " + ti.Title;
|
||||
labelcollapsedinfo.Refresh();
|
||||
|
||||
//mxd. let the plugins know
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
public void Apply(Thing t)
|
||||
{
|
||||
t.SRB2Type = this.Type;
|
||||
t.Type = this.Type;
|
||||
t.Parameter = this.Parameter;
|
||||
foreach (KeyValuePair<string, bool> flag in this.Flags)
|
||||
{
|
||||
|
|
|
@ -180,10 +180,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
Thing ft = General.GetByIndex(things, 0);
|
||||
|
||||
// Set type
|
||||
thingtype.SelectType(ft.SRB2Type, ft.Parameter);
|
||||
thingtype.SelectType(ft.Type, ft.Parameter);
|
||||
|
||||
// Flags
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(ft.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(ft.Type);
|
||||
IDictionary<string, string> newFlags = (ti == null || ti.Flags.Count == 0) ? General.Map.Config.ThingFlags : ti.Flags;
|
||||
|
||||
foreach (CheckBox c in flags.Checkboxes)
|
||||
|
@ -229,12 +229,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//mxd. Update sector info
|
||||
t.DetermineSector();
|
||||
|
||||
if (t.SRB2Type != ft.SRB2Type) allsametype = false;
|
||||
if (t.Type != ft.Type) allsametype = false;
|
||||
|
||||
// Type does not match?
|
||||
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
|
||||
|
||||
if(info != null && info.Index != t.SRB2Type)
|
||||
if(info != null && info.Index != t.Type)
|
||||
thingtype.ClearSelectedType();
|
||||
|
||||
// Flags
|
||||
|
|
|
@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
Thing ft = General.GetByIndex(things, 0);
|
||||
|
||||
// Set type
|
||||
thingtype.SelectType(ft.SRB2Type);
|
||||
thingtype.SelectType(ft.Type);
|
||||
|
||||
// Flags
|
||||
foreach(CheckBox c in flags.Checkboxes)
|
||||
|
@ -197,7 +197,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
posZ.ButtonStep = General.Map.Grid.GridSize;
|
||||
|
||||
//mxd. User vars. Should be done before adding regular fields
|
||||
ThingTypeInfo fti = General.Map.Data.GetThingInfoEx(ft.SRB2Type);
|
||||
ThingTypeInfo fti = General.Map.Data.GetThingInfoEx(ft.Type);
|
||||
if(fti != null && fti.Actor != null && fti.Actor.UserVars.Count > 0)
|
||||
fieldslist.SetUserVars(fti.Actor.UserVars, ft.Fields, true);
|
||||
|
||||
|
@ -238,7 +238,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Type does not match?
|
||||
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
|
||||
if(info != null && info.Index != t.SRB2Type) thingtype.ClearSelectedType();
|
||||
if(info != null && info.Index != t.Type) thingtype.ClearSelectedType();
|
||||
|
||||
// Flags
|
||||
foreach(CheckBox c in flags.Checkboxes)
|
||||
|
@ -275,7 +275,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
argscontrol.SetValue(t, false);
|
||||
|
||||
//mxd. User vars. Should be done before adding regular fields
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(ti != null && ti.Actor != null && ti.Actor.UserVars.Count > 0)
|
||||
fieldslist.SetUserVars(ti.Actor.UserVars, t.Fields, false);
|
||||
|
||||
|
@ -493,7 +493,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
UniFields.SetInteger(t.Fields, "score", score.GetResult(t.Fields.GetValue("score", 0)), 0);
|
||||
|
||||
//mxd. User vars. Should be called after fieldslist.Apply()
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(ti != null && ti.Actor != null && ti.Actor.UserVars.Count > 0)
|
||||
fieldslist.ApplyUserVars(ti.Actor.UserVars, t.Fields);
|
||||
|
||||
|
@ -708,7 +708,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
foreach(Thing t in things)
|
||||
{
|
||||
//Set type
|
||||
t.SRB2Type = thingtype.GetResult(t.SRB2Type);
|
||||
t.Type = thingtype.GetResult(t.Type);
|
||||
|
||||
// Update settings
|
||||
t.UpdateConfiguration();
|
||||
|
|
|
@ -238,7 +238,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
{
|
||||
Thing t = map.CreateThing();
|
||||
General.Settings.ApplyDefaultThingSettings(t);
|
||||
t.SRB2Type = VERTEX_HEIGHT_THING_TYPE;
|
||||
t.Type = VERTEX_HEIGHT_THING_TYPE;
|
||||
t.Move(pos);
|
||||
t.Selected = true;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(Thing t in things)
|
||||
{
|
||||
//mxd. Do some path reconnecting shenanigans...
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
|
||||
string targetclass = string.Empty;
|
||||
int targetarg = -1;
|
||||
|
||||
|
@ -251,7 +251,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
if(other.Index == t.Index)
|
||||
continue;
|
||||
info = General.Map.Data.GetThingInfo(other.SRB2Type);
|
||||
info = General.Map.Data.GetThingInfo(other.Type);
|
||||
if(info.ClassName.ToLowerInvariant() == targetclass && other.Args[targetarg] == t.Tag)
|
||||
{
|
||||
other.Move(other.Position); //hacky way to call BeforePropsChange()...
|
||||
|
@ -308,7 +308,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
List<Thing> things = new List<Thing>(General.Map.Map.Things);
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
|
||||
if(t.Type == General.Map.Config.Start3DModeThingType)
|
||||
{
|
||||
if(thingfound == null)
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Thing t = General.Map.Map.CreateThing();
|
||||
if(t != null)
|
||||
{
|
||||
t.SRB2Type = General.Map.Config.Start3DModeThingType;
|
||||
t.Type = General.Map.Config.Start3DModeThingType;
|
||||
t.Move(mousemappos);
|
||||
t.UpdateConfiguration();
|
||||
General.Map.ThingsFilter.Update();
|
||||
|
|
|
@ -617,7 +617,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
return;
|
||||
}
|
||||
General.Settings.ApplyDefaultThingSettings(tp);
|
||||
tp.SRB2Type = thingtype;
|
||||
tp.Type = thingtype;
|
||||
tp.Parameter = 0;
|
||||
tp.Move(shapevecs[i]);
|
||||
tp.UpdateConfiguration();
|
||||
|
|
|
@ -849,7 +849,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(Thing t in selectedthings)
|
||||
{
|
||||
//mxd. Added special Polyobj Anchor handling and Doom angle clamping
|
||||
if(!fixedrotationthingtypes.Contains(t.SRB2Type))
|
||||
if(!fixedrotationthingtypes.Contains(t.Type))
|
||||
{
|
||||
int loops = (General.Map.SRB2) ? t.AngleDoom - (t.AngleDoom % 360) : 0;
|
||||
int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index]));
|
||||
|
@ -1312,10 +1312,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if((t.Position.x + t.Size) > right.x) right.x = t.Position.x + t.Size;
|
||||
if((t.Position.y + t.Size) > right.y) right.y = t.Position.y + t.Size;
|
||||
|
||||
if(!fixedrotationthingtypes.Contains(t.SRB2Type)) //mxd
|
||||
if(!fixedrotationthingtypes.Contains(t.Type)) //mxd
|
||||
{
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
if(tti != null && tti.FixedRotation) fixedrotationthingtypes.Add(t.SRB2Type);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(tti != null && tti.FixedRotation) fixedrotationthingtypes.Add(t.Type);
|
||||
}
|
||||
|
||||
// Keep original coordinates
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if (t != null)
|
||||
{
|
||||
General.Settings.ApplyDefaultThingSettings(t);
|
||||
t.SRB2Type = type;
|
||||
t.Type = type;
|
||||
t.Parameter = parameter;
|
||||
t.Move(pos);
|
||||
t.UpdateConfiguration();
|
||||
|
|
|
@ -345,7 +345,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
perppos = JoinIntoNearMapVertex(perppos, snapmp);
|
||||
|
||||
General.Settings.ApplyDefaultThingSettings(tp);
|
||||
//tp.SRB2Type = thingtype;
|
||||
//tp.Type = thingtype;
|
||||
//tp.Parameter = 0;
|
||||
thingresult.Apply(tp);
|
||||
tp.Move(perppos);
|
||||
|
|
|
@ -386,7 +386,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//mxd. Check if we can use thing arguments
|
||||
else if(t.Action == 0)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(ti != null)
|
||||
{
|
||||
clearassociations = false;
|
||||
|
@ -768,7 +768,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
t.CopyPropertiesTo(clone);
|
||||
|
||||
// If the cloned item is an interpolation point or patrol point, then insert the point in the path
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
|
||||
int nextpointtagargnum = -1;
|
||||
|
||||
// Thing type can be changed in MAPINFO DoomEdNums block...
|
||||
|
@ -1101,7 +1101,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
const int linealpha = 128;
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type);
|
||||
int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Type);
|
||||
if(lightid == -1) continue;
|
||||
|
||||
// TODO: this basically duplicates VisualThing.UpdateLight()...
|
||||
|
@ -1115,7 +1115,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[0]) n = 0;
|
||||
else if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) n = 10;
|
||||
else n = 20;
|
||||
DynamicLightType lightType = (DynamicLightType)(t.SRB2Type - 9800 - n);
|
||||
DynamicLightType lightType = (DynamicLightType)(t.Type - 9800 - n);
|
||||
|
||||
if(lightType == DynamicLightType.SECTOR)
|
||||
{
|
||||
|
@ -1145,7 +1145,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
else
|
||||
{
|
||||
switch(t.SRB2Type)
|
||||
switch(t.Type)
|
||||
{
|
||||
case 1502: // Vavoom light
|
||||
color = new PixelColor(linealpha, 255, 255, 255);
|
||||
|
@ -1540,7 +1540,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
excludedLines.Add(l);
|
||||
if(excludedLines.Count == General.Map.Map.Linedefs.Count)
|
||||
{
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align " + tti.Title + " (index " + t.Index + ") to any linedef!");
|
||||
aligned = true;
|
||||
}
|
||||
|
@ -1596,7 +1596,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
foreach(Thing t in selected)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
|
||||
if (info == null || !info.Arrow)
|
||||
continue;
|
||||
|
||||
|
@ -1610,7 +1610,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
foreach(Thing t in selected)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
|
||||
if (info == null || !info.Arrow)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if (tp != null)
|
||||
{
|
||||
General.Settings.ApplyDefaultThingSettings(tp);
|
||||
tp.SRB2Type = 750;
|
||||
tp.Type = 750;
|
||||
tp.Parameter = 0;
|
||||
tp.Rotate(BuilderPlug.Me.VertexSlopeAssistForm.TagID);
|
||||
tp.Move(newthings[i].x, newthings[i].y, heights[i]);
|
||||
|
@ -705,7 +705,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if (tp != null)
|
||||
{
|
||||
General.Settings.ApplyDefaultThingSettings(tp);
|
||||
tp.SRB2Type = 750;
|
||||
tp.Type = 750;
|
||||
tp.Parameter = 0;
|
||||
tp.Rotate(BuilderPlug.Me.VertexSlopeAssistForm.TagID);
|
||||
tp.Move(newthings[i].x, newthings[i].y, heights[i]);
|
||||
|
@ -733,7 +733,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if (tp != null)
|
||||
{
|
||||
General.Settings.ApplyDefaultThingSettings(tp);
|
||||
tp.SRB2Type = 750;
|
||||
tp.Type = 750;
|
||||
tp.Parameter = 0;
|
||||
tp.Rotate(BuilderPlug.Me.VertexSlopeAssistForm.TagID);
|
||||
tp.Move(newthings[i].x, newthings[i].y, heights[i]);
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all things
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info != null && info.IsObsolete)
|
||||
{
|
||||
SubmitResult(new ResultObsoleteThing(t, info.ObsoleteMessage));
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Collect Things...
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info == null) continue;
|
||||
switch(info.ClassName.ToLowerInvariant())
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all the things
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
|
||||
bool stuck = false;
|
||||
|
||||
// Check this thing for getting stuck?
|
||||
|
@ -128,7 +128,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(processedthingpairs.ContainsKey(t.Index) && processedthingpairs[t.Index].Contains(ot.Index)) continue;
|
||||
|
||||
// Only check of items that can block
|
||||
if(General.Map.Data.GetThingInfo(ot.SRB2Type).Blocking == ThingTypeInfo.THING_BLOCKING_NONE) continue;
|
||||
if(General.Map.Data.GetThingInfo(ot.Type).Blocking == ThingTypeInfo.THING_BLOCKING_NONE) continue;
|
||||
|
||||
// need to compare the flags
|
||||
if(FlagsOverlap(t, ot) && ThingsOverlap(t, ot))
|
||||
|
@ -196,8 +196,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
Vector3D p1 = t1.Position;
|
||||
Vector3D p2 = t2.Position;
|
||||
ThingTypeInfo t1info = General.Map.Data.GetThingInfo(t1.SRB2Type);
|
||||
ThingTypeInfo t2info = General.Map.Data.GetThingInfo(t2.SRB2Type);
|
||||
ThingTypeInfo t1info = General.Map.Data.GetThingInfo(t1.Type);
|
||||
ThingTypeInfo t2info = General.Map.Data.GetThingInfo(t2.Type);
|
||||
|
||||
// simple bounding box collision detection
|
||||
if( p1.x + t1.Size - ALLOWED_STUCK_DISTANCE < p2.x - t2.Size + ALLOWED_STUCK_DISTANCE ||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all things
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(General.Map.Data.GetThingInfoEx(t.SRB2Type) == null) SubmitResult(new ResultUnknownThing(t));
|
||||
if(General.Map.Data.GetThingInfoEx(t.Type) == null) SubmitResult(new ResultUnknownThing(t));
|
||||
|
||||
// Handle thread interruption
|
||||
try { Thread.Sleep(0); } catch (ThreadInterruptedException) { return; }
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") at " + thing.Position.x + ", " + thing.Position.y + " is obsolete.";
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") at " + thing.Position.x + ", " + thing.Position.y + " is obsolete.";
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is stuck in linedef " + line.Index + " at " + thing.Position.x + ", " + thing.Position.y;
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is stuck in linedef " + line.Index + " at " + thing.Position.x + ", " + thing.Position.y;
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing1.Index + " (" + General.Map.Data.GetThingInfo(thing1.SRB2Type).Title + ") is stuck in thing " + thing2.Index + " (" + General.Map.Data.GetThingInfo(thing2.SRB2Type).Title + ") at " + thing1.Position.x + ", " + thing1.Position.y;
|
||||
return "Thing " + thing1.Index + " (" + General.Map.Data.GetThingInfo(thing1.Type).Title + ") is stuck in thing " + thing2.Index + " (" + General.Map.Data.GetThingInfo(thing2.Type).Title + ") at " + thing1.Position.x + ", " + thing1.Position.y;
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is outside the map at " + thing.Position.x + ", " + thing.Position.y;
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is outside the map at " + thing.Position.x + ", " + thing.Position.y;
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing.Index + " has unknown type (" + thing.SRB2Type + ").";
|
||||
return "Thing " + thing.Index + " has unknown type (" + thing.Type + ").";
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This must return the string that is displayed in the listbox
|
||||
public override string ToString()
|
||||
{
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is unused. " + details;
|
||||
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is unused. " + details;
|
||||
}
|
||||
|
||||
// Rendering
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + argtext + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(replace) t.Rotate(replaceangle);
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Thing t = General.Map.Map.GetThingByIndex(index);
|
||||
if(t != null)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(addthing)
|
||||
{
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(replace) t.Tag = replacetag;
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(addthing)
|
||||
{
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,22 +123,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(Thing t in list)
|
||||
{
|
||||
// Match?
|
||||
if ((t.SRB2Type == findtype && comparer.ToString() == "") ||
|
||||
(t.SRB2Type > findtype && comparer.ToString() == ">") ||
|
||||
(t.SRB2Type < findtype && comparer.ToString() == "<") ||
|
||||
(t.SRB2Type >= findtype && comparer.ToString() == ">=") ||
|
||||
(t.SRB2Type <= findtype && comparer.ToString() == "<=") ||
|
||||
(t.SRB2Type != findtype && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
|
||||
if ((t.Type == findtype && comparer.ToString() == "") ||
|
||||
(t.Type > findtype && comparer.ToString() == ">") ||
|
||||
(t.Type < findtype && comparer.ToString() == "<") ||
|
||||
(t.Type >= findtype && comparer.ToString() == ">=") ||
|
||||
(t.Type <= findtype && comparer.ToString() == "<=") ||
|
||||
(t.Type != findtype && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
|
||||
{
|
||||
// Replace
|
||||
if(replace)
|
||||
{
|
||||
t.SRB2Type = replacetype;
|
||||
t.Type = replacetype;
|
||||
t.UpdateConfiguration();
|
||||
}
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -573,7 +573,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
private static float GetAlignedThingZ(BaseVisualMode mode, Thing t, float targtthingheight)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(info != null)
|
||||
{
|
||||
if(info.AbsoluteZ && t.IsFlipped) return t.Position.z; // Not sure what to do here...
|
||||
|
|
|
@ -830,7 +830,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//mxd. Thing action on this thing?
|
||||
else if(t.Action == 0)
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
if(ti != null)
|
||||
{
|
||||
if( ((ti.Args[0].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[0]))) ||
|
||||
|
|
|
@ -42,15 +42,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
foreach(Thing t in selection)
|
||||
{
|
||||
if(!thingcounts.ContainsKey(t.SRB2Type))
|
||||
if(!thingcounts.ContainsKey(t.Type))
|
||||
{
|
||||
thingcounts.Add(t.SRB2Type, 1);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
thingtitles.Add(t.SRB2Type, ti.Title);
|
||||
thingcounts.Add(t.Type, 1);
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
thingtitles.Add(t.Type, ti.Title);
|
||||
}
|
||||
else
|
||||
{
|
||||
thingcounts[t.SRB2Type]++;
|
||||
thingcounts[t.Type]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
foreach(Thing t in selection)
|
||||
{
|
||||
if(!selectedtypes.Contains(t.SRB2Type)) t.Selected = false;
|
||||
if(!selectedtypes.Contains(t.Type)) t.Selected = false;
|
||||
}
|
||||
|
||||
//update display
|
||||
|
|
|
@ -147,7 +147,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
|
|||
vslopegroups.Items.Clear();
|
||||
foreach (Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if (t.SRB2Type == 750) // Vertex Slope
|
||||
if (t.Type == 750) // Vertex Slope
|
||||
{
|
||||
if (vslopeDic.ContainsKey(t.AngleDoom))
|
||||
{
|
||||
|
|
|
@ -890,7 +890,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
if ((Vector2D)t.Position == v.Position)
|
||||
{
|
||||
switch (t.SRB2Type)
|
||||
switch (t.Type)
|
||||
{
|
||||
case 1504: slopefloorthings.Add(t); break;
|
||||
case 1505: slopeceilingthings.Add(t); break;
|
||||
|
@ -1251,7 +1251,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Find interesting things (such as sector slopes)
|
||||
foreach (Thing t in General.Map.Map.Things)
|
||||
{
|
||||
switch (t.SRB2Type)
|
||||
switch (t.Type)
|
||||
{
|
||||
// ========== Copy slope ==========
|
||||
case 9511:
|
||||
|
@ -3713,7 +3713,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
if(excludedLines.Count == General.Map.Map.Linedefs.Count)
|
||||
{
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing ¹" + t.Index + " (" + tti.Title + ") to any linedef in a map!");
|
||||
aligned = true;
|
||||
}
|
||||
|
@ -3757,10 +3757,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
//set position and angles
|
||||
Thing t = visualThings[0].Thing;
|
||||
if((t.SRB2Type == 9072 || t.SRB2Type == 9073) && t.Args[3] > 0) //AimingCamera or MovingCamera with target?
|
||||
if((t.Type == 9072 || t.Type == 9073) && t.Args[3] > 0) //AimingCamera or MovingCamera with target?
|
||||
{
|
||||
//position
|
||||
if(t.SRB2Type == 9072 && (t.Args[0] > 0 || t.Args[1] > 0)) //positon MovingCamera at targeted interpolation point
|
||||
if(t.Type == 9072 && (t.Args[0] > 0 || t.Args[1] > 0)) //positon MovingCamera at targeted interpolation point
|
||||
{
|
||||
int ipTag = t.Args[0] + (t.Args[1] << 8);
|
||||
Thing ip = null;
|
||||
|
@ -3768,7 +3768,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//find interpolation point
|
||||
foreach(Thing tgt in General.Map.Map.Things)
|
||||
{
|
||||
if(tgt.Tag == ipTag && tgt.SRB2Type == 9070)
|
||||
if(tgt.Tag == ipTag && tgt.Type == 9070)
|
||||
{
|
||||
ip = tgt;
|
||||
break;
|
||||
|
@ -3840,7 +3840,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.VisualCamera.AngleZ = pitch ? -delta.GetAngleZ() : Angle2D.PI;
|
||||
}
|
||||
}
|
||||
else if((t.SRB2Type == 9025 || t.SRB2Type == 9073 || t.SRB2Type == 9070) && t.Args[0] != 0) //InterpolationPoint, SecurityCamera or AimingCamera with pitch?
|
||||
else if((t.Type == 9025 || t.Type == 9073 || t.Type == 9070) && t.Args[0] != 0) //InterpolationPoint, SecurityCamera or AimingCamera with pitch?
|
||||
{
|
||||
General.Map.VisualCamera.Position = visualThings[0].CenterV3D; //position at camera
|
||||
General.Map.VisualCamera.AngleXY = t.Angle - Angle2D.PI;
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.mode = mode;
|
||||
|
||||
// Find thing information
|
||||
info = General.Map.Data.GetThingInfo(Thing.SRB2Type);
|
||||
info = General.Map.Data.GetThingInfo(Thing.Type);
|
||||
|
||||
//mxd. When true, the thing can be moved below floor/above ceiling
|
||||
nointeraction = (info.Actor != null && info.Actor.GetFlagValue("nointeraction", false));
|
||||
|
@ -366,7 +366,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Determine position
|
||||
Vector3D pos = Thing.Position;
|
||||
if(Thing.SRB2Type == 9501)
|
||||
if(Thing.Type == 9501)
|
||||
{
|
||||
if(Thing.Sector != null) //mxd
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
pos.z = sd.Ceiling.sector.CeilHeight + Thing.Position.z;
|
||||
}
|
||||
}
|
||||
else if(Thing.SRB2Type == 9500)
|
||||
else if(Thing.Type == 9500)
|
||||
{
|
||||
if(Thing.Sector != null) //mxd
|
||||
{
|
||||
|
@ -406,7 +406,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
else pos.z = 0;
|
||||
}
|
||||
else if (General.Map.SRB2 && Thing.SRB2Type == 1705)
|
||||
else if (General.Map.SRB2 && Thing.Type == 1705)
|
||||
{
|
||||
//Use the flags value instead of the Z position for the Z position. SRB2 is really stupid sometimes.
|
||||
pos.z = Thing.GetFlagsValue();
|
||||
|
@ -521,7 +521,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void Rebuild()
|
||||
{
|
||||
// Find thing information
|
||||
info = General.Map.Data.GetThingInfo(Thing.SRB2Type);
|
||||
info = General.Map.Data.GetThingInfo(Thing.Type);
|
||||
|
||||
//mxd. When true, the thing can be moved below floor/above ceiling
|
||||
nointeraction = (info.Actor != null && info.Actor.GetFlagValue("nointeraction", false));
|
||||
|
@ -804,7 +804,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
|
||||
undoticket = mode.CreateUndo("Change thing height");
|
||||
|
||||
if (General.Map.SRB2 && Thing.SRB2Type == 1705)
|
||||
if (General.Map.SRB2 && Thing.Type == 1705)
|
||||
{
|
||||
int newZ = General.Clamp(Thing.GetFlagsValue() + amount,0,0xFFFF);
|
||||
Thing.SetFlagsValue(newZ);
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
SectorData sourcesectordata = data.Mode.GetSectorData(sourcesector);
|
||||
if(!sourcesectordata.Updated) sourcesectordata.Update();
|
||||
|
||||
switch(thing.SRB2Type)
|
||||
switch(thing.Type)
|
||||
{
|
||||
case 9510:
|
||||
data.Floor.plane = sourcesectordata.Floor.plane;
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
if(ld != null)
|
||||
{
|
||||
if(t.SRB2Type == 9500)
|
||||
if(t.Type == 9500)
|
||||
{
|
||||
// Slope the floor from the linedef to thing
|
||||
t.DetermineSector(data.Mode.BlockMap);
|
||||
|
@ -78,7 +78,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(t.SRB2Type == 9501)
|
||||
else if(t.Type == 9501)
|
||||
{
|
||||
// Slope the ceiling from the linedef to thing
|
||||
t.DetermineSector(data.Mode.BlockMap);
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Thing t = thing;
|
||||
|
||||
// Floor slope thing
|
||||
if(t.SRB2Type == 9502)
|
||||
if(t.Type == 9502)
|
||||
{
|
||||
t.DetermineSector(data.Mode.BlockMap);
|
||||
if(t.Sector != null)
|
||||
|
@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
// Ceiling slope thing
|
||||
else if(t.SRB2Type == 9503)
|
||||
else if(t.Type == 9503)
|
||||
{
|
||||
t.DetermineSector(data.Mode.BlockMap);
|
||||
if(t.Sector != null)
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
|
||||
foreach(VisualThing t in selectedVisualThings)
|
||||
{
|
||||
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1)
|
||||
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1)
|
||||
{
|
||||
selection.Add(t.Thing);
|
||||
visualSelection.Add(t);
|
||||
|
@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
ICollection<Thing> list = General.Map.Map.GetSelectedThings(true);
|
||||
foreach(Thing t in list)
|
||||
{
|
||||
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.SRB2Type) != -1)
|
||||
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Type) != -1)
|
||||
selection.Add(t);
|
||||
}
|
||||
}
|
||||
|
@ -124,9 +124,9 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
//this is called only once
|
||||
private void SetupSliders(Thing referenceThing)
|
||||
{
|
||||
ThingTypeInfo typeInfo = General.Map.Data.GetThingInfoEx(referenceThing.SRB2Type);
|
||||
ThingTypeInfo typeInfo = General.Map.Data.GetThingInfoEx(referenceThing.Type);
|
||||
int firstArg = 3;
|
||||
if(referenceThing.SRB2Type == 1502 || referenceThing.SRB2Type == 1503)
|
||||
if(referenceThing.Type == 1502 || referenceThing.Type == 1503)
|
||||
firstArg = 0;
|
||||
|
||||
//first slider is always used
|
||||
|
@ -134,7 +134,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
colorPickerSlider1.OnValueChanged += OnSliderValueChanged;
|
||||
|
||||
//either both of them or none are used
|
||||
if(Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.SRB2Type) != -1)
|
||||
if(Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.Type) != -1)
|
||||
{
|
||||
showAllControls = true;
|
||||
colorPickerSlider2.Label = typeInfo.Args[4].Title + ":";
|
||||
|
@ -170,13 +170,13 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
|
||||
//size
|
||||
int firstArg = 3;
|
||||
if(referenceThing.SRB2Type == 1502 || referenceThing.SRB2Type == 1503)
|
||||
if(referenceThing.Type == 1502 || referenceThing.Type == 1503)
|
||||
firstArg = 0;
|
||||
|
||||
lightProps.PrimaryRadius = referenceThing.Args[firstArg];
|
||||
|
||||
//either both of them or none are used
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.SRB2Type) != -1)
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.Type) != -1)
|
||||
{
|
||||
lightProps.SecondaryRadius = referenceThing.Args[4];
|
||||
lightProps.Interval = referenceThing.AngleDoom;
|
||||
|
@ -216,13 +216,13 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
//update color
|
||||
if(colorChanged) //need this check to allow relative mode to work properly
|
||||
{
|
||||
if(t.SRB2Type == 1503) //Vavoom Light Color
|
||||
if(t.Type == 1503) //Vavoom Light Color
|
||||
{
|
||||
t.Args[1] = lightProps.Red;
|
||||
t.Args[2] = lightProps.Green;
|
||||
t.Args[3] = lightProps.Blue;
|
||||
}
|
||||
else if(t.SRB2Type != 1502) //vavoom light has no color settings
|
||||
else if(t.Type != 1502) //vavoom light has no color settings
|
||||
{
|
||||
t.Args[0] = lightProps.Red;
|
||||
t.Args[1] = lightProps.Green;
|
||||
|
@ -231,7 +231,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
}
|
||||
|
||||
int firstArg = 3;
|
||||
if(t.SRB2Type == 1502 || t.SRB2Type == 1503) firstArg = 0;
|
||||
if(t.Type == 1502 || t.Type == 1503) firstArg = 0;
|
||||
|
||||
//update radius and intensity
|
||||
if(RELATIVE_MODE)
|
||||
|
@ -241,7 +241,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
t.Args[firstArg] = fixedVal.PrimaryRadius + lightProps.PrimaryRadius;
|
||||
if(t.Args[firstArg] < 0) t.Args[firstArg] = 0;
|
||||
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
|
||||
{
|
||||
t.Args[4] = fixedVal.SecondaryRadius + lightProps.SecondaryRadius;
|
||||
if(t.Args[4] < 0) t.Args[4] = 0;
|
||||
|
@ -254,7 +254,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
if(lightProps.PrimaryRadius != -1)
|
||||
t.Args[firstArg] = lightProps.PrimaryRadius;
|
||||
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
|
||||
{
|
||||
t.Args[4] = lightProps.SecondaryRadius;
|
||||
t.Rotate(General.ClampAngle(lightProps.Interval));
|
||||
|
@ -322,8 +322,8 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
//this is called only once
|
||||
private static Color GetThingColor(Thing thing)
|
||||
{
|
||||
if(thing.SRB2Type == 1502) return Color.White; //vavoom light
|
||||
if(thing.SRB2Type == 1503) return Color.FromArgb((byte)thing.Args[1], (byte)thing.Args[2], (byte)thing.Args[3]); //vavoom colored light
|
||||
if(thing.Type == 1502) return Color.White; //vavoom light
|
||||
if(thing.Type == 1503) return Color.FromArgb((byte)thing.Args[1], (byte)thing.Args[2], (byte)thing.Args[3]); //vavoom colored light
|
||||
return Color.FromArgb((byte)thing.Args[0], (byte)thing.Args[1], (byte)thing.Args[2]);
|
||||
}
|
||||
|
||||
|
@ -337,11 +337,11 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
|
|||
Thing t = selection[i];
|
||||
LightProps lp = new LightProps();
|
||||
int firstArg = 3;
|
||||
if(t.SRB2Type == 1502 || t.SRB2Type == 1503) firstArg = 0;
|
||||
if(t.Type == 1502 || t.Type == 1503) firstArg = 0;
|
||||
lp.PrimaryRadius = t.Args[firstArg];
|
||||
|
||||
//either both of them or none are used
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
|
||||
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
|
||||
{
|
||||
lp.SecondaryRadius = t.Args[4];
|
||||
lp.Interval = t.AngleDoom;
|
||||
|
|
|
@ -427,7 +427,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
|
|||
foreach(Thing thing in General.Map.Map.Things)
|
||||
{
|
||||
// SoundEnvironment thing, see http://zdoom.org/wiki/Classes:SoundEnvironment
|
||||
if(thing.SRB2Type != SOUND_ENVIROMNEMT_THING_TYPE) continue;
|
||||
if(thing.Type != SOUND_ENVIROMNEMT_THING_TYPE) continue;
|
||||
if(thing.Sector == null) thing.DetermineSector();
|
||||
if(thing.Sector != null && sectors.Contains(thing.Sector)) things.Add(thing);
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
|
|||
if(t != null)
|
||||
{
|
||||
General.Settings.ApplyDefaultThingSettings(t);
|
||||
t.SRB2Type = BuilderPlug.SOUND_ENVIROMNEMT_THING_TYPE;
|
||||
t.Type = BuilderPlug.SOUND_ENVIROMNEMT_THING_TYPE;
|
||||
t.Move(pos);
|
||||
t.UpdateConfiguration();
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace CodeImp.DoomBuilder.TagExplorer
|
|||
foreach(TreeNode node in nodes)
|
||||
{
|
||||
NodeInfo nodeInfo = node.Tag as NodeInfo;
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(General.Map.Map.GetThingByIndex(nodeInfo.Index).SRB2Type);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(General.Map.Map.GetThingByIndex(nodeInfo.Index).Type);
|
||||
|
||||
if(tti != null)
|
||||
{
|
||||
|
|
|
@ -30,8 +30,8 @@ namespace CodeImp.DoomBuilder.TagExplorer
|
|||
index = t.Index;
|
||||
action = t.Action;
|
||||
tag = t.Tag;
|
||||
polyobjnumber = ((t.SRB2Type > 9299 && t.SRB2Type < 9304) ? t.AngleDoom : int.MinValue);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
|
||||
polyobjnumber = ((t.Type > 9299 && t.Type < 9304) ? t.AngleDoom : int.MinValue);
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
|
||||
defaultname = (tti != null ? tti.Title : "Thing");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue