From b27716ce6b152d291de9ae3de17b45712a694e70 Mon Sep 17 00:00:00 2001 From: MaxED Date: Tue, 3 Dec 2013 14:40:40 +0000 Subject: [PATCH] Classic modes: event lines were rendered inconsistently while panning the view. Sectors mode: event lines were not rendered for things targeting highlighted sector. Added "DropItem" and "CheckFlag" definitions to ACS and DECORATE script configurations. --- Build/Scripting/ZDoom_ACS.cfg | 2 ++ Build/Scripting/ZDoom_DECORATE.cfg | 2 ++ .../BuilderModes/ClassicModes/LinedefsMode.cs | 12 +++++++----- .../BuilderModes/ClassicModes/SectorsMode.cs | 12 ++++++------ .../Plugins/BuilderModes/ClassicModes/ThingsMode.cs | 13 +++++++------ 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg index 39280dc6..afb9e6bd 100644 --- a/Build/Scripting/ZDoom_ACS.cfg +++ b/Build/Scripting/ZDoom_ACS.cfg @@ -95,6 +95,7 @@ keywords CheckActorFloorTexture = "CheckActorFloorTexture(tid, texture)"; CheckActorInventory = "CheckActorInventory(tid, inventoryitem)"; CheckActorProperty = "CheckActorProperty(tid, property, value)"; + CheckFlag = "bool CheckFlag(int tid, string flag)"; CheckInventory = "CheckInventory(inventoryitem)"; CheckPlayerCamera = "CheckPlayerCamera(player)"; CheckSight = "CheckSight(source, dest, flags)"; @@ -121,6 +122,7 @@ keywords Door_LockedRaise = "Door_LockedRaise(tag, speed, delay, lock, lighttag)"; Door_Open = "Door_Open(tag, speed, lighttag)"; Door_Raise = "Door_Raise(tag, speed, delay, lighttag)"; + DropItem = "int DropItem(int tid, string item, int dropamount == -1, int chance == 256)"; Elevator_LowerToNearest = "Elevator_LowerToNearest(tag, speed)"; Elevator_MoveToFloor = "Elevator_MoveToFloor(tag, speed)"; Elevator_RaiseToNearest = "Elevator_RaiseToNearest(tag, speed)"; diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index cdbc4063..d8887b70 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -129,6 +129,7 @@ keywords A_ActiveAndUnblock = "A_ActiveAndUnblock"; A_ChangeFlag = "A_ChangeFlag(string flagname, bool value)"; A_ChangeVelocity = "A_ChangeVelocity(float x, float y, float z, int flags)"; + A_CheckFlag = "A_CheckFlag(string flagname, state label, int check_pointer = AAPTR_DEFAULT)"; A_ClearShadow = "A_ClearShadow"; A_CopyFriendliness = "A_CopyFriendliness[(pointer copyfrom)]"; A_DeQueueCorpse = "A_DeQueueCorpse"; @@ -189,6 +190,7 @@ keywords A_GiveInventory = "A_GiveInventory(string type, int count[, pointer giveto])"; A_GiveToTarget = "A_GiveToTarget(string type, int count[, pointer giveto])"; A_TakeInventory = "A_TakeInventory(string type, int count[, int flags[, pointer takefrom]])"; + A_DropItem = "A_DropItem(string item[, int dropamount [, int chance]])"; A_TakeFromTarget = "A_TakeFromTarget(string type, int count[, pointer takefrom])"; A_DropInventory = "A_DropInventory(string type)"; A_SelectWeapon = "A_SelectWeapon(string type)"; diff --git a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs index 568baa0d..4d8cd4ac 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs @@ -339,11 +339,12 @@ namespace CodeImp.DoomBuilder.BuilderModes if(renderer.StartPlotter(true)) { renderer.PlotLinedefSet(General.Map.Map.Linedefs); - for(int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); + if(!panning) //mxd + for(int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); if((highlighted != null) && !highlighted.IsDisposed) { - BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); + if(!panning) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); renderer.PlotLinedef(highlighted, General.Colors.Highlight); } renderer.PlotVerticesSet(General.Map.Map.Vertices); @@ -361,9 +362,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render selection if(renderer.StartOverlay(true)) { - if(!panning) //mxd - for(int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.RenderAssociations(renderer, association[i]); - if(!panning && (highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd + if (!panning) { //mxd + for (int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.RenderAssociations(renderer, association[i]); + if ((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd + } if(selecting) RenderMultiSelection(); renderer.Finish(); } diff --git a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs index 74aa3255..09713976 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs @@ -606,7 +606,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if((highlighted != null) && !highlighted.IsDisposed) { renderer.PlotSector(highlighted, General.Colors.Highlight); - BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); + if(!panning) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); } renderer.Finish(); } @@ -619,16 +619,16 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.Finish(); } + // Render overlay + UpdateOverlay(); + // Render selection - if(renderer.StartOverlay(true)) + if(renderer.StartOverlay(false)) { - if(highlighted != null && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd + if(!panning && highlighted != null && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd if(selecting) RenderMultiSelection(); renderer.Finish(); } - - // Render overlay - UpdateOverlay(); renderer.Present(); } diff --git a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs index 7dc90f95..c2f64fde 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs @@ -143,12 +143,13 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.RedrawSurface(); // Render lines and vertices - if(renderer.StartPlotter(true)) - { + if (renderer.StartPlotter(true)) { renderer.PlotLinedefSet(General.Map.Map.Linedefs); renderer.PlotVerticesSet(General.Map.Map.Vertices); - for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); - if ((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); + if(!panning) { //mxd + for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); + if((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); + } renderer.Finish(); } @@ -161,12 +162,12 @@ namespace CodeImp.DoomBuilder.BuilderModes for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.Me.RenderAssociations(renderer, association[i]); if((highlighted != null) && !highlighted.IsDisposed) { - if(!panning) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd renderer.RenderThing(highlighted, General.Colors.Highlight, 1.0f); + if(!panning) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd } //mxd - if(General.Settings.GZShowEventLines) { + if(!panning && General.Settings.GZShowEventLines) { List lines = GZBuilder.Data.LinksCollector.GetThingLinks(General.Map.ThingsFilter.VisibleThings); foreach(Line3D l in lines) {