mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Restore some thing-related functionality for SRB2
This commit is contained in:
parent
2cda8bd933
commit
3f70ad23f1
3 changed files with 7 additions and 5 deletions
|
@ -238,7 +238,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
|
||||
//mxd. Flags panel visibility and size
|
||||
flagsPanel.Visible = (flags.Items.Count > 0);
|
||||
flagsPanel.Visible = (flags.Items.Count > 0 || flagsvaluelabel.Enabled);
|
||||
if(flags.Items.Count > 0)
|
||||
{
|
||||
Rectangle rect = flags.GetItemRect(0);
|
||||
|
|
|
@ -1583,7 +1583,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(Thing t in selected)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
||||
if (info == null || !info.Arrow)
|
||||
continue;
|
||||
|
||||
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
|
||||
|
@ -1597,7 +1597,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(Thing t in selected)
|
||||
{
|
||||
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
|
||||
if(info == null || info.Category == null || info.Category.Arrow == 0)
|
||||
if (info == null || !info.Arrow)
|
||||
continue;
|
||||
|
||||
int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position));
|
||||
|
@ -1667,9 +1667,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Change angle
|
||||
foreach(Thing t in selected)
|
||||
{
|
||||
int loops = (General.Map.SRB2) ? t.AngleDoom - (t.AngleDoom % 360) : 0;
|
||||
int newangle = t.AngleDoom + increment;
|
||||
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||
t.Rotate(General.ClampAngle(newangle));
|
||||
t.Rotate(General.ClampAngle(newangle) + loops);
|
||||
}
|
||||
|
||||
// Redraw screen
|
||||
|
|
|
@ -3483,10 +3483,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(obj is BaseVisualThing)
|
||||
{
|
||||
BaseVisualThing t = (BaseVisualThing)obj;
|
||||
int loops = (General.Map.SRB2) ? t.Thing.AngleDoom - (t.Thing.AngleDoom % 360) : 0;
|
||||
|
||||
int newangle = t.Thing.AngleDoom + thingangleincrement;
|
||||
if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
|
||||
t.SetAngle(General.ClampAngle(newangle));
|
||||
t.SetAngle(General.ClampAngle(newangle) + loops);
|
||||
|
||||
// Visual sectors may be affected by this thing...
|
||||
if(thingdata.ContainsKey(t.Thing))
|
||||
|
|
Loading…
Reference in a new issue