From a1f81e6436f4eace9763da94e36e37cb6bcf87a7 Mon Sep 17 00:00:00 2001 From: MaxED Date: Fri, 19 Sep 2014 22:19:25 +0000 Subject: [PATCH] Sector slopes were not copied by "Copy Properties" actions and were missing from Paste Properties Options form. Added several missing flags to ZDoom_DECORATE.cfg. --- Build/Scripting/ZDoom_DECORATE.cfg | 22 ++++++++++++-- .../BuilderModes/General/CopyStructures.cs | 29 +++++++++++++++++-- .../PastePropertiesOptionsForm.Designer.cs | 17 ++++++----- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index e02faa50..f9df6c79 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -109,7 +109,7 @@ keywords A_TossGib = "A_TossGib"; A_SpawnDebris = "A_SpawnDebris(string type, bool translation)"; A_SpawnItem = "A_SpawnItem(string type, int distance, float zpos, bool useammo, bool translation)"; - A_SpawnItemEx = "A_SpawnItemEx(string type, float xoffset, float yoffset, float zoffset, float xvelocity, float yvelocity, float zvelocity, float angle, int flags, int chance)"; + A_SpawnItemEx = "A_SpawnItemEx(string type[, float xoffset[, float yoffset[, float zoffset[, float xvelocity[, float yvelocity[, float zvelocity[, float angle[, int flags[, int skipchance]]]]]]]]])"; //State jumps A_CheckCeiling = "A_CheckCeiling(int offset OR str \"state\")"; A_CheckFloor = "A_CheckFloor(int offset OR str \"state\")"; @@ -341,8 +341,26 @@ constants AAPTR_PLAYER; AAPTR_PLAYER_GETTARGET; AAPTR_PLAYER_GETCONVERSATION; + SXF_ABSOLUTEANGLE; + SXF_ABSOLUTEPOSITION; + SXF_ABSOLUTEVELOCITY; + SXF_CLEARCALLERSPECIAL; + SXF_CLEARCALLERTID; + SXF_CLIENTSIDE; + SXF_MULTIPLYSPEED; + SXF_NOCHECKPOSITION; SXF_SETMASTER; + SXF_TELEFRAG; + SXF_TRANSFERALPHA; + SXF_TRANSFERAMBUSHFLAG; + SXF_TRANSFERPITCH; SXF_TRANSFERPOINTERS; + SXF_TRANSFERRENDERSTYLE; + SXF_TRANSFERSCALE; + SXF_TRANSFERSPECIAL; + SXF_TRANSFERSTENCILCOL; + SXF_TRANSFERTRANSLATION; + SXF_USEBLOODCOLOR; //weapon flags WRF_NOBOB; WRF_NOFIRE; @@ -399,7 +417,7 @@ constants FPF_TRANSFERTRANSLATION; //A_Saw flags SF_NOPULLIN; - SF_NORANDOM; + SF_NORANDOM; SF_NOTURN; SF_NOUSEAMMO; SF_NOUSEAMMOMISS; diff --git a/Source/Plugins/BuilderModes/General/CopyStructures.cs b/Source/Plugins/BuilderModes/General/CopyStructures.cs index 70813088..ef03b20e 100644 --- a/Source/Plugins/BuilderModes/General/CopyStructures.cs +++ b/Source/Plugins/BuilderModes/General/CopyStructures.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.GZBuilder.Tools; @@ -88,6 +89,10 @@ namespace CodeImp.DoomBuilder.BuilderModes public bool CeilingTexture = true; [FieldDescription("Brightness")] public bool Brightness = true; + [FieldDescription("Ceiling Slope")] + public bool CeilingSlope = true; + [FieldDescription("Floor Slope")] + public bool FloorSlope = true; [FieldDescription("Tag")] public bool Tag = true; [FieldDescription("Effect")] @@ -110,6 +115,10 @@ namespace CodeImp.DoomBuilder.BuilderModes private readonly string ceilingtexture; private readonly int effect; private readonly int brightness; + private readonly float ceilslopeoffset; + private readonly float floorslopeoffset; + private readonly Vector3D ceilslope; + private readonly Vector3D floorslope; private readonly int tag; private readonly UniFields fields; private readonly Dictionary flags; //mxd @@ -122,6 +131,10 @@ namespace CodeImp.DoomBuilder.BuilderModes ceilingtexture = s.CeilTexture; brightness = s.Brightness; effect = s.Effect; + ceilslopeoffset = s.CeilingSlopeOffset; + floorslopeoffset = s.FloorSlopeOffset; + ceilslope = s.CeilingSlope; + floorslope = s.FloorSlope; tag = s.Tag; fields = new UniFields(s.Fields); flags = s.GetFlags(); //mxd @@ -136,12 +149,24 @@ namespace CodeImp.DoomBuilder.BuilderModes if(CopySettings.Brightness) s.Brightness = brightness; if(CopySettings.Tag) s.Tag = tag; if(CopySettings.Special) s.Effect = effect; - if(CopySettings.Flags) { + if (CopySettings.CeilingSlope) + { + s.CeilingSlopeOffset = ceilslopeoffset; + s.CeilingSlope = ceilslope; + } + if(CopySettings.FloorSlope) + { + s.FloorSlopeOffset = floorslopeoffset; + s.FloorSlope = floorslope; + } + if(CopySettings.Flags) + { s.ClearFlags(); //mxd foreach (KeyValuePair f in flags) //mxd s.SetFlag(f.Key, f.Value); } - if(CopySettings.Fields) { + if(CopySettings.Fields) + { s.Fields.BeforeFieldsChange(); s.Fields.Clear(); foreach (KeyValuePair v in fields) diff --git a/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs index 0808ef10..73d45aeb 100644 --- a/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs @@ -49,7 +49,8 @@ // // tabControl // - this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tabControl.Controls.Add(this.sectors); this.tabControl.Controls.Add(this.linedefs); @@ -59,7 +60,7 @@ this.tabControl.Location = new System.Drawing.Point(12, 12); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(266, 127); + this.tabControl.Size = new System.Drawing.Size(266, 148); this.tabControl.TabIndex = 0; // // sectors @@ -68,7 +69,7 @@ this.sectors.Location = new System.Drawing.Point(4, 23); this.sectors.Name = "sectors"; this.sectors.Padding = new System.Windows.Forms.Padding(3); - this.sectors.Size = new System.Drawing.Size(258, 100); + this.sectors.Size = new System.Drawing.Size(258, 121); this.sectors.TabIndex = 0; this.sectors.Text = "Sectors"; this.sectors.UseVisualStyleBackColor = true; @@ -80,7 +81,7 @@ this.sectorflags.Dock = System.Windows.Forms.DockStyle.Fill; this.sectorflags.Location = new System.Drawing.Point(3, 3); this.sectorflags.Name = "sectorflags"; - this.sectorflags.Size = new System.Drawing.Size(252, 94); + this.sectorflags.Size = new System.Drawing.Size(252, 115); this.sectorflags.TabIndex = 3; this.sectorflags.VerticalSpacing = 1; // @@ -176,7 +177,7 @@ // this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(122, 144); + this.cancel.Location = new System.Drawing.Point(122, 165); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(75, 23); this.cancel.TabIndex = 0; @@ -187,7 +188,7 @@ // apply // this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(203, 144); + this.apply.Location = new System.Drawing.Point(203, 165); this.apply.Name = "apply"; this.apply.Size = new System.Drawing.Size(75, 23); this.apply.TabIndex = 1; @@ -198,7 +199,7 @@ // enableall // this.enableall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.enableall.Location = new System.Drawing.Point(11, 144); + this.enableall.Location = new System.Drawing.Point(11, 165); this.enableall.Name = "enableall"; this.enableall.Size = new System.Drawing.Size(70, 23); this.enableall.TabIndex = 2; @@ -212,7 +213,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.CancelButton = this.cancel; - this.ClientSize = new System.Drawing.Size(290, 171); + this.ClientSize = new System.Drawing.Size(290, 192); this.Controls.Add(this.enableall); this.Controls.Add(this.apply); this.Controls.Add(this.cancel);