This commit is contained in:
spherallic 2022-10-12 15:52:22 +02:00
parent 9683c5e59a
commit 71bfe6c697

View file

@ -177,7 +177,7 @@ namespace CodeImp.DoomBuilder.Windows
Thing ft = General.GetByIndex(things, 0);
// Set type
thingtype.SelectType(ft.Type);
thingtype.SelectType(ft.SRB2Type);
// Flags
foreach(CheckBox c in flags.Checkboxes)
@ -200,7 +200,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.Type);
ThingTypeInfo fti = General.Map.Data.GetThingInfoEx(ft.SRB2Type);
if(fti != null && fti.Actor != null && fti.Actor.UserVars.Count > 0)
fieldslist.SetUserVars(fti.Actor.UserVars, ft.Fields, true);
@ -241,7 +241,7 @@ namespace CodeImp.DoomBuilder.Windows
// Type does not match?
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
if(info != null && info.Index != t.Type) thingtype.ClearSelectedType();
if(info != null && info.Index != t.SRB2Type) thingtype.ClearSelectedType();
// Flags
foreach(CheckBox c in flags.Checkboxes)
@ -278,7 +278,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.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(ti != null && ti.Actor != null && ti.Actor.UserVars.Count > 0)
fieldslist.SetUserVars(ti.Actor.UserVars, t.Fields, false);
@ -491,7 +491,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.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(ti != null && ti.Actor != null && ti.Actor.UserVars.Count > 0)
fieldslist.ApplyUserVars(ti.Actor.UserVars, t.Fields);
@ -510,7 +510,7 @@ namespace CodeImp.DoomBuilder.Windows
if(c.CheckState == CheckState.Checked) defaultflags.Add(c.Tag.ToString());
}
General.Settings.DefaultThingType = thingtype.GetResult(General.Settings.DefaultThingType);
General.Settings.DefaultThingAngle = Angle2D.DegToRad((float)angle.GetResult((int)Angle2D.RadToDeg(General.Settings.DefaultThingAngle) - 90) + 90);
General.Settings.DefaultThingAngle = (int)Angle2D.DegToRad((float)angle.GetResult((int)Angle2D.RadToDeg(General.Settings.DefaultThingAngle) - 90) + 90);
General.Settings.SetDefaultThingFlags(defaultflags);
// Store value linking
@ -694,7 +694,7 @@ namespace CodeImp.DoomBuilder.Windows
foreach(Thing t in things)
{
//Set type
t.Type = thingtype.GetResult(t.Type);
t.SRB2Type = thingtype.GetResult(t.SRB2Type);
// Update settings
t.UpdateConfiguration();