Make $(Not)Angled property set fixedrotation

This commit is contained in:
spherallic 2023-09-15 16:55:51 +02:00
parent 22e0154c19
commit 89f781bdc4
2 changed files with 13 additions and 5 deletions

View file

@ -78,7 +78,7 @@ namespace CodeImp.DoomBuilder.Config
private int blocking;
private int errorcheck;
private readonly bool fixedsize;
private readonly bool fixedrotation; //mxd
private bool fixedrotation; //mxd
private readonly ThingCategory category;
private readonly ArgumentInfo[] args;
private readonly ArgumentInfo[] stringargs;
@ -583,8 +583,16 @@ namespace CodeImp.DoomBuilder.Config
}
//mxd. Some SLADE compatibility
if(actor.HasProperty("$angled")) this.arrow = true;
else if(actor.HasProperty("$notangled")) this.arrow = false;
if (actor.HasProperty("$angled"))
{
this.arrow = true;
this.fixedrotation = false;
}
else if (actor.HasProperty("$notangled"))
{
this.arrow = false;
this.fixedrotation = true;
}
//mxd. Marked as obsolete?
if(actor.HasPropertyWithValue("$obsolete"))

View file

@ -1475,7 +1475,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in selected)
{
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
if(info == null || info.Category == null || info.Category.Arrow == 0)
if (info == null || info.FixedRotation == true)
continue;
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
@ -1489,7 +1489,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in selected)
{
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
if(info == null || info.Category == null || info.Arrow == false)
if (info == null || info.FixedRotation == true)
continue;
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position));