From 5085954041863c829eeda3622d04353bbd0abbac Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 12:30:38 +0100 Subject: [PATCH 01/58] - this is version 2.3.0. --- src/version.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/version.h b/src/version.h index 8ed9e56aa..a6a529f46 100644 --- a/src/version.h +++ b/src/version.h @@ -41,12 +41,12 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "2.3pre" +#define VERSIONSTR "2.3.0" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,3,9999,0 -#define RC_PRODUCTVERSION 2,3,9999,0 -#define RC_PRODUCTVERSION2 "2.3pre" +#define RC_FILEVERSION 2,3,0,0 +#define RC_PRODUCTVERSION 2,3,0,0 +#define RC_PRODUCTVERSION2 "2.3.0" // Version identifier for network games. // Bump it every time you do a release unless you're certain you From e6518339433ec534dce68ea8956d84a0cf203071 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 14:38:46 +0100 Subject: [PATCH 02/58] - fixed: FString::StripRight's space checking counter was broken and would cause deletion of the last valid character in the string. --- src/zstring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zstring.cpp b/src/zstring.cpp index aed599cd6..cef956c90 100644 --- a/src/zstring.cpp +++ b/src/zstring.cpp @@ -696,7 +696,7 @@ void FString::StripRight () { size_t max = Len(), i; if (max == 0) return; - for (i = --max; i-- > 0; ) + for (i = --max; i > 0; i--) { if (!isspace((unsigned char)Chars[i])) break; @@ -728,12 +728,12 @@ void FString::StripRight (const char *charset) { size_t max = Len(), i; if (max == 0) return; - for (i = --max; i-- > 0; ) + for (i = --max; i > 0; i--) { if (!strchr (charset, Chars[i])) break; } - if (i == max) + if (i == max-1) { // Nothing to strip. return; } From c49573f1834f7f17f5e1c1ace167b2b3e4f50de8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 15:41:40 +0100 Subject: [PATCH 03/58] - fixed: A_M_Refire's 'ignoremissile' parameter lost its default value. --- wadsrc/static/zscript/doom/scriptedmarine.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/doom/scriptedmarine.txt b/wadsrc/static/zscript/doom/scriptedmarine.txt index 7428b7be3..51277ebd4 100644 --- a/wadsrc/static/zscript/doom/scriptedmarine.txt +++ b/wadsrc/static/zscript/doom/scriptedmarine.txt @@ -282,7 +282,7 @@ class ScriptedMarine : Actor // //============================================================================ - void A_M_Refire (bool ignoremissile, statelabel jumpto = null) + void A_M_Refire (bool ignoremissile = false, statelabel jumpto = null) { if (target == null || target.health <= 0) { From 4898bec12da37709bc019bcf73a22cc93404c251 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 16:55:45 +0100 Subject: [PATCH 04/58] - fixed: The StripRight fix left some code from a previous fix in that no longer applies. --- src/zstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zstring.cpp b/src/zstring.cpp index cef956c90..d17348bd3 100644 --- a/src/zstring.cpp +++ b/src/zstring.cpp @@ -733,7 +733,7 @@ void FString::StripRight (const char *charset) if (!strchr (charset, Chars[i])) break; } - if (i == max-1) + if (i == max) { // Nothing to strip. return; } From 46093cad14dd18ba2fb22f126afd5bb6ad01a803 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 17:50:13 +0100 Subject: [PATCH 05/58] - fixed: FLightDefaults::ApplyProperties must always validate the light's radius. --- src/gl/dynlights/gl_dynlight.cpp | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/gl/dynlights/gl_dynlight.cpp b/src/gl/dynlights/gl_dynlight.cpp index de05bb19f..b55862719 100644 --- a/src/gl/dynlights/gl_dynlight.cpp +++ b/src/gl/dynlights/gl_dynlight.cpp @@ -181,7 +181,9 @@ void FLightDefaults::ApplyProperties(ADynamicLight * light) const if (m_additive) light->flags4 |= MF4_ADDITIVE; if (m_dontlightself) light->flags4 |= MF4_DONTLIGHTSELF; light->m_tickCount = 0; - if (m_type == PulseLight) + switch (m_type) + { + case PulseLight: { float pulseTime = float(m_Param / TICRATE); @@ -190,6 +192,36 @@ void FLightDefaults::ApplyProperties(ADynamicLight * light) const light->m_cycler.ShouldCycle(true); light->m_cycler.SetCycleType(CYCLE_Sin); light->m_currentRadius = light->m_cycler.GetVal(); + break; + } + + case FlickerLight: + case RandomFlickerLight: + { + float minrad = float(MIN(light->m_Radius[0], light->m_Radius[1])); + float maxrad = float(MAX(light->m_Radius[0], light->m_Radius[1])); + light->m_currentRadius = clamp(light->m_currentRadius, minrad, maxrad); + break; + } + + case PointLight: + light->m_currentRadius = float(light->m_Radius[0]); + break; + + case SectorLight: + { + float intensity; + float scale = light->args[LIGHT_SCALE] / 8.f; + + if (scale == 0.f) scale = 1.f; + + intensity = light->Sector->lightlevel * scale; + intensity = clamp(intensity, 0.f, 255.f); + + light->m_currentRadius = intensity; + break; + } + } switch (m_attenuate) From 9899c589d645dfc768cdcb435381f7572421ddbc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 19:36:51 +0100 Subject: [PATCH 06/58] - re-added the glow properties for UDMF which somehow got lost. --- src/p_udmf.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 461feb9c8..51bd780f5 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1576,6 +1576,22 @@ public: sec->reflect[sector_t::ceiling] = (float)CheckFloat(key); break; + case NAME_floorglowcolor: + sec->planes[sector_t::floor].GlowColor = CheckInt(key); + break; + + case NAME_floorglowheight: + sec->planes[sector_t::floor].GlowHeight = (float)CheckFloat(key); + break; + + case NAME_ceilingglowcolor: + sec->planes[sector_t::ceiling].GlowColor = CheckInt(key); + break; + + case NAME_ceilingglowheight: + sec->planes[sector_t::ceiling].GlowHeight = (float)CheckFloat(key); + break; + case NAME_MoreIds: // delay parsing of the tag string until parsing of the sector is complete // This ensures that the ID is always the first tag in the list. From e8356bc13dc118499d90382a4cd6ccb09b55b9a3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jan 2017 22:52:11 +0100 Subject: [PATCH 07/58] - let SBARINFO treat 'null' as 'untranslated'. Strictly speaking this wasn't a bug but apparently some people tend to use 'null' as a general placeholder for 'nothing', even where not intended. --- src/g_shared/sbarinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_shared/sbarinfo.cpp b/src/g_shared/sbarinfo.cpp index 8ca8d6816..c06abf90d 100644 --- a/src/g_shared/sbarinfo.cpp +++ b/src/g_shared/sbarinfo.cpp @@ -190,7 +190,7 @@ class SBarInfoCommand } EColorRange GetTranslation(FScanner &sc) { - sc.MustGetToken(TK_Identifier); + if (!sc.CheckToken(TK_Null)) sc.MustGetToken(TK_Identifier); EColorRange returnVal = CR_UNTRANSLATED; FString namedTranslation; //we must send in "[translation]" const BYTE *trans_ptr; From d85496db5ff53e3457b206bd2ec93a6745a2578b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 00:28:30 +0100 Subject: [PATCH 08/58] - parse GLDEFS and its game-specific variants in lump order instead of both names sequentially. --- src/gl/dynlights/gl_dynlight.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gl/dynlights/gl_dynlight.cpp b/src/gl/dynlights/gl_dynlight.cpp index b55862719..839e86071 100644 --- a/src/gl/dynlights/gl_dynlight.cpp +++ b/src/gl/dynlights/gl_dynlight.cpp @@ -48,6 +48,7 @@ #include "stats.h" #include "zstring.h" #include "d_dehacked.h" +#include "v_text.h" #include "gl/dynlights/gl_dynlight.h" @@ -1368,12 +1369,13 @@ void gl_DoParseDefs(FScanner &sc, int workingLump) // //========================================================================== -void gl_LoadGLDefs(const char * defsLump) +void gl_LoadGLDefs(const char *defsLump) { int workingLump, lastLump; + static const char *gldefsnames[] = { "GLDEFS", defsLump, nullptr }; lastLump = 0; - while ((workingLump = Wads.FindLump(defsLump, &lastLump)) != -1) + while ((workingLump = Wads.FindLumpMulti(gldefsnames, &lastLump)) != -1) { FScanner sc(workingLump); gl_DoParseDefs(sc, workingLump); @@ -1415,8 +1417,7 @@ void gl_ParseDefs() break; } gl_ParseVavoomSkybox(); - if (defsLump != NULL) gl_LoadGLDefs(defsLump); - gl_LoadGLDefs("GLDEFS"); + gl_LoadGLDefs(defsLump); gl_InitializeActorLights(); } From 9f4abcec8936df29a5f26b8e47a6c89c151ce3aa Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 11:41:27 +0100 Subject: [PATCH 09/58] - use the attenuated light definitions from QZDoom. - apply them also to Freedoom. - to compensate for the increase in light size required for attenuated lights to look correct, when running in legacy mode, they to be reduced in size to 2/3 of their defined size because the textured lighting method does not support real attenuation. - removed the ancient size limit of 255 for light sizes which comes from a time when args were bytes. --- src/gl/dynlights/a_dynlight.cpp | 16 + src/gl/dynlights/gl_dynlight.cpp | 12 +- .../static/filter/doom.doom1/gldefs.txt | 478 +++++++++++------- .../static/filter/doom.doom2/gldefs.txt | 478 +++++++++++------- .../static/filter/doom.freedoom/gldefs.txt | 422 ++++++++++------ 5 files changed, 875 insertions(+), 531 deletions(-) diff --git a/src/gl/dynlights/a_dynlight.cpp b/src/gl/dynlights/a_dynlight.cpp index 114633b3f..15d9291bd 100644 --- a/src/gl/dynlights/a_dynlight.cpp +++ b/src/gl/dynlights/a_dynlight.cpp @@ -78,6 +78,7 @@ #include "gl/dynlights/gl_dynlight.h" #include "gl/utility/gl_convert.h" #include "gl/utility/gl_templates.h" +#include "gl/system//gl_interface.h" EXTERN_CVAR(Int, vid_renderer) @@ -127,6 +128,10 @@ void AVavoomLightWhite::BeginPlay () args[LIGHT_GREEN] = 128; args[LIGHT_BLUE] = 128; + if (gl.legacyMode && (flags4 & MF4_ATTENUATE)) + { + m_Radius[0] = m_Radius[0] * 2 / 3; + } Super::BeginPlay(); } @@ -140,6 +145,11 @@ void AVavoomLightColor::BeginPlay () args[LIGHT_GREEN] = l_args[2] >> 1; args[LIGHT_BLUE] = l_args[3] >> 1; + if (gl.legacyMode && (flags4 & MF4_ATTENUATE)) + { + m_Radius[0] = m_Radius[0] * 2 / 3; + } + Super::BeginPlay(); } @@ -195,6 +205,12 @@ void ADynamicLight::BeginPlay() m_Radius[1] = args[LIGHT_SECONDARY_INTENSITY]; specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees; visibletoplayer = true; + + if (gl.legacyMode && (flags4 & MF4_ATTENUATE)) + { + m_Radius[0] = m_Radius[0] * 2 / 3; + m_Radius[1] = m_Radius[1] * 2 / 3; + } } //========================================================================== diff --git a/src/gl/dynlights/gl_dynlight.cpp b/src/gl/dynlights/gl_dynlight.cpp index 839e86071..7dfa63dcf 100644 --- a/src/gl/dynlights/gl_dynlight.cpp +++ b/src/gl/dynlights/gl_dynlight.cpp @@ -56,6 +56,7 @@ #include "gl/utility/gl_clock.h" #include "gl/utility/gl_convert.h" #include "gl/data/gl_data.h" +#include "gl/system//gl_interface.h" int ScriptDepth; void gl_InitGlow(FScanner &sc); @@ -126,6 +127,7 @@ public: void SetParameter(double p) { m_Param = p; } void SetArg(int arg, BYTE val) { m_Args[arg] = val; } BYTE GetArg(int arg) { return m_Args[arg]; } + uint8_t GetAttenuate() const { return m_attenuate; } void SetOffset(float* ft) { m_Pos.X = ft[0]; m_Pos.Z = ft[1]; m_Pos.Y = ft[2]; } void SetSubtractive(bool subtract) { m_subtractive = subtract; } void SetAdditive(bool add) { m_additive = add; } @@ -342,6 +344,12 @@ void gl_AddLightDefaults(FLightDefaults *defaults) } } + if (gl.legacyMode && (defaults->GetAttenuate())) + { + defaults->SetArg(LIGHT_INTENSITY, defaults->GetArg(LIGHT_INTENSITY) * 2 / 3); + defaults->SetArg(LIGHT_SECONDARY_INTENSITY, defaults->GetArg(LIGHT_SECONDARY_INTENSITY) * 2 / 3); + } + LightDefaults.Push(defaults); } @@ -469,11 +477,11 @@ void gl_ParsePulseLight(FScanner &sc) defaults->SetOffset(floatTriple); break; case LIGHTTAG_SIZE: - intVal = clamp(gl_ParseInt(sc), 0, 255); + intVal = clamp(gl_ParseInt(sc), 0, 1024); defaults->SetArg(LIGHT_INTENSITY, intVal); break; case LIGHTTAG_SECSIZE: - intVal = clamp(gl_ParseInt(sc), 0, 255); + intVal = clamp(gl_ParseInt(sc), 0, 1024); defaults->SetArg(LIGHT_SECONDARY_INTENSITY, intVal); break; case LIGHTTAG_INTERVAL: diff --git a/wadsrc_lights/static/filter/doom.doom1/gldefs.txt b/wadsrc_lights/static/filter/doom.doom1/gldefs.txt index 6c037b49f..1d5e3aba0 100644 --- a/wadsrc_lights/static/filter/doom.doom1/gldefs.txt +++ b/wadsrc_lights/static/filter/doom.doom1/gldefs.txt @@ -10,17 +10,19 @@ flickerlight BPUFF1 { color 0.5 0.5 0.0 - size 6 - secondarySize 8 + size 9 + secondarySize 12 chance 0.8 + attenuate 1 } flickerlight BPUFF2 { color 0.5 0.5 0.0 - size 3 - secondarySize 4 + size 4 + secondarySize 6 chance 0.8 + attenuate 1 } object BulletPuff @@ -33,31 +35,35 @@ object BulletPuff pointlight ROCKET { color 1.0 0.7 0.0 - size 56 + size 84 + attenuate 1 } flickerlight ROCKET_X1 { color 1.0 0.7 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight ROCKET_X2 { color 0.5 0.3 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight ROCKET_X3 { color 0.3 0.1 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 + attenuate 1 } object Rocket @@ -73,39 +79,44 @@ object Rocket pointlight PLASMABALL { color 0.5 0.5 1.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA_X1 { color 0.5 0.5 1.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X2 { color 0.4 0.4 0.8 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA_X3 { color 0.25 0.25 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X4 { color 0.1 0.1 0.2 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall @@ -124,39 +135,44 @@ object PlasmaBall pointlight PLASMABALL1 { color 0.1 1.0 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.2 1.0 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.2 0.8 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.1 0.5 0.1 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X4 { color 0.0 0.2 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall1 @@ -175,31 +191,35 @@ object PlasmaBall1 pointlight PLASMABALL2 { color 1.0 0.1 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.9 0.2 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.6 0.2 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.2 0.0 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall2 @@ -216,47 +236,54 @@ object PlasmaBall2 pointlight BFGBALL { color 0.5 1.0 0.5 - size 80 + size 120 + attenuate 1 } flickerlight BFGBALL_X1 { color 0.5 1.0 0.5 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X2 { color 0.6 1.0 0.6 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X3 { color 0.7 1.0 0.7 - size 120 - secondarySize 128 + size 180 + secondarySize 192 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X4 { color 0.4 0.7 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 + attenuate 1 } flickerlight BFGBALL_X5 { color 0.1 0.3 0.1 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } object BFGBall @@ -291,11 +318,12 @@ object BFGExtra pulselight BARREL { color 0.0 0.5 0.0 - size 20 - secondarySize 21 + size 30 + secondarySize 31 interval 0.5 offset 0 36 0 dontlightself 1 + attenuate 1 } object ExplosiveBarrel @@ -311,8 +339,9 @@ object ExplosiveBarrel pointlight LAMP { color 1.0 1.0 0.8 - size 56 + size 84 offset 0 44 0 + attenuate 1 } object Column @@ -324,10 +353,11 @@ object Column pulselight SMALLLAMP { color 0.8 0.8 1.0 - size 56 - secondarySize 58 + size 84 + secondarySize 87 interval 0.4 offset 0 44 0 + attenuate 1 } object TechLamp2 @@ -339,10 +369,11 @@ object TechLamp2 pulselight BIGLAMP { color 0.8 0.8 1.0 - size 64 - secondarySize 66 + size 96 + secondarySize 99 interval 0.4 offset 0 72 0 + attenuate 1 } object TechLamp @@ -354,10 +385,11 @@ object TechLamp flickerlight2 BIGREDTORCH { color 1.0 0.5 0.2 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object RedTorch @@ -369,10 +401,11 @@ object RedTorch flickerlight2 BIGGREENTORCH { color 0.3 1.0 0.3 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object GreenTorch @@ -384,10 +417,11 @@ object GreenTorch flickerlight2 BIGBLUETORCH { color 0.3 0.3 1.0 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object BlueTorch @@ -399,10 +433,11 @@ object BlueTorch flickerlight2 SMALLREDTORCH { color 1.0 0.5 0.2 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortRedTorch @@ -414,10 +449,11 @@ object ShortRedTorch flickerlight2 SMALLGREENTORCH { color 0.3 1.0 0.3 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortGreenTorch @@ -429,10 +465,11 @@ object ShortGreenTorch flickerlight2 SMALLBLUETORCH { color 0.3 0.3 1.0 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortBlueTorch @@ -444,10 +481,11 @@ object ShortBlueTorch flickerlight2 FIREBARREL { color 1.0 0.9 0.4 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 32 0 + attenuate 1 } object BurningBarrel @@ -459,10 +497,11 @@ object BurningBarrel flickerlight2 SKULLCANDLES { color 1.0 1.0 0.3 - size 32 - secondarySize 34 + size 48 + secondarySize 51 interval 0.1 offset 0 24 0 + attenuate 1 } object HeadCandles @@ -474,8 +513,9 @@ object HeadCandles pointlight CANDLE { color 1.0 1.0 0.3 - size 16 + size 24 offset 0 16 0 + attenuate 1 } object Candlestick @@ -487,8 +527,9 @@ object Candlestick pointlight CANDELABRA { color 1.0 1.0 0.3 - size 48 + size 67 offset 0 52 0 + attenuate 1 } object Candelabra @@ -506,10 +547,11 @@ object Candelabra pulselight SOULSPHERE { color 0.3 0.3 1.0 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object SoulSphere @@ -521,10 +563,11 @@ object SoulSphere pulselight INVULN { color 0.3 1.0 0.3 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object InvulnerabilitySphere @@ -536,36 +579,41 @@ object InvulnerabilitySphere pointlight BLURSPHERE1 { color 1.0 0.0 0.0 - size 40 + size 60 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE2 { color 0.0 0.0 1.0 - size 32 + size 48 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE3 { color 0.0 0.0 1.0 - size 24 + size 36 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE4 { color 0.0 0.0 1.0 - size 16 + size 24 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE5 { color 0.0 0.0 1.0 - size 8 + size 12 offset 0 16 0 + attenuate 1 } object BlurSphere @@ -582,9 +630,11 @@ object BlurSphere pulselight HEALTHPOTION { color 0.0 0.0 0.6 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object HealthBonus @@ -596,10 +646,12 @@ object HealthBonus pulselight ARMORBONUS { color 0.2 0.6 0.2 - size 16 - secondarySize 14 + size 24 + secondarySize 21 interval 1.0 dontlightself 1 + attenuate 1 + offset 0 10 0 } object ArmorBonus @@ -622,9 +674,11 @@ object BlueSkull pulselight YELLOWKEY { color 0.6 0.6 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object YellowCard @@ -641,9 +695,11 @@ object YellowSkull pulselight REDKEY { color 0.6 0.0 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object RedCard @@ -660,13 +716,17 @@ object RedSkull pointlight GREENARMOR1 { color 0.0 0.6 0.0 - size 48 + size 72 + attenuate 1 + offset 0 10 0 } pointlight GREENARMOR2 { color 0.0 0.6 0.0 - size 32 + size 48 + attenuate 1 + offset 0 10 0 } object GreenArmor @@ -679,13 +739,17 @@ object GreenArmor pointlight BLUEARMOR1 { color 0.0 0.0 0.6 - size 48 + size 72 + attenuate 1 + offset 0 10 0 } pointlight BLUEARMOR2 { color 0.0 0.0 0.6 - size 32 + size 48 + attenuate 1 + offset 0 10 0 } object BlueArmor @@ -704,10 +768,11 @@ object BlueArmor flickerlight2 ZOMBIEATK { color 1.0 0.8 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 interval 1 offset 0 40 0 + attenuate 1 } object ZombieMan @@ -736,32 +801,36 @@ object DoomPlayer pointlight IMPBALL { color 1.0 0.7 0.4 - size 64 + size 96 + attenuate 1 } // Doom imp fireball explosion flickerlight IMPBALL_X1 { color 0.7 0.4 0.25 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X2 { color 0.4 0.2 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X3 { color 0.2 0.1 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object DoomImpBall @@ -777,9 +846,10 @@ object DoomImpBall pointlight SPECTRE { color 0.5 0.5 0.5 - size 48 + size 72 offset 0 24 0 subtractive 1 + attenuate 1 } /* @@ -793,33 +863,37 @@ object Spectre flickerlight CACOBALL { color 1.0 0.5 0.8 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight CACOBALL_X1 { color 0.9 0.4 0.7 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X2 { color 0.6 0.3 0.5 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X3 { color 0.3 0.1 0.1 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } object CacodemonBall @@ -836,31 +910,35 @@ object CacodemonBall pointlight BARONBALL { color 0.0 1.0 0.0 - size 64 + size 96 + attenuate 1 } flickerlight BARONBALL_X1 { color 0.6 0.9 0.6 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X2 { color 0.45 0.6 0.45 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X3 { color 0.2 0.3 0.2 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object BaronBall @@ -877,41 +955,46 @@ object BaronBall flickerlight LOSTSOUL { color 1.0 0.6 0.3 - size 56 + size 84 secondarysize 64 chance 0.1 + attenuate 1 } flickerlight LOSTSOUL_X1 { color 0.8 0.5 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X2 { color 0.6 0.3 0.2 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X3 { color 0.4 0.1 0.0 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X4 { color 0.2 0.0 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object LostSoul @@ -945,39 +1028,44 @@ object FatShot pointlight ARACHPLAS { color 0.6 1.0 0.4 - size 56 + size 84 + attenuate 1 } flickerlight ARACHPLAS_X1 { color 0.4 0.8 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X2 { color 0.6 0.6 0.3 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X3 { color 0.4 0.4 0.2 - size 48 - secondarySize 32 + size 72 + secondarySize 48 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X4 { color 0.2 0.2 0.1 - size 24 - secondarySize 16 + size 36 + secondarySize 24 chance 0.3 + attenuate 1 } object ArachnotronPlasma @@ -996,31 +1084,35 @@ object ArachnotronPlasma pointlight TRACER { color 1.0 0.5 0.3 - size 48 + size 72 + attenuate 1 } flickerlight TRACER_X1 { color 1.0 0.5 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.25 + attenuate 1 } flickerlight TRACER_X2 { color 0.6 0.3 0.1 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight TRACER_X3 { color 0.3 0.1 0.0 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } object RevenantTracer @@ -1037,73 +1129,81 @@ object RevenantTracer flickerlight ARCHFIRE1 { color 1.0 1.0 0.5 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.3 offset 0 8 0 + attenuate 1 } flickerlight ARCHFIRE2 { color 1.0 1.0 0.5 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 offset 0 24 0 + attenuate 1 } flickerlight ARCHFIRE3 { color 1.0 1.0 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 32 0 + attenuate 1 } flickerlight ARCHFIRE4 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHFIRE5 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight ARCHFIRE6 { color 0.6 0.6 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 offset 0 64 0 + attenuate 1 } flickerlight ARCHFIRE7 { color 0.4 0.4 0.2 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 offset 0 72 0 + attenuate 1 } flickerlight ARCHFIRE8 { color 0.2 0.2 0.1 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.3 offset 0 80 0 + attenuate 1 } object ArchvileFire @@ -1122,73 +1222,81 @@ object ArchvileFire flickerlight ARCHATK1 { color 1.0 1.0 0.4 - size 32 - secondarySize 48 + size 48 + secondarySize 72 chance 0.3 offset 0 80 0 + attenuate 1 } flickerlight ARCHATK2 { color 1.0 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 offset 0 80 0 + attenuate 1 } flickerlight ARCHATK3 { color 1.0 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 offset 0 64 0 + attenuate 1 } flickerlight ARCHATK4 { color 1.0 1.0 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight ARCHATK5 { color 1.0 1.0 0.4 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHATK6 { color 0.7 0.7 0.3 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHATK7 { color 0.3 0.3 0.1 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 offset 0 40 0 + attenuate 1 } pulselight ARCHRES { color 0.6 0.3 0.3 - size 64 - secondarySize 70 + size 96 + secondarySize 105 interval 0.5 offset 0 36 0 + attenuate 1 } object Archvile @@ -1216,33 +1324,37 @@ object Archvile flickerlight DTFOG1 { color 0.4 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.4 + attenuate 1 } flickerlight DTFOG2 { color 0.4 1.0 0.4 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.4 + attenuate 1 } flickerlight DTFOG3 { color 0.4 1.0 0.4 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.4 + attenuate 1 } flickerlight DTFOG4 { color 0.4 1.0 0.4 - size 10 - secondarySize 16 + size 15 + secondarySize 24 chance 0.4 + attenuate 1 } object TeleportFog diff --git a/wadsrc_lights/static/filter/doom.doom2/gldefs.txt b/wadsrc_lights/static/filter/doom.doom2/gldefs.txt index 6c037b49f..1d5e3aba0 100644 --- a/wadsrc_lights/static/filter/doom.doom2/gldefs.txt +++ b/wadsrc_lights/static/filter/doom.doom2/gldefs.txt @@ -10,17 +10,19 @@ flickerlight BPUFF1 { color 0.5 0.5 0.0 - size 6 - secondarySize 8 + size 9 + secondarySize 12 chance 0.8 + attenuate 1 } flickerlight BPUFF2 { color 0.5 0.5 0.0 - size 3 - secondarySize 4 + size 4 + secondarySize 6 chance 0.8 + attenuate 1 } object BulletPuff @@ -33,31 +35,35 @@ object BulletPuff pointlight ROCKET { color 1.0 0.7 0.0 - size 56 + size 84 + attenuate 1 } flickerlight ROCKET_X1 { color 1.0 0.7 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight ROCKET_X2 { color 0.5 0.3 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight ROCKET_X3 { color 0.3 0.1 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 + attenuate 1 } object Rocket @@ -73,39 +79,44 @@ object Rocket pointlight PLASMABALL { color 0.5 0.5 1.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA_X1 { color 0.5 0.5 1.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X2 { color 0.4 0.4 0.8 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA_X3 { color 0.25 0.25 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X4 { color 0.1 0.1 0.2 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall @@ -124,39 +135,44 @@ object PlasmaBall pointlight PLASMABALL1 { color 0.1 1.0 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.2 1.0 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.2 0.8 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.1 0.5 0.1 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X4 { color 0.0 0.2 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall1 @@ -175,31 +191,35 @@ object PlasmaBall1 pointlight PLASMABALL2 { color 1.0 0.1 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.9 0.2 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.6 0.2 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.2 0.0 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall2 @@ -216,47 +236,54 @@ object PlasmaBall2 pointlight BFGBALL { color 0.5 1.0 0.5 - size 80 + size 120 + attenuate 1 } flickerlight BFGBALL_X1 { color 0.5 1.0 0.5 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X2 { color 0.6 1.0 0.6 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X3 { color 0.7 1.0 0.7 - size 120 - secondarySize 128 + size 180 + secondarySize 192 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X4 { color 0.4 0.7 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 + attenuate 1 } flickerlight BFGBALL_X5 { color 0.1 0.3 0.1 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } object BFGBall @@ -291,11 +318,12 @@ object BFGExtra pulselight BARREL { color 0.0 0.5 0.0 - size 20 - secondarySize 21 + size 30 + secondarySize 31 interval 0.5 offset 0 36 0 dontlightself 1 + attenuate 1 } object ExplosiveBarrel @@ -311,8 +339,9 @@ object ExplosiveBarrel pointlight LAMP { color 1.0 1.0 0.8 - size 56 + size 84 offset 0 44 0 + attenuate 1 } object Column @@ -324,10 +353,11 @@ object Column pulselight SMALLLAMP { color 0.8 0.8 1.0 - size 56 - secondarySize 58 + size 84 + secondarySize 87 interval 0.4 offset 0 44 0 + attenuate 1 } object TechLamp2 @@ -339,10 +369,11 @@ object TechLamp2 pulselight BIGLAMP { color 0.8 0.8 1.0 - size 64 - secondarySize 66 + size 96 + secondarySize 99 interval 0.4 offset 0 72 0 + attenuate 1 } object TechLamp @@ -354,10 +385,11 @@ object TechLamp flickerlight2 BIGREDTORCH { color 1.0 0.5 0.2 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object RedTorch @@ -369,10 +401,11 @@ object RedTorch flickerlight2 BIGGREENTORCH { color 0.3 1.0 0.3 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object GreenTorch @@ -384,10 +417,11 @@ object GreenTorch flickerlight2 BIGBLUETORCH { color 0.3 0.3 1.0 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object BlueTorch @@ -399,10 +433,11 @@ object BlueTorch flickerlight2 SMALLREDTORCH { color 1.0 0.5 0.2 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortRedTorch @@ -414,10 +449,11 @@ object ShortRedTorch flickerlight2 SMALLGREENTORCH { color 0.3 1.0 0.3 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortGreenTorch @@ -429,10 +465,11 @@ object ShortGreenTorch flickerlight2 SMALLBLUETORCH { color 0.3 0.3 1.0 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortBlueTorch @@ -444,10 +481,11 @@ object ShortBlueTorch flickerlight2 FIREBARREL { color 1.0 0.9 0.4 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 32 0 + attenuate 1 } object BurningBarrel @@ -459,10 +497,11 @@ object BurningBarrel flickerlight2 SKULLCANDLES { color 1.0 1.0 0.3 - size 32 - secondarySize 34 + size 48 + secondarySize 51 interval 0.1 offset 0 24 0 + attenuate 1 } object HeadCandles @@ -474,8 +513,9 @@ object HeadCandles pointlight CANDLE { color 1.0 1.0 0.3 - size 16 + size 24 offset 0 16 0 + attenuate 1 } object Candlestick @@ -487,8 +527,9 @@ object Candlestick pointlight CANDELABRA { color 1.0 1.0 0.3 - size 48 + size 67 offset 0 52 0 + attenuate 1 } object Candelabra @@ -506,10 +547,11 @@ object Candelabra pulselight SOULSPHERE { color 0.3 0.3 1.0 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object SoulSphere @@ -521,10 +563,11 @@ object SoulSphere pulselight INVULN { color 0.3 1.0 0.3 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object InvulnerabilitySphere @@ -536,36 +579,41 @@ object InvulnerabilitySphere pointlight BLURSPHERE1 { color 1.0 0.0 0.0 - size 40 + size 60 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE2 { color 0.0 0.0 1.0 - size 32 + size 48 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE3 { color 0.0 0.0 1.0 - size 24 + size 36 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE4 { color 0.0 0.0 1.0 - size 16 + size 24 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE5 { color 0.0 0.0 1.0 - size 8 + size 12 offset 0 16 0 + attenuate 1 } object BlurSphere @@ -582,9 +630,11 @@ object BlurSphere pulselight HEALTHPOTION { color 0.0 0.0 0.6 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object HealthBonus @@ -596,10 +646,12 @@ object HealthBonus pulselight ARMORBONUS { color 0.2 0.6 0.2 - size 16 - secondarySize 14 + size 24 + secondarySize 21 interval 1.0 dontlightself 1 + attenuate 1 + offset 0 10 0 } object ArmorBonus @@ -622,9 +674,11 @@ object BlueSkull pulselight YELLOWKEY { color 0.6 0.6 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object YellowCard @@ -641,9 +695,11 @@ object YellowSkull pulselight REDKEY { color 0.6 0.0 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object RedCard @@ -660,13 +716,17 @@ object RedSkull pointlight GREENARMOR1 { color 0.0 0.6 0.0 - size 48 + size 72 + attenuate 1 + offset 0 10 0 } pointlight GREENARMOR2 { color 0.0 0.6 0.0 - size 32 + size 48 + attenuate 1 + offset 0 10 0 } object GreenArmor @@ -679,13 +739,17 @@ object GreenArmor pointlight BLUEARMOR1 { color 0.0 0.0 0.6 - size 48 + size 72 + attenuate 1 + offset 0 10 0 } pointlight BLUEARMOR2 { color 0.0 0.0 0.6 - size 32 + size 48 + attenuate 1 + offset 0 10 0 } object BlueArmor @@ -704,10 +768,11 @@ object BlueArmor flickerlight2 ZOMBIEATK { color 1.0 0.8 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 interval 1 offset 0 40 0 + attenuate 1 } object ZombieMan @@ -736,32 +801,36 @@ object DoomPlayer pointlight IMPBALL { color 1.0 0.7 0.4 - size 64 + size 96 + attenuate 1 } // Doom imp fireball explosion flickerlight IMPBALL_X1 { color 0.7 0.4 0.25 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X2 { color 0.4 0.2 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X3 { color 0.2 0.1 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object DoomImpBall @@ -777,9 +846,10 @@ object DoomImpBall pointlight SPECTRE { color 0.5 0.5 0.5 - size 48 + size 72 offset 0 24 0 subtractive 1 + attenuate 1 } /* @@ -793,33 +863,37 @@ object Spectre flickerlight CACOBALL { color 1.0 0.5 0.8 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight CACOBALL_X1 { color 0.9 0.4 0.7 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X2 { color 0.6 0.3 0.5 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X3 { color 0.3 0.1 0.1 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } object CacodemonBall @@ -836,31 +910,35 @@ object CacodemonBall pointlight BARONBALL { color 0.0 1.0 0.0 - size 64 + size 96 + attenuate 1 } flickerlight BARONBALL_X1 { color 0.6 0.9 0.6 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X2 { color 0.45 0.6 0.45 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X3 { color 0.2 0.3 0.2 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object BaronBall @@ -877,41 +955,46 @@ object BaronBall flickerlight LOSTSOUL { color 1.0 0.6 0.3 - size 56 + size 84 secondarysize 64 chance 0.1 + attenuate 1 } flickerlight LOSTSOUL_X1 { color 0.8 0.5 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X2 { color 0.6 0.3 0.2 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X3 { color 0.4 0.1 0.0 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X4 { color 0.2 0.0 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object LostSoul @@ -945,39 +1028,44 @@ object FatShot pointlight ARACHPLAS { color 0.6 1.0 0.4 - size 56 + size 84 + attenuate 1 } flickerlight ARACHPLAS_X1 { color 0.4 0.8 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X2 { color 0.6 0.6 0.3 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X3 { color 0.4 0.4 0.2 - size 48 - secondarySize 32 + size 72 + secondarySize 48 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X4 { color 0.2 0.2 0.1 - size 24 - secondarySize 16 + size 36 + secondarySize 24 chance 0.3 + attenuate 1 } object ArachnotronPlasma @@ -996,31 +1084,35 @@ object ArachnotronPlasma pointlight TRACER { color 1.0 0.5 0.3 - size 48 + size 72 + attenuate 1 } flickerlight TRACER_X1 { color 1.0 0.5 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.25 + attenuate 1 } flickerlight TRACER_X2 { color 0.6 0.3 0.1 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight TRACER_X3 { color 0.3 0.1 0.0 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } object RevenantTracer @@ -1037,73 +1129,81 @@ object RevenantTracer flickerlight ARCHFIRE1 { color 1.0 1.0 0.5 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.3 offset 0 8 0 + attenuate 1 } flickerlight ARCHFIRE2 { color 1.0 1.0 0.5 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 offset 0 24 0 + attenuate 1 } flickerlight ARCHFIRE3 { color 1.0 1.0 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 32 0 + attenuate 1 } flickerlight ARCHFIRE4 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHFIRE5 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight ARCHFIRE6 { color 0.6 0.6 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 offset 0 64 0 + attenuate 1 } flickerlight ARCHFIRE7 { color 0.4 0.4 0.2 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 offset 0 72 0 + attenuate 1 } flickerlight ARCHFIRE8 { color 0.2 0.2 0.1 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.3 offset 0 80 0 + attenuate 1 } object ArchvileFire @@ -1122,73 +1222,81 @@ object ArchvileFire flickerlight ARCHATK1 { color 1.0 1.0 0.4 - size 32 - secondarySize 48 + size 48 + secondarySize 72 chance 0.3 offset 0 80 0 + attenuate 1 } flickerlight ARCHATK2 { color 1.0 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 offset 0 80 0 + attenuate 1 } flickerlight ARCHATK3 { color 1.0 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 offset 0 64 0 + attenuate 1 } flickerlight ARCHATK4 { color 1.0 1.0 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight ARCHATK5 { color 1.0 1.0 0.4 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHATK6 { color 0.7 0.7 0.3 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHATK7 { color 0.3 0.3 0.1 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 offset 0 40 0 + attenuate 1 } pulselight ARCHRES { color 0.6 0.3 0.3 - size 64 - secondarySize 70 + size 96 + secondarySize 105 interval 0.5 offset 0 36 0 + attenuate 1 } object Archvile @@ -1216,33 +1324,37 @@ object Archvile flickerlight DTFOG1 { color 0.4 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.4 + attenuate 1 } flickerlight DTFOG2 { color 0.4 1.0 0.4 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.4 + attenuate 1 } flickerlight DTFOG3 { color 0.4 1.0 0.4 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.4 + attenuate 1 } flickerlight DTFOG4 { color 0.4 1.0 0.4 - size 10 - secondarySize 16 + size 15 + secondarySize 24 chance 0.4 + attenuate 1 } object TeleportFog diff --git a/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt b/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt index 23575d51d..1b501ca8e 100644 --- a/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt +++ b/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt @@ -10,17 +10,19 @@ flickerlight BPUFF1 { color 0.5 0.5 0.0 - size 6 - secondarySize 8 + size 9 + secondarySize 12 chance 0.8 + attenuate 1 } flickerlight BPUFF2 { color 0.5 0.5 0.0 - size 3 - secondarySize 4 + size 4 + secondarySize 6 chance 0.8 + attenuate 1 } object BulletPuff @@ -34,30 +36,34 @@ pointlight ROCKET { color 1.0 1.0 0.0 size 56 + attenuate 1 } flickerlight ROCKET_X1 { color 1.0 1.0 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight ROCKET_X2 { color 0.5 0.5 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight ROCKET_X3 { color 0.3 0.3 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 + attenuate 1 } object Rocket @@ -73,39 +79,44 @@ object Rocket pointlight PLASMABALL { color 0.5 0.5 1.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA_X1 { color 0.5 0.5 1.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X2 { color 0.4 0.4 0.8 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA_X3 { color 0.25 0.25 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA_X4 { color 0.1 0.1 0.2 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall @@ -124,39 +135,44 @@ object PlasmaBall pointlight PLASMABALL1 { color 0.1 1.0 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.2 1.0 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.2 0.8 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.1 0.5 0.1 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X4 { color 0.0 0.2 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall1 @@ -175,31 +191,35 @@ object PlasmaBall1 pointlight PLASMABALL2 { color 1.0 0.1 0.0 - size 56 + size 84 + attenuate 1 } flickerlight PLASMA1_X1 { color 0.9 0.2 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X2 { color 0.6 0.2 0.2 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.4 + attenuate 1 } flickerlight PLASMA1_X3 { color 0.2 0.0 0.0 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.4 + attenuate 1 } object PlasmaBall2 @@ -216,47 +236,53 @@ object PlasmaBall2 pointlight BFGBALL { color 0.5 0.5 1.0 - size 80 + size 120 + attenuate 1 } flickerlight BFGBALL_X1 { color 0.5 0.5 1.0 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X2 { color 0.6 0.6 1.0 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X3 { color 0.7 0.7 1.0 - size 120 - secondarySize 128 + size 180 + secondarySize 192 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X4 { color 0.4 0.4 0.7 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight BFGBALL_X5 { color 0.1 0.1 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } object BFGBall @@ -291,11 +317,12 @@ object BFGExtra pulselight BARREL { color 0.0 0.5 0.0 - size 20 - secondarySize 21 + size 30 + secondarySize 31 interval 0.5 offset 0 36 0 dontlightself 1 + attenuate 1 } object ExplosiveBarrel @@ -311,8 +338,9 @@ object ExplosiveBarrel pointlight LAMP { color 1.0 1.0 0.8 - size 66 - offset 0 40 0 + size 84 + offset 0 44 0 + attenuate 1 } object Column @@ -324,10 +352,11 @@ object Column pulselight SMALLLAMP { color 0.8 0.8 1.0 - size 56 - secondarySize 58 + size 84 + secondarySize 87 interval 0.4 offset 0 44 0 + attenuate 1 } object TechLamp2 @@ -339,10 +368,11 @@ object TechLamp2 pulselight BIGLAMP { color 0.8 0.8 1.0 - size 64 - secondarySize 66 + size 96 + secondarySize 99 interval 0.4 offset 0 72 0 + attenuate 1 } object TechLamp @@ -354,10 +384,11 @@ object TechLamp flickerlight2 BIGREDTORCH { color 1.0 0.9 0.2 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object RedTorch @@ -369,10 +400,11 @@ object RedTorch flickerlight2 BIGGREENTORCH { color 0.3 1.0 0.3 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 60 0 + attenuate 1 } object GreenTorch @@ -384,10 +416,11 @@ object GreenTorch flickerlight2 BIGBLUETORCH { color 0.3 0.3 1.0 - size 60 - secondarySize 66 + size 90 + secondarySize 99 interval 0.1 offset 0 50 0 + attenuate 1 } object BlueTorch @@ -399,10 +432,11 @@ object BlueTorch flickerlight2 SMALLREDTORCH { color 1.0 0.5 0.2 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortRedTorch @@ -414,10 +448,11 @@ object ShortRedTorch flickerlight2 SMALLGREENTORCH { color 0.3 1.0 0.3 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortGreenTorch @@ -429,10 +464,11 @@ object ShortGreenTorch flickerlight2 SMALLBLUETORCH { color 0.3 0.3 1.0 - size 48 - secondarySize 54 + size 72 + secondarySize 81 interval 0.1 offset 0 35 0 + attenuate 1 } object ShortBlueTorch @@ -444,10 +480,11 @@ object ShortBlueTorch flickerlight2 FIREBARREL { color 1.0 0.9 0.4 - size 54 - secondarySize 60 + size 72 + secondarySize 81 interval 0.1 offset 0 32 0 + attenuate 1 } object BurningBarrel @@ -459,10 +496,11 @@ object BurningBarrel flickerlight2 SKULLCANDLES { color 1.0 1.0 0.3 - size 32 - secondarySize 34 + size 48 + secondarySize 51 interval 0.1 offset 0 24 0 + attenuate 1 } object HeadCandles @@ -474,8 +512,9 @@ object HeadCandles pointlight CANDLE { color 1.0 1.0 0.3 - size 16 + size 24 offset 0 16 0 + attenuate 1 } object Candlestick @@ -491,10 +530,11 @@ object Candlestick pulselight SOULSPHERE { color 0.3 0.3 1.0 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object SoulSphere @@ -506,10 +546,11 @@ object SoulSphere pulselight INVULN { color 1.0 0.6 1.0 - size 40 - secondarySize 42 + size 60 + secondarySize 63 interval 2.0 offset 0 16 0 + attenuate 1 } object InvulnerabilitySphere @@ -521,36 +562,41 @@ object InvulnerabilitySphere pointlight BLURSPHERE1 { color 1.0 0.0 0.0 - size 40 + size 60 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE2 { color 0.0 0.0 1.0 - size 32 + size 48 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE3 { color 0.0 0.0 1.0 - size 24 + size 36 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE4 { color 0.0 0.0 1.0 - size 16 + size 24 offset 0 16 0 + attenuate 1 } pointlight BLURSPHERE5 { color 0.0 0.0 1.0 - size 8 + size 12 offset 0 16 0 + attenuate 1 } object BlurSphere @@ -567,9 +613,11 @@ object BlurSphere pulselight HEALTHPOTION { color 0.0 0.0 0.6 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object HealthBonus @@ -581,10 +629,12 @@ object HealthBonus pulselight ARMORBONUS { color 0.6 0.2 0.2 - size 16 - secondarySize 14 + size 24 + secondarySize 21 interval 1.0 dontlightself 1 + attenuate 1 + offset 0 10 0 } object ArmorBonus @@ -607,9 +657,11 @@ object BlueSkull pulselight YELLOWKEY { color 0.6 0.6 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object YellowCard @@ -626,9 +678,11 @@ object YellowSkull pulselight REDKEY { color 0.6 0.0 0.0 - size 16 - secondarySize 18 + size 24 + secondarySize 27 interval 2.0 + attenuate 1 + offset 0 10 0 } object RedCard @@ -644,7 +698,9 @@ object RedSkull pointlight GREENARMOR2 { color 0.4 0.0 0.0 - size 20 + size 48 + attenuate 1 + offset 0 10 0 } object GreenArmor @@ -661,10 +717,11 @@ object GreenArmor flickerlight2 ZOMBIEATK { color 1.0 0.8 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 interval 1 offset 0 40 0 + attenuate 1 } object ZombieMan @@ -693,32 +750,36 @@ object DoomPlayer pointlight IMPBALL { color 1.0 0.7 0.4 - size 64 + size 96 + attenuate 1 } // Doom imp fireball explosion flickerlight IMPBALL_X1 { color 0.7 0.7 0.25 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X2 { color 0.4 0.4 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight IMPBALL_X3 { color 0.2 0.2 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object DoomImpBall @@ -734,9 +795,10 @@ object DoomImpBall pointlight SPECTRE { color 0.5 0.5 0.5 - size 48 + size 72 offset 0 24 0 subtractive 1 + attenuate 1 } /* @@ -750,33 +812,37 @@ object Spectre flickerlight CACOBALL { color 1.0 0.5 0.8 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight CACOBALL_X1 { color 0.7 0.4 0.9 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X2 { color 0.5 0.3 0.6 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight CACOBALL_X3 { color 0.1 0.1 0.3 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } object CacodemonBall @@ -793,31 +859,35 @@ object CacodemonBall pointlight BARONBALL { color 0.0 1.0 0.0 - size 64 + size 96 + attenuate 1 } flickerlight BARONBALL_X1 { color 0.6 0.9 0.6 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X2 { color 0.45 0.6 0.45 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } flickerlight BARONBALL_X3 { color 0.2 0.3 0.2 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object BaronBall @@ -834,41 +904,46 @@ object BaronBall flickerlight LOSTSOUL { color 1.0 0.6 0.3 - size 56 + size 84 secondarysize 64 chance 0.1 + attenuate 1 } flickerlight LOSTSOUL_X1 { color 0.8 0.5 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X2 { color 0.6 0.3 0.2 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X3 { color 0.4 0.1 0.0 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.25 + attenuate 1 } flickerlight LOSTSOUL_X4 { color 0.2 0.0 0.0 - size 112 - secondarySize 120 + size 168 + secondarySize 180 chance 0.25 + attenuate 1 } object LostSoul @@ -909,39 +984,44 @@ object FatShot pointlight ARACHPLAS { color 0.4 1.0 0.4 - size 56 + size 84 + attenuate 1 } flickerlight ARACHPLAS_X1 { color 0.3 0.8 0.3 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X2 { color 0.3 0.6 0.3 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X3 { color 0.2 0.4 0.2 - size 48 - secondarySize 32 + size 72 + secondarySize 48 chance 0.3 + attenuate 1 } flickerlight ARACHPLAS_X4 { color 0.1 0.2 0.1 - size 24 - secondarySize 16 + size 36 + secondarySize 24 chance 0.3 + attenuate 1 } object ArachnotronPlasma @@ -960,31 +1040,35 @@ object ArachnotronPlasma pointlight TRACER { color 1.0 0.5 0.3 - size 48 + size 72 + attenuate 1 } flickerlight TRACER_X1 { color 1.0 0.7 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.25 + attenuate 1 } flickerlight TRACER_X2 { color 0.6 0.4 0.1 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.25 + attenuate 1 } flickerlight TRACER_X3 { color 0.3 0.2 0.0 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.25 + attenuate 1 } object RevenantTracer @@ -1001,73 +1085,81 @@ object RevenantTracer flickerlight ARCHFIRE1 { color 1.0 1.0 0.5 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.3 offset 0 8 0 + attenuate 1 } flickerlight ARCHFIRE2 { color 1.0 1.0 0.5 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 offset 0 24 0 + attenuate 1 } flickerlight ARCHFIRE3 { color 1.0 1.0 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 32 0 + attenuate 1 } flickerlight ARCHFIRE4 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight ARCHFIRE5 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight ARCHFIRE6 { color 0.6 0.6 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 offset 0 64 0 + attenuate 1 } flickerlight ARCHFIRE7 { color 0.4 0.4 0.2 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 offset 0 72 0 + attenuate 1 } flickerlight ARCHFIRE8 { color 0.2 0.2 0.1 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.3 offset 0 80 0 + attenuate 1 } object ArchvileFire @@ -1090,33 +1182,37 @@ object ArchvileFire flickerlight DTFOG1 { color 0.4 1.0 0.4 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.4 + attenuate 1 } flickerlight DTFOG2 { color 0.4 1.0 0.4 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.4 + attenuate 1 } flickerlight DTFOG3 { color 0.4 1.0 0.4 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.4 + attenuate 1 } flickerlight DTFOG4 { color 0.4 1.0 0.4 - size 10 - secondarySize 16 + size 15 + secondarySize 24 chance 0.4 + attenuate 1 } object TeleportFog From b7dc899cfeda85e9d46281ecf1889961d25ccdf0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 13:37:09 +0100 Subject: [PATCH 10/58] - fixed: PPointer was unable to handle pointers to class types for savegames. --- src/dobjtype.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index ae26bc37d..15331c793 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -1652,7 +1652,11 @@ void PPointer::SetPointer(void *base, unsigned offset, TArray *special) void PPointer::WriteValue(FSerializer &ar, const char *key,const void *addr) const { - if (PointedType->IsKindOf(RUNTIME_CLASS(PClass))) + if (PointedType->IsKindOf(RUNTIME_CLASS(PClassClass))) + { + ar(key, *(PClass **)addr); + } + else if (PointedType->IsKindOf(RUNTIME_CLASS(PClass))) { ar(key, *(DObject **)addr); } @@ -1671,7 +1675,13 @@ void PPointer::WriteValue(FSerializer &ar, const char *key,const void *addr) con bool PPointer::ReadValue(FSerializer &ar, const char *key, void *addr) const { - if (PointedType->IsKindOf(RUNTIME_CLASS(PClass))) + if (PointedType->IsKindOf(RUNTIME_CLASS(PClassClass))) + { + bool res = false; + ::Serialize(ar, key, *(PClass **)addr, (PClass**)nullptr); + return res; + } + else if (PointedType->IsKindOf(RUNTIME_CLASS(PClass))) { bool res = false; ::Serialize(ar, key, *(DObject **)addr, nullptr, &res); From a87d984c47fa0a0d7a3d86f510c4325742744fbc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 22:26:36 +0100 Subject: [PATCH 11/58] - fixed: The conditional operator could clobber a local variable if it was the result of the true expression. --- src/scripting/codegeneration/codegen.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 6a1bc8717..60a259b1b 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -208,6 +208,10 @@ ExpEmit::ExpEmit(VMFunctionBuilder *build, int type, int count) void ExpEmit::Free(VMFunctionBuilder *build) { + if (RegType == REGT_INT && RegNum == 0) + { + int a = 0; + } if (!Fixed && !Konst && RegType <= REGT_TYPE) { build->Registers[RegType].Return(RegNum, RegCount); @@ -4584,8 +4588,14 @@ ExpEmit FxConditional::Emit(VMFunctionBuilder *build) else { // Use the register returned by the true condition as the - // target for the false condition. - out = trueop; + // target for the false condition, if temporary. + // If this is a local variable we need another register for the result. + if (trueop.Fixed) + { + out = ExpEmit(build, trueop.RegType); + build->Emit(truex->ValueType->GetMoveOp(), out.RegNum, trueop.RegNum, 0); + } + else out = trueop; } } // Make sure to skip the false path. From 76c9ca89bdaaeacce9c73bb75e5f7f31502a42c3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 23:21:28 +0100 Subject: [PATCH 12/58] - fixed: The check for explicitly not splitting wall polygons at seg vertices was inverted. --- src/gl/scene/gl_walls_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 81164e434..7849114ff 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -195,7 +195,7 @@ void GLWall::RenderWall(int textured) gl_RenderState.ApplyLightIndex(dynlightindex); if (gl.buffermethod != BM_DEFERRED) { - MakeVertices(!(textured&RWF_NOSPLIT)); + MakeVertices(!!(textured&RWF_NOSPLIT)); } else if (vertcount == 0) { From 28f9e0314efce89e4ee48e0715d48818fa7d4126 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2017 23:26:19 +0100 Subject: [PATCH 13/58] - fixed typo in A_BrainSpit. --- wadsrc/static/zscript/doom/bossbrain.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/doom/bossbrain.txt b/wadsrc/static/zscript/doom/bossbrain.txt index f22e4dd2b..07f0cc946 100644 --- a/wadsrc/static/zscript/doom/bossbrain.txt +++ b/wadsrc/static/zscript/doom/bossbrain.txt @@ -253,7 +253,7 @@ extend class Actor } else { - spit.special2 = int((targ.pos.x - pos.x) / spit.Vel.y); + spit.special2 = int((targ.pos.x - pos.x) / spit.Vel.x); } // [GZ] Calculates when the projectile will have reached destination spit.special2 += level.maptime; From f8fa6294d26dea94b6c6a4981386c3b86c5f66c4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jan 2017 01:04:37 +0100 Subject: [PATCH 14/58] - added attenuation to ca. 40% of Heretic's light definitions. --- .../static/filter/heretic/gldefs.txt | 286 +++++++++++------- 1 file changed, 178 insertions(+), 108 deletions(-) diff --git a/wadsrc_lights/static/filter/heretic/gldefs.txt b/wadsrc_lights/static/filter/heretic/gldefs.txt index b8823db66..ecfbc18ce 100644 --- a/wadsrc_lights/static/filter/heretic/gldefs.txt +++ b/wadsrc_lights/static/filter/heretic/gldefs.txt @@ -10,25 +10,29 @@ pointlight WANDPUFF1 { color 0.9 0.9 0.5 - size 32 + size 48 + attenuate 1 } pointlight WANDPUFF2 { color 0.6 0.6 0.35 - size 24 + size 36 + attenuate 1 } pointlight WANDPUFF3 { color 0.3 0.3 0.2 - size 16 + size 24 + attenuate 1 } pointlight WANDPUFF4 { color 0.15 0.15 0.1 - size 8 + size 12 + attenuate 1 } object GoldWandPuff1 @@ -49,31 +53,36 @@ object GoldWandPuff2 pointlight WANDBALL { color 0.9 0.9 0.5 - size 24 + size 36 + attenuate 1 } pointlight WANDBALL_X1 { color 0.72 0.72 0.4 - size 32 + size 48 + attenuate 1 } pointlight WANDBALL_X2 { color 0.54 0.54 0.3 - size 34 + size 51 + attenuate 1 } pointlight WANDBALL_X3 { color 0.36 0.36 0.2 - size 36 + size 54 + attenuate 1 } pointlight WANDBALL_X4 { color 0.18 0.18 0.1 - size 38 + size 57 + attenuate 1 } object GoldWandFX2 @@ -91,31 +100,35 @@ object GoldWandFX2 pointlight SMALLBOWBOLT { color 0.5 1.0 0.5 - size 40 + size 60 + attenuate 1 } flickerlight SMALLBOWBOLT_X1 { color 0.35 0.7 0.35 - size 48 - secondarySize 52 + size 72 + secondarySize 78 chance 0.3 + attenuate 1 } flickerlight SMALLBOWBOLT_X2 { color 0.2 0.4 0.2 - size 40 - secondarySize 44 + size 60 + secondarySize 66 chance 0.3 + attenuate 1 } flickerlight SMALLBOWBOLT_X3 { color 0.1 0.2 0.1 - size 32 - secondarySize 36 + size 48 + secondarySize 54 chance 0.3 + attenuate 1 } object CrossbowFX3 @@ -131,31 +144,35 @@ object CrossbowFX3 pointlight BIGBOWBOLT { color 0.8 1.0 0.5 - size 64 + size 96 + attenuate 1 } flickerlight BIGBOWBOLT_X1 { color 0.48 0.8 0.4 - size 72 - secondarySize 74 + size 108 + secondarySize 110 chance 0.3 + attenuate 1 } flickerlight BIGBOWBOLT_X2 { color 0.44 0.6 0.3 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight BIGBOWBOLT_X3 { color 0.22 0.4 0.2 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } object CrossbowFX1 @@ -181,13 +198,15 @@ object CrossbowFX2 pointlight BOWTRAIL1 { color 0.0 1.0 0.0 - size 24 + size 36 + attenuate 1 } pointlight BOWTRAIL2 { color 0.0 0.7 0.0 - size 16 + size 24 + attenuate 1 } //object CrossbowFX4 @@ -200,25 +219,29 @@ pointlight BOWTRAIL2 pointlight CLAWPUFF1 { color 0.4 0.4 1.0 - size 32 + size 48 + attenuate 1 } pointlight CLAWPUFF2 { color 0.3 0.3 0.8 - size 24 + size 36 + attenuate 1 } pointlight CLAWPUFF3 { color 0.2 0.2 0.6 - size 16 + size 24 + attenuate 1 } pointlight CLAWPUFF4 { color 0.1 0.1 0.4 - size 8 + size 12 + attenuate 1 } object BlasterPuff @@ -237,31 +260,36 @@ object BlasterPuff pointlight BIGCLAWPUFF1 { color 0.4 0.4 1.0 - size 56 + size 84 + attenuate 1 } pointlight BIGCLAWPUFF2 { color 0.3 0.3 0.8 - size 48 + size 72 + attenuate 1 } pointlight BIGCLAWPUFF3 { color 0.2 0.2 0.6 - size 40 + size 60 + attenuate 1 } pointlight BIGCLAWPUFF4 { color 0.1 0.1 0.4 - size 32 + size 48 + attenuate 1 } pointlight BIGCLAWPUFF5 { color 0.0 0.0 0.2 - size 24 + size 36 + attenuate 1 } object BlasterFX1 @@ -277,47 +305,53 @@ object BlasterFX1 pointlight HELLSTAFFBALL { color 1.0 0.5 0.5 - size 56 + size 84 + attenuate 1 } flickerlight HELLSTAFFBALL_X1 { color 1.0 0.7 0.7 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight HELLSTAFFBALL_X2 { color 0.8 0.5 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight HELLSTAFFBALL_X3 { color 0.6 0.3 0.3 - size 80 - secondarySize 88 + size 120 + secondarySize 130 chance 0.3 + attenuate 1 } flickerlight HELLSTAFFBALL_X4 { color 0.4 0.2 0.2 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.3 + attenuate 1 } flickerlight HELLSTAFFBALL_X5 { color 0.2 0.1 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.3 + attenuate 1 } object HornRodFX1 @@ -350,31 +384,36 @@ object HornRodFX2 pointlight REDRAIN { color 1.0 0.0 0.0 - size 32 + size 48 + attenuate 1 } pointlight REDRAIN_X1 { color 1.0 0.4 0.4 - size 48 + size 72 + attenuate 1 } pointlight REDRAIN_X2 { color 0.8 0.3 0.3 - size 40 + size 60 + attenuate 1 } pointlight REDRAIN_X3 { color 0.5 0.1 0.1 - size 32 + size 48 + attenuate 1 } pointlight REDRAIN_X4 { color 0.3 0.0 0.0 - size 24 + size 36 + attenuate 1 } object RainPillar @@ -392,55 +431,62 @@ object RainPillar pointlight PHOENIXSHOT { color 1.0 0.6 0.4 - size 64 + size 96 + attenuate 1 } flickerlight PHOENIX_X1 { color 1.0 0.8 0.4 - size 104 - secondarySize 112 + size 156 + secondarySize 168 chance 0.3 + attenuate 1 } flickerlight PHOENIX_X2 { color 1.0 0.6 0.3 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.3 + attenuate 1 } flickerlight PHOENIX_X3 { color 0.8 0.6 0.25 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + attenuate 1 } flickerlight PHOENIX_X4 { color 0.6 0.4 0.2 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight PHOENIX_X5 { color 0.4 0.2 0.1 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight PHOENIX_X6 { color 0.2 0.1 0.0 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.3 + attenuate 1 } object PhoenixFX1 @@ -461,25 +507,28 @@ object PhoenixFX1 flickerlight PHOENIXFLAME { color 0.7 0.4 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.5 + attenuate 1 } flickerlight PHOENIXFLAME2 { color 0.5 0.2 0.1 - size 24 - secondarySize 32 + size 36 + secondarySize 48 chance 0.5 + attenuate 1 } flickerlight PHOENIXFLAME3 { color 0.3 0.1 0.0 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.5 + attenuate 1 } object PhoenixFX2 @@ -495,33 +544,37 @@ object PhoenixFX2 flickerlight MACEBALL_X1 { color 0.8 0.8 0.4 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight MACEBALL_X2 { color 0.6 0.6 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } flickerlight MACEBALL_X3 { color 0.4 0.4 0.2 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } flickerlight MACEBALL_X4 { color 0.2 0.2 0.1 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.3 + attenuate 1 } object MaceFX1 @@ -564,31 +617,35 @@ object MaceFX4 pointlight HIMPBALL { color 1.0 0.8 0.4 - size 32 + size 48 + attenuate 1 } flickerlight HIMPBALL_X1 { color 0.8 0.5 0.33 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } flickerlight HIMPBALL_X2 { color 0.6 0.4 0.27 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight HIMPBALL_X3 { color 0.3 0.1 0.0 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } object HereticImpBall @@ -607,9 +664,10 @@ object HereticImpBall flickerlight MUMMYATK { color 1.0 1.0 0.5 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.4 + attenuate 1 } object MummyLeader @@ -626,33 +684,37 @@ object MummyLeaderGhost flickerlight MUMMYBALL { color 1.0 1.0 0.5 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.4 + attenuate 1 } flickerlight MUMMYBALL_X1 { color 0.7 0.7 0.35 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.4 + attenuate 1 } flickerlight MUMMYBALL_X2 { color 0.4 0.4 0.2 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.4 + attenuate 1 } flickerlight MUMMYBALL_X3 { color 0.2 0.2 0.1 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.4 + attenuate 1 } object MummyFX1 @@ -670,31 +732,35 @@ object MummyFX1 pointlight GREENAXE { color 0.4 1.0 0.4 - size 32 + size 48 + attenuate 1 } flickerlight GREENAXE_X1 { color 0.3 0.7 0.3 - size 32 - secondarySize 48 + size 49 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight GREENAXE_X2 { color 0.2 0.4 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } flickerlight GREENAXE_X3 { color 0.0 0.2 0.0 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } object KnightAxe @@ -712,31 +778,35 @@ object KnightAxe pointlight REDAXE { color 1.0 0.5 0.5 - size 32 + size 48 + attenuate 1 } flickerlight REDAXE_X1 { color 0.7 0.3 0.3 - size 32 - secondarySize 48 + size 48 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight REDAXE_X2 { color 0.4 0.2 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } flickerlight REDAXE_X3 { color 0.2 0.1 0.1 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.3 + attenuate 1 } object RedAxe From 4fb44dffebefc6d4b7e6eaa7d2a41a510bddb998 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jan 2017 12:00:26 +0100 Subject: [PATCH 15/58] - disabled OpenGL 3.0 on the Open Source Mesa driver for Linux because it appears to be broken. --- src/gl/system/gl_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index b0bc46ab2..f1babfb7f 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -168,7 +168,7 @@ void gl_LoadExtensions() } // The minimum requirement for the modern render path are GL 3.0 + uniform buffers - if (gl_version < 3.0f || (gl_version < 3.1f && !CheckExtension("GL_ARB_uniform_buffer_object"))) + if (gl_version < 3.0f || (gl_version < 3.1f && !CheckExtension("GL_ARB_uniform_buffer_object") && strstr(gl.vendorstring, "X.Org") == nullptr)) { gl.legacyMode = true; gl.lightmethod = LM_LEGACY; From 73433566efa462ae161eb0cb3e5cde529b223774 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jan 2017 16:00:25 +0100 Subject: [PATCH 16/58] - fixed: 'out' parameters must always allocate an address register, regardless of type. --- src/scripting/vm/vmbuilder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scripting/vm/vmbuilder.cpp b/src/scripting/vm/vmbuilder.cpp index 3e833af79..4886dba8c 100644 --- a/src/scripting/vm/vmbuilder.cpp +++ b/src/scripting/vm/vmbuilder.cpp @@ -857,14 +857,15 @@ void FFunctionBuildList::Build() // Allocate registers for the function's arguments and create local variable nodes before starting to resolve it. VMFunctionBuilder buildit(item.Func->GetImplicitArgs()); - for(unsigned i=0;iVariants[0].Proto->ArgumentTypes.Size();i++) + for (unsigned i = 0; i < item.Func->Variants[0].Proto->ArgumentTypes.Size(); i++) { auto type = item.Func->Variants[0].Proto->ArgumentTypes[i]; auto name = item.Func->Variants[0].ArgNames[i]; auto flags = item.Func->Variants[0].ArgFlags[i]; // this won't get resolved and won't get emitted. It is only needed so that the code generator can retrieve the necessary info about this argument to do its work. - auto local = new FxLocalVariableDeclaration(type, name, nullptr, flags, FScriptPosition()); - local->RegNum = buildit.Registers[type->GetRegType()].Get(type->GetRegCount()); + auto local = new FxLocalVariableDeclaration(type, name, nullptr, flags, FScriptPosition()); + if (!(flags & VARF_Out)) local->RegNum = buildit.Registers[type->GetRegType()].Get(type->GetRegCount()); + else local->RegNum = buildit.Registers[REGT_POINTER].Get(1); ctx.FunctionArgs.Push(local); } From 1f8020363879e0028aff0ff7901eb9a8143f8700 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jan 2017 17:16:33 +0100 Subject: [PATCH 17/58] - fixed a few Freedoom light definitions. --- .../static/filter/doom.freedoom/gldefs.txt | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt b/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt index 1b501ca8e..19aa9d0fd 100644 --- a/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt +++ b/wadsrc_lights/static/filter/doom.freedoom/gldefs.txt @@ -337,7 +337,7 @@ object ExplosiveBarrel // Floor lamp pointlight LAMP { - color 1.0 1.0 0.8 + color 0.6 1.0 0.6 size 84 offset 0 44 0 attenuate 1 @@ -351,7 +351,7 @@ object Column // Short tech lamp pulselight SMALLLAMP { - color 0.8 0.8 1.0 + color 1.0 1.0 0.7 size 84 secondarySize 87 interval 0.4 @@ -367,7 +367,7 @@ object TechLamp2 // Tall tech lamp pulselight BIGLAMP { - color 0.8 0.8 1.0 + color 1.0 1.0 0.7 size 96 secondarySize 99 interval 0.4 @@ -542,6 +542,22 @@ object SoulSphere frame SOUL { light SOULSPHERE } } +// Soul Sphere +pulselight MEGASPHERE +{ + color 0.4 1.0 0.4 + size 60 + secondarySize 63 + interval 2.0 + offset 0 16 0 + attenuate 1 +} + +object MegaSphere +{ + frame MEGA { light MEGASPHERE } +} + // Invulnerability Sphere pulselight INVULN { @@ -609,22 +625,6 @@ object BlurSphere frame PINSD { light BLURSPHERE5 } } -// Health Potion -pulselight HEALTHPOTION -{ - color 0.0 0.0 0.6 - size 24 - secondarySize 27 - interval 2.0 - attenuate 1 - offset 0 10 0 -} - -object HealthBonus -{ - frame BON1 { light HEALTHPOTION } -} - // Armour Helmet pulselight ARMORBONUS { From 4f868f53b18b551edff32c32deb5246a50cef492 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Jan 2017 18:31:01 +0100 Subject: [PATCH 18/58] - completed attenuation for Heretic. A few items were intentionally left unattenuated. --- .../static/filter/heretic/gldefs.txt | 408 +++++++++++------- 1 file changed, 253 insertions(+), 155 deletions(-) diff --git a/wadsrc_lights/static/filter/heretic/gldefs.txt b/wadsrc_lights/static/filter/heretic/gldefs.txt index ecfbc18ce..85a2fd6e2 100644 --- a/wadsrc_lights/static/filter/heretic/gldefs.txt +++ b/wadsrc_lights/static/filter/heretic/gldefs.txt @@ -823,25 +823,28 @@ object RedAxe flickerlight DISCIPLEBALL { color 1.0 0.5 1.0 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } flickerlight DISCIPLEBALL_X1 { color 0.7 0.3 0.7 - size 16 - secondarySize 24 + size 24 + secondarySize 36 chance 0.3 + attenuate 1 } flickerlight DISCIPLEBALL_X2 { color 0.3 0.17 0.3 - size 8 - secondarySize 16 + size 12 + secondarySize 24 chance 0.3 + attenuate 1 } object WizardFX1 @@ -860,37 +863,41 @@ object WizardFX1 flickerlight IRONLICH1 { color 1.0 0.4 0.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 40 0 + attenuate 1 } flickerlight IRONLICH2 { color 1.0 0.7 0.0 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 offset 0 44 0 + attenuate 1 } flickerlight IRONLICH3 { color 0.8 0.4 0.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 offset 0 48 0 + attenuate 1 } flickerlight IRONLICH4 { color 0.4 0.0 0.0 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 offset 0 40 0 + attenuate 1 } object Ironlich @@ -905,31 +912,36 @@ object Ironlich pointlight FROSTBALL { color 0.4 0.4 1.0 - size 48 + size 72 + attenuate 1 } pointlight FROSTBALL_X1 { color 0.4 0.4 1.0 - size 64 + size 96 + attenuate 1 } pointlight FROSTBALL_X2 { color 0.2 0.2 0.7 - size 56 + size 84 + attenuate 1 } pointlight FROSTBALL_X3 { color 0.1 0.1 0.4 - size 48 + size 72 + attenuate 1 } pointlight FROSTBALL_X4 { color 0.0 0.0 0.2 - size 40 + size 60 + attenuate 1 } object HeadFX1 @@ -948,7 +960,8 @@ object HeadFX1 pointlight FROSTSHARD { color 0.0 0.0 0.5 - size 32 + size 48 + attenuate 1 } object HeadFX2 @@ -962,41 +975,46 @@ object HeadFX2 flickerlight LICHFIRE { color 1.0 0.7 0.4 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.5 + attenuate 1 } flickerlight LICHFIRE_X1 { color 0.9 0.4 0.3 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight LICHFIRE_X2 { color 0.7 0.1 0.2 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.5 + attenuate 1 } flickerlight LICHFIRE_X3 { color 0.4 0.1 0.1 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.5 + attenuate 1 } flickerlight LICHFIRE_X4 { color 0.2 0.0 0.0 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.5 + attenuate 1 } object HeadFX3 @@ -1015,33 +1033,37 @@ object HeadFX3 flickerlight CLINK_X1 { color 1.0 0.8 0.0 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.5 + attenuate 1 } flickerlight CLINK_X2 { color 1.0 0.6 0.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.5 + attenuate 1 } flickerlight CLINK_X3 { color 0.6 0.3 0.0 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight CLINK_X4 { color 0.3 0.0 0.0 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.5 + attenuate 1 } object Clink @@ -1056,10 +1078,11 @@ object Clink flickerlight BEASTATK { color 1.0 0.7 0.0 - size 56 - secondarySize 64 + size 84 + secondarySize 96 chance 0.5 offset 0 48 0 + attenuate 1 } object Beast @@ -1071,41 +1094,46 @@ object Beast flickerlight BEASTBALL { color 1.0 0.5 0.3 - size 48 - secondarySize 56 + size 72 + secondarySize 88 chance 0.3 + attenuate 1 } flickerlight BEASTBALL_X1 { color 0.8 0.4 0.24 - size 48 - secondarySize 56 + size 72 + secondarySize 84 chance 0.3 + attenuate 1 } flickerlight BEASTBALL_X2 { color 0.6 0.3 0.2 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight BEASTBALL_X3 { color 0.4 0.2 0.1 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } flickerlight BEASTBALL_X4 { color 0.2 0.0 0.0 - size 28 - secondarySize 32 + size 42 + secondarySize 48 chance 0.3 + attenuate 1 } object BeastBall @@ -1124,39 +1152,44 @@ object BeastBall pointlight SNAKESHOT1 { color 0.5 0.3 1.0 - size 24 + size 36 + attenuate 1 } flickerlight SNAKESHOT1_X1 { color 0.5 0.3 1.0 - size 24 - secondarySize 26 + size 36 + secondarySize 39 chance 0.3 + attenuate 1 } flickerlight SNAKESHOT1_X2 { color 0.4 0.2 0.7 - size 24 - secondarySize 26 + size 36 + secondarySize 39 chance 0.3 + attenuate 1 } flickerlight SNAKESHOT1_X3 { color 0.3 0.1 0.5 - size 28 - secondarySize 30 + size 42 + secondarySize 45 chance 0.3 + attenuate 1 } flickerlight SNAKESHOT1_X4 { color 0.3 0.0 0.3 - size 26 - secondarySize 28 + size 39 + secondarySize 42 chance 0.3 + attenuate 1 } object SnakeProjA @@ -1176,31 +1209,35 @@ object SnakeProjA pointlight SNAKESHOT2 { color 1.0 0.6 0.4 - size 32 + size 48 + attenuate 1 } flickerlight SNAKESHOT2_X1 { color 1.0 0.6 0.4 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight SNAKESHOT2_X2 { color 0.6 0.3 0.25 - size 48 - secondarySize 52 + size 72 + secondarySize 88 chance 0.3 + attenuate 1 } flickerlight SNAKESHOT2_X3 { color 0.3 0.1 0.1 - size 44 - secondarySize 48 + size 66 + secondarySize 72 chance 0.3 + attenuate 1 } object SnakeProjB @@ -1217,41 +1254,46 @@ object SnakeProjB flickerlight MAULBALL { color 1.0 0.7 0.5 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.5 + attenuate 1 } flickerlight MAULBALL_X1 { color 0.8 0.6 0.4 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight MAULBALL_X2 { color 0.8 0.4 0.3 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight MAULBALL_X3 { color 0.6 0.3 0.2 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.3 + attenuate 1 } flickerlight MAULBALL_X4 { color 0.4 0.1 0.0 - size 32 - secondarySize 40 + size 48 + secondarySize 60 chance 0.3 + attenuate 1 } object MinotaurFX1 @@ -1272,48 +1314,60 @@ pulselight MAULFLAME { color 1.0 0.7 0.5 size 1 - secondarySize 64 + secondarySize 96 interval 6.0 + offset 0 10 0 + attenuate 1 } flickerlight MAULFLAME_X1 { color 1.0 0.7 0.5 - size 48 - secondarySize 56 + size 72 + secondarySize 88 chance 0.3 + offset 0 10 0 + attenuate 1 } flickerlight MAULFLAME_X2 { color 1.0 0.7 0.5 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.3 + offset 0 10 0 + attenuate 1 } flickerlight MAULFLAME_X3 { color 0.7 0.4 0.3 - size 64 - secondarySize 68 + size 96 + secondarySize 101 chance 0.3 + offset 0 10 0 + attenuate 1 } flickerlight MAULFLAME_X4 { color 0.5 0.3 0.1 - size 68 - secondarySize 72 + size 102 + secondarySize 108 chance 0.3 + offset 0 10 0 + attenuate 1 } flickerlight MAULFLAME_X5 { color 0.2 0.0 0.0 - size 72 - secondarySize 76 + size 108 + secondarySize 114 chance 0.3 + offset 0 10 0 + attenuate 1 } object MinotaurFX3 @@ -1337,41 +1391,46 @@ object MinotaurFX3 flickerlight SERPENTBALL { color 1.0 0.95 0.5 - size 56 - secondarySize 64 + size 588 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight SERPENTBALL_X1 { color 1.0 0.95 0.5 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.5 + attenuate 1 } flickerlight SERPENTBALL_X2 { color 0.8 0.8 0.4 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.5 + attenuate 1 } flickerlight SERPENTBALL_X3 { color 0.5 0.5 0.25 - size 88 - secondarySize 96 + size 132 + secondarySize 144 chance 0.5 + attenuate 1 } flickerlight SERPENTBALL_X4 { color 0.2 0.2 0.1 - size 96 - secondarySize 104 + size 144 + secondarySize 156 chance 0.5 + attenuate 1 } object SorcererFX1 @@ -1391,49 +1450,55 @@ object SorcererFX1 flickerlight DSPARILBALL { color 0.5 0.5 1.0 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.5 + attenuate 1 } flickerlight DSPARILBALL_X1 { color 0.5 0.5 1.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight DSPARILBALL_X2 { color 0.4 0.4 0.8 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } flickerlight DSPARILBALL_X3 { color 0.3 0.3 0.6 - size 88 - secondarySize 92 + size 132 + secondarySize 138 chance 0.3 + attenuate 1 } flickerlight DSPARILBALL_X4 { color 0.2 0.2 0.4 - size 82 - secondarySize 86 + size 123 + secondarySize 138 chance 0.3 + attenuate 1 } flickerlight DSPARILBALL_X5 { color 0.1 0.1 0.2 - size 82 - secondarySize 86 + size 123 + secondarySize 138 chance 0.3 + attenuate 1 } object Sorcerer2FX1 @@ -1454,9 +1519,10 @@ object Sorcerer2FX1 flickerlight DSPARILATK { color 0.3 0.3 1.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.5 + attenuate 1 } object Sorcerer2 @@ -1489,10 +1555,11 @@ object WallTorch flickerlight2 FIREBRAZ { color 1.0 0.8 0.0 - size 68 - secondarySize 76 + size 102 + secondarySize 114 interval 0.1 offset 0 48 0 + attenuate 1 } object FireBrazier @@ -1504,10 +1571,11 @@ object FireBrazier flickerlight2 SERPTORCH { color 1.0 0.8 0.0 - size 48 - secondarySize 56 + size 72 + secondarySize 88 interval 0.1 offset 0 48 0 + attenuate 1 } object SerpentTorch @@ -1519,9 +1587,10 @@ object SerpentTorch flickerlight2 CHANDELIER { color 1.0 1.0 0.0 - size 64 - secondarySize 68 + size 96 + secondarySize 102 interval 0.1 + attenuate 1 } object Chandelier @@ -1533,33 +1602,41 @@ object Chandelier flickerlight POD_X1 { color 0.0 1.0 0.0 - size 48 - secondarySize 56 + size 72 + secondarySize 88 chance 0.3 + offset 0 30 0 + attenuate 1 } flickerlight POD_X2 { color 0.0 0.7 0.0 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + offset 0 30 0 + attenuate 1 } flickerlight POD_X3 { color 0.0 0.4 0.0 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + offset 0 30 0 + attenuate 1 } flickerlight POD_X4 { color 0.0 0.2 0.0 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + offset 0 30 0 + attenuate 1 } object Pod @@ -1574,9 +1651,10 @@ object Pod flickerlight VOLCANOBALL1 { color 1.0 0.7 0.5 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.5 + attenuate 1 } object VolcanoBlast @@ -1588,9 +1666,10 @@ object VolcanoBlast flickerlight VOLCANOBALL1 { color 1.0 0.5 0.0 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.5 + attenuate 1 } object VolcanoTBlast @@ -1602,8 +1681,9 @@ object VolcanoTBlast pointlight BLUESTATUE { color 0.0 0.0 1.0 - size 32 + size 48 offset 0 64 0 + attenuate 1 } object KeyGizmoBlue @@ -1615,8 +1695,9 @@ object KeyGizmoBlue pointlight YELLOWSTATUE { color 1.0 1.0 0.0 - size 32 + size 48 offset 0 64 0 + attenuate 1 } object KeyGizmoYellow @@ -1628,8 +1709,9 @@ object KeyGizmoYellow pointlight GREENSTATUE { color 0.0 1.0 0.0 - size 32 + size 48 offset 0 64 0 + attenuate 1 } object KeyGizmoGreen @@ -1645,41 +1727,46 @@ object KeyGizmoGreen flickerlight TIMEBOMB_X1 { color 1.0 0.6 0.4 - size 48 - secondarySize 56 + size 72 + secondarySize 88 chance 0.3 + attenuate 1 } flickerlight TIMEBOMB_X1 { color 0.8 0.4 0.3 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.3 + attenuate 1 } flickerlight TIMEBOMB_X1 { color 0.6 0.3 0.2 - size 64 - secondarySize 72 + size 96 + secondarySize 108 chance 0.3 + attenuate 1 } flickerlight TIMEBOMB_X1 { color 0.4 0.2 0.1 - size 72 - secondarySize 80 + size 108 + secondarySize 120 chance 0.3 + attenuate 1 } flickerlight TIMEBOMB_X1 { color 0.2 0.1 0.0 - size 80 - secondarySize 88 + size 120 + secondarySize 132 chance 0.3 + attenuate 1 } object ActivatedTimeBomb @@ -1835,9 +1922,11 @@ object PhoenixRodHefty pulselight HYELLOWKEY { color 1.0 1.0 0.0 - size 24 - secondarySize 26 + size 36 + secondarySize 39 interval 2.0 + offset 0 16 0 + attenuate 1 } object KeyYellow { @@ -1848,9 +1937,11 @@ object KeyYellow pulselight HBLUEKEY { color 0.0 0.0 1.0 - size 24 - secondarySize 26 + size 36 + secondarySize 30 interval 2.0 + offset 0 16 0 + attenuate 1 } object KeyBlue @@ -1862,9 +1953,11 @@ object KeyBlue pulselight HGREENKEY { color 0.0 1.0 0.0 - size 24 - secondarySize 26 + size 36 + secondarySize 39 interval 2.0 + offset 0 16 0 + attenuate 1 } object KeyGreen @@ -1880,35 +1973,40 @@ object KeyGreen pointlight HTFOG1 { color 0.4 0.4 1.0 - size 64 + size 96 + attenuate 1 } pointlight HTFOG2 { color 0.4 0.4 1.0 - size 40 + size 60 + attenuate 1 } pointlight HTFOG3 { color 0.4 0.4 1.0 - size 16 + size 24 + attenuate 1 } flickerlight HTFOG4 { color 0.5 0.5 1.0 - size 40 - secondarySize 48 + size 60 + secondarySize 72 chance 0.4 + attenuate 1 } flickerlight HTFOG5 { color 0.5 0.5 1.0 - size 56 - secondarySize 64 + size 88 + secondarySize 96 chance 0.4 + attenuate 1 } object TeleportFog From 5418021e465a2a70d78754795c54c31bc2ded912 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 4 Jan 2017 11:13:19 +0100 Subject: [PATCH 19/58] - fixed: Dehacked must flag all states it touched for use in weapons. --- src/d_dehacked.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index ed2310d45..7ac1213b5 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -238,6 +238,7 @@ TArray TouchedActors; char *UnchangedSpriteNames; int NumUnchangedSprites; +bool changedStates; // Sprite<->Class map for ADehackedPickup::DetermineType static struct DehSpriteMap @@ -988,6 +989,7 @@ static int PatchThing (int thingy) { statedef.MakeStateDefines(type); patchedStates = true; + changedStates = true; } if (!strnicmp (Line1, "Initial", 7)) @@ -1460,6 +1462,7 @@ static int PatchFrame (int frameNum) else if (keylen == 10 && stricmp (Line1, "Next frame") == 0) { info->NextState = FindState (val); + changedStates = true; } else if (keylen == 16 && stricmp (Line1, "Sprite subnumber") == 0) { @@ -3049,6 +3052,17 @@ void FinishDehPatch () DPrintf (DMSG_NOTIFY, "%s replaces %s\n", subclass->TypeName.GetChars(), type->TypeName.GetChars()); } + // To avoid errors, flag all potentially touched states for use in weapons. + if (changedStates) + { + for (auto &s : StateMap) + { + for (auto i = 0; i < s.StateSpan; i++) + { + s.State[i].UseFlags |= SUF_WEAPON; + } + } + } // Now that all Dehacked patches have been processed, it's okay to free StateMap. StateMap.Clear(); StateMap.ShrinkToFit(); From 8da48c86979785a40097131449e363e90c8b0409 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 4 Jan 2017 12:47:49 -0500 Subject: [PATCH 20/58] - Added Wadsmoosh detection. --- wadsrc/static/iwadinfo.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index d0fb1a157..2376a89f5 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -1,5 +1,17 @@ // Must be sorted in identification order (easiest to recognize first!) +IWad +{ + Name = "DOOM: Wadsmoosh" + Autoname = "doom.doom2.wadsmoosh" + Game = "Doom" + Config = "Doom" + Mapinfo = "mapinfo/doom2.txt" + Compatibility = "Shorttex" + MustContain = "MAP01", "WADSMUSH" + BannerColors = "a8 00 00", "a8 a8 a8" +} + IWad { Name = "Delaweare" @@ -369,6 +381,7 @@ IWad Names { + "doom_complete.pk3" "bfgdoom2.wad" "doom2bfg.wad" "doom2f.wad" From b5bc84feeaacca306b1302b7257f85d17bb33f22 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 4 Jan 2017 12:55:19 -0500 Subject: [PATCH 21/58] - Made WadSmoosh detection more flexible (since it doesn't necessarily require MAP01 to be present). --- wadsrc/static/iwadinfo.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index 2376a89f5..bb1c0fbb4 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -2,13 +2,13 @@ IWad { - Name = "DOOM: Wadsmoosh" + Name = "DOOM: Complete: WadSmoosh" Autoname = "doom.doom2.wadsmoosh" Game = "Doom" Config = "Doom" Mapinfo = "mapinfo/doom2.txt" Compatibility = "Shorttex" - MustContain = "MAP01", "WADSMUSH" + MustContain = "WADSMUSH" BannerColors = "a8 00 00", "a8 a8 a8" } From ddac3fa391d5c4920228ca025d4635dfe2bd1aac Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 4 Jan 2017 13:01:17 -0500 Subject: [PATCH 22/58] - Wildweasel pointed out that WadSmoosh generates a "SMOOSHED" lump. http://forum.zdoom.org/viewtopic.php?p=967226#p967226 --- wadsrc/static/iwadinfo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index bb1c0fbb4..0340da6fd 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -8,7 +8,7 @@ IWad Config = "Doom" Mapinfo = "mapinfo/doom2.txt" Compatibility = "Shorttex" - MustContain = "WADSMUSH" + MustContain = "SMOOSHED" BannerColors = "a8 00 00", "a8 a8 a8" } From 25b8370ae25c1074781f721c30f330d11fbad76f Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 4 Jan 2017 13:47:31 -0500 Subject: [PATCH 23/58] - Made WadSmoosh detection a lot stricter. --- wadsrc/static/iwadinfo.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index 0340da6fd..6746c6248 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -1,17 +1,5 @@ // Must be sorted in identification order (easiest to recognize first!) -IWad -{ - Name = "DOOM: Complete: WadSmoosh" - Autoname = "doom.doom2.wadsmoosh" - Game = "Doom" - Config = "Doom" - Mapinfo = "mapinfo/doom2.txt" - Compatibility = "Shorttex" - MustContain = "SMOOSHED" - BannerColors = "a8 00 00", "a8 a8 a8" -} - IWad { Name = "Delaweare" @@ -288,6 +276,18 @@ IWad BannerColors = "54 54 54", "a8 a8 a8" } +IWad +{ + Name = "DOOM: Complete: WadSmoosh" + Autoname = "doom.doom2.wadsmoosh" + Game = "Doom" + Config = "Doom" + Mapinfo = "mapinfo/doom2.txt" + Compatibility = "Shorttex" + MustContain = "SMOOSHED", "ANIMDEFS", "LANGUAGE", "MAPINFO", "ENDOOM", "M_DOOM", "TITLEPIC", "TEXTURES" + BannerColors = "a8 00 00", "a8 a8 a8" +} + IWad { Name = "The Ultimate DOOM" From 40cc7454249772047c60583e0d627f213425112c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 4 Jan 2017 23:55:24 +0100 Subject: [PATCH 24/58] - fixed: The default minimum and maximum distances for A_Teleport were swapped. --- wadsrc/static/zscript/actor.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 2ced709ae..1c8d3e446 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -726,7 +726,7 @@ class Actor : Thinker native native void A_Weave(int xspeed, int yspeed, double xdist, double ydist); - action native state, bool A_Teleport(statelabel teleportstate = null, class targettype = "BossSpot", class fogtype = "TeleportFog", int flags = 0, double mindist = 0, double maxdist = 128, int ptr = AAPTR_DEFAULT); + action native state, bool A_Teleport(statelabel teleportstate = null, class targettype = "BossSpot", class fogtype = "TeleportFog", int flags = 0, double mindist = 128, double maxdist = 0, int ptr = AAPTR_DEFAULT); action native state, bool A_Warp(int ptr_destination, double xofs = 0, double yofs = 0, double zofs = 0, double angle = 0, int flags = 0, statelabel success_state = null, double heightoffset = 0, double radiusoffset = 0, double pitch = 0); native void A_CountdownArg(int argnum, statelabel targstate = null); native state A_MonsterRefire(int chance, statelabel label); From 303a1923493c132e42d91c4d7dc51e4830da1589 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Jan 2017 11:28:08 +0100 Subject: [PATCH 25/58] - fixed: portal offsets at frame start were not applied to ViewActorPos. --- src/r_utility.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/r_utility.cpp b/src/r_utility.cpp index 0ac3d9cde..5e9ac6b52 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -491,6 +491,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie if (ViewPos.Z > viewsector->GetPortalPlaneZ(sector_t::ceiling)) { ViewPos += viewsector->GetPortalDisplacement(sector_t::ceiling); + ViewActorPos += viewsector->GetPortalDisplacement(sector_t::ceiling); viewsector = R_PointInSubsector(ViewPos)->sector; moved = true; } @@ -503,6 +504,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie if (ViewPos.Z < viewsector->GetPortalPlaneZ(sector_t::floor)) { ViewPos += viewsector->GetPortalDisplacement(sector_t::floor); + ViewActorPos += viewsector->GetPortalDisplacement(sector_t::floor); viewsector = R_PointInSubsector(ViewPos)->sector; moved = true; } From aa356fcd00e7ee05ff0c07df1fd937b261d700b2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Jan 2017 11:39:29 +0100 Subject: [PATCH 26/58] - fixed: The CheckReturn check for FxSwitchStatement was not strict enough. It may only return true if there is no default case because without that any non-matching value will go past the statement. --- src/scripting/codegeneration/codegen.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 60a259b1b..e40daa6ab 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -8830,15 +8830,20 @@ ExpEmit FxSwitchStatement::Emit(VMFunctionBuilder *build) bool FxSwitchStatement::CheckReturn() { - //A switch statement returns when it contains no breaks and ends with a return + bool founddefault = false; + //A switch statement returns when it contains a no breaks, a default case, and ends with a return for (auto line : Content) { if (line->ExprType == EFX_JumpStatement) { return false; // Break means that the end of the statement will be reached, Continue cannot happen in the last statement of the last block. } + else if (line->ExprType == EFX_CaseStatement) + { + if (static_cast(line)->Condition == nullptr) founddefault = true; + } } - return Content.Size() > 0 && Content.Last()->CheckReturn(); + return founddefault && Content.Size() > 0 && Content.Last()->CheckReturn(); } //========================================================================== From 50af195e450cd88ee5fbbf70b89d3c271e192d42 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Jan 2017 11:50:45 +0100 Subject: [PATCH 27/58] - fixed check for Mesa driver. --- src/gl/system/gl_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index f1babfb7f..086c2c365 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -167,8 +167,8 @@ void gl_LoadExtensions() gl.flags |= RFL_SAMPLER_OBJECTS; } - // The minimum requirement for the modern render path are GL 3.0 + uniform buffers - if (gl_version < 3.0f || (gl_version < 3.1f && !CheckExtension("GL_ARB_uniform_buffer_object") && strstr(gl.vendorstring, "X.Org") == nullptr)) + // The minimum requirement for the modern render path are GL 3.0 + uniform buffers. Also exclude the Linux Mesa driver at GL 3.0 because it errors out on shader compilation. + if (gl_version < 3.0f || (gl_version < 3.1f && (!CheckExtension("GL_ARB_uniform_buffer_object") || strstr(gl.vendorstring, "X.Org") != nullptr))) { gl.legacyMode = true; gl.lightmethod = LM_LEGACY; From b865e9ce02edc2b649762285251a8f99b20ca63d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Jan 2017 12:01:00 +0100 Subject: [PATCH 28/58] - only print GL extensions to the log, but not to the console. The list has become so long by now that it's more of a distraction than help. Besides, searching on-screen for specific extensions is futile anyway. --- src/gl/system/gl_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index 086c2c365..7f98c7f3c 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -294,10 +294,10 @@ void gl_PrintStartupLog() Printf ("GL_RENDERER: %s\n", glGetString(GL_RENDERER)); Printf ("GL_VERSION: %s (%s profile)\n", glGetString(GL_VERSION), (v & GL_CONTEXT_CORE_PROFILE_BIT)? "Core" : "Compatibility"); Printf ("GL_SHADING_LANGUAGE_VERSION: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); - Printf ("GL_EXTENSIONS:"); + Printf (PRINT_LOG, "GL_EXTENSIONS:"); for (unsigned i = 0; i < m_Extensions.Size(); i++) { - Printf(" %s", m_Extensions[i].GetChars()); + Printf(PRINT_LOG, " %s", m_Extensions[i].GetChars()); } glGetIntegerv(GL_MAX_TEXTURE_SIZE, &v); From 9aa49a91997021c2c6e910c32b5e2ac152ce9832 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 10:33:58 +0100 Subject: [PATCH 29/58] - fixed uninitialized variable warning in codegen.cpp --- src/scripting/codegeneration/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index e40daa6ab..d03f5b074 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -3980,7 +3980,7 @@ ExpEmit FxConcat::Emit(VMFunctionBuilder *build) } else { - int cast; + int cast = 0; strng = ExpEmit(build, REGT_STRING); if (op1.Konst) { From 3dcbbcb514c06965f072eb51d3dcdeb3d097eb9b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 5 Jan 2017 15:48:23 +0200 Subject: [PATCH 30/58] Added virtual destructor to FPresentShaderBase class No more 'delete called on non-final class that has virtual functions but non-virtual destructor' warnings reported by GCC/Clang --- src/gl/shaders/gl_presentshader.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gl/shaders/gl_presentshader.h b/src/gl/shaders/gl_presentshader.h index 6f9e1bfd7..dcf42cdf8 100644 --- a/src/gl/shaders/gl_presentshader.h +++ b/src/gl/shaders/gl_presentshader.h @@ -6,6 +6,7 @@ class FPresentShaderBase { public: + virtual ~FPresentShaderBase() {} virtual void Bind() = 0; FBufferedUniform1f InvGamma; @@ -26,4 +27,4 @@ public: FBufferedUniformSampler InputTexture; }; -#endif \ No newline at end of file +#endif From 7af6bb4da0472a69202637969d3744d6623296bb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 11:56:17 +0100 Subject: [PATCH 31/58] - renamed a few variables for clarity. --- src/actor.h | 4 ++-- src/gl/scene/gl_bsp.cpp | 2 +- src/gl/scene/gl_sprite.cpp | 2 +- src/p_map.cpp | 24 ++++++++++++------------ src/p_sectors.cpp | 2 +- src/p_setup.cpp | 2 +- src/p_udmf.cpp | 2 +- src/portal.h | 2 +- src/r_defs.h | 2 +- wadsrc/static/zscript/base.txt | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/actor.h b/src/actor.h index 5445c92be..ffe3cc1a4 100644 --- a/src/actor.h +++ b/src/actor.h @@ -1148,8 +1148,8 @@ public: // a linked list of sectors where this object appears struct msecnode_t *touching_sectorlist; // phares 3/14/98 - struct msecnode_t *render_sectorlist; // same for cross-sectorportal rendering - struct portnode_t *render_portallist; // and for cross-lineportal + struct msecnode_t *touching_sectorportallist; // same for cross-sectorportal rendering + struct portnode_t *touching_lineportallist; // and for cross-lineportal struct msecnode_t *touching_rendersectors; // this is the list of sectors that this thing interesects with it's max(radius, renderradius). int validcount; diff --git a/src/gl/scene/gl_bsp.cpp b/src/gl/scene/gl_bsp.cpp index 9e5ea258d..d646daa53 100644 --- a/src/gl/scene/gl_bsp.cpp +++ b/src/gl/scene/gl_bsp.cpp @@ -383,7 +383,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector) GLRenderer->ProcessSprite(thing, sector, false); } - for (msecnode_t *node = sec->render_thinglist; node; node = node->m_snext) + for (msecnode_t *node = sec->sectorportal_thinglist; node; node = node->m_snext) { AActor *thing = node->m_thing; FIntCVar *cvar = thing->GetClass()->distancecheck; diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 102337ecc..7ed4199a1 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -1189,7 +1189,7 @@ void gl_RenderActorsInPortal(FGLLinePortal *glport) if (port2 != nullptr && port->mDestination == port2->mOrigin && port->mOrigin == port2->mDestination) { - for (portnode_t *node = port->render_thinglist; node != nullptr; node = node->m_snext) + for (portnode_t *node = port->lineportal_thinglist; node != nullptr; node = node->m_snext) { AActor *th = node->m_thing; diff --git a/src/p_map.cpp b/src/p_map.cpp index 434db69f1..f67c02fcc 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -6734,7 +6734,7 @@ portnode_t *P_DelPortalnode(portnode_t *node) if (sp) sp->m_snext = sn; else - node->m_portal->render_thinglist = sn; + node->m_portal->lineportal_thinglist = sn; if (sn) sn->m_sprev = sp; @@ -6776,10 +6776,10 @@ portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) // Add new node at head of portal thread starting at s->touching_thinglist node->m_sprev = NULL; // prev node on portal thread - node->m_snext = s->render_thinglist; // next node on portal thread - if (s->render_thinglist) + node->m_snext = s->lineportal_thinglist; // next node on portal thread + if (s->lineportal_thinglist) node->m_snext->m_sprev = node; - s->render_thinglist = node; + s->lineportal_thinglist = node; return node; } @@ -6811,7 +6811,7 @@ void AActor::UpdateRenderSectorList() if (p.mType == PORTT_VISUAL) continue; if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin)) { - render_portallist = P_AddPortalnode(&p, this, render_portallist); + touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist); } } } @@ -6827,7 +6827,7 @@ void AActor::UpdateRenderSectorList() lasth = planeh; DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling); sec = P_PointInSector(newpos); - render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); } sec = Sector; lasth = FLT_MAX; @@ -6839,25 +6839,25 @@ void AActor::UpdateRenderSectorList() lasth = planeh; DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor); sec = P_PointInSector(newpos); - render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); } } } void AActor::ClearRenderSectorList() { - msecnode_t *node = render_sectorlist; + msecnode_t *node = touching_sectorportallist; while (node) - node = P_DelSecnode(node, §or_t::render_thinglist); - render_sectorlist = NULL; + node = P_DelSecnode(node, §or_t::sectorportal_thinglist); + touching_sectorportallist = NULL; } void AActor::ClearRenderLineList() { - portnode_t *node = render_portallist; + portnode_t *node = touching_lineportallist; while (node) node = P_DelPortalnode(node); - render_portallist = NULL; + touching_lineportallist = NULL; } diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index 22ef88358..628b28ea6 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -1384,7 +1384,7 @@ DEFINE_FIELD_X(Sector, sector_t, bottommap) DEFINE_FIELD_X(Sector, sector_t, midmap) DEFINE_FIELD_X(Sector, sector_t, topmap) DEFINE_FIELD_X(Sector, sector_t, touching_thinglist) -DEFINE_FIELD_X(Sector, sector_t, render_thinglist) +DEFINE_FIELD_X(Sector, sector_t, sectorportal_thinglist) DEFINE_FIELD_X(Sector, sector_t, gravity) DEFINE_FIELD_X(Sector, sector_t, damagetype) DEFINE_FIELD_X(Sector, sector_t, damageamount) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 43d1833af..63cc7d4d6 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1511,7 +1511,7 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex) tagManager.AddSectorTag(i, LittleShort(ms->tag)); ss->thinglist = nullptr; ss->touching_thinglist = nullptr; // phares 3/14/98 - ss->render_thinglist = nullptr; + ss->sectorportal_thinglist = nullptr; ss->touching_renderthings = nullptr; ss->seqType = defSeqType; ss->SeqName = NAME_None; diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 51bd780f5..1e4e0e3f4 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1297,7 +1297,7 @@ public: sec->SetAlpha(sector_t::ceiling, 1.); sec->thinglist = nullptr; sec->touching_thinglist = nullptr; // phares 3/14/98 - sec->render_thinglist = nullptr; + sec->sectorportal_thinglist = nullptr; sec->touching_renderthings = nullptr; sec->seqType = (level.flags & LEVEL_SNDSEQTOTALCTRL) ? 0 : -1; sec->nextsec = -1; //jff 2/26/98 add fields to support locking out diff --git a/src/portal.h b/src/portal.h index 44d636e4b..f5c8f8c88 100644 --- a/src/portal.h +++ b/src/portal.h @@ -191,7 +191,7 @@ struct FLinePortal DAngle mAngleDiff; double mSinRot; double mCosRot; - portnode_t *render_thinglist; + portnode_t *lineportal_thinglist; }; extern TArray linePortals; diff --git a/src/r_defs.h b/src/r_defs.h index ceef67435..67c9c8089 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -1050,7 +1050,7 @@ public: // list of mobjs that are at least partially in the sector // thinglist is a subset of touching_thinglist struct msecnode_t *touching_thinglist; // phares 3/14/98 - struct msecnode_t *render_thinglist; // for cross-portal rendering. + struct msecnode_t *sectorportal_thinglist; // for cross-portal rendering. struct msecnode_t *touching_renderthings; // this is used to allow wide things to be rendered not only from their main sector. double gravity; // [RH] Sector gravity (1.0 is normal) diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 10e13cf50..05843f7d1 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -281,7 +281,7 @@ struct Sector native native uint bottommap, midmap, topmap; //struct msecnode_t *touching_thinglist; - //struct msecnode_t *render_thinglist; + //struct msecnode_t *sectorportal_thinglist; native double gravity; native Name damagetype; From 09419524f7695aca1fe81bedbddac6e81166d3e2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 12:54:01 +0100 Subject: [PATCH 32/58] - moved the msecnode code to its own file. Note that this originates from Boom so it needs to keep the Doom license. --- src/CMakeLists.txt | 1 + src/p_blockmap.h | 7 + src/p_local.h | 4 - src/p_map.cpp | 407 ------------------------------------------ src/p_secnodes.cpp | 434 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 442 insertions(+), 411 deletions(-) create mode 100644 src/p_secnodes.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 64e865a21..5d5d52c0f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1106,6 +1106,7 @@ set (PCH_SOURCES p_pusher.cpp p_saveg.cpp p_scroll.cpp + p_secnodes.cpp p_sectors.cpp p_setup.cpp p_sight.cpp diff --git a/src/p_blockmap.h b/src/p_blockmap.h index b2cee1bdd..e6474b4ea 100644 --- a/src/p_blockmap.h +++ b/src/p_blockmap.h @@ -31,6 +31,13 @@ extern double bmaporgx; extern double bmaporgy; // origin of block map extern FBlockNode** blocklinks; // for thing chains + // mapblocks are used to check movement + // against lines and things +enum +{ + MAPBLOCKUNITS = 128 +}; + inline int GetBlockX(double xpos) { return int((xpos - bmaporgx) / MAPBLOCKUNITS); diff --git a/src/p_local.h b/src/p_local.h index c66792549..93875df2f 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -48,10 +48,6 @@ struct FTranslatedLineTarget; #define BONUSADD 6 -// mapblocks are used to check movement -// against lines and things -#define MAPBLOCKUNITS 128 - // Inspired by Maes extern int bmapnegx; extern int bmapnegy; diff --git a/src/p_map.cpp b/src/p_map.cpp index f67c02fcc..58e18ebec 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -6454,413 +6454,6 @@ bool P_ChangeSector(sector_t *sector, int crunch, double amt, int floorOrCeil, b return cpos.nofit; } -//============================================================================= -// phares 3/21/98 -// -// Maintain a freelist of msecnode_t's to reduce memory allocs and frees. -//============================================================================= - -msecnode_t *headsecnode = NULL; - -//============================================================================= -// -// P_GetSecnode -// -// Retrieve a node from the freelist. The calling routine -// should make sure it sets all fields properly. -// -//============================================================================= - -msecnode_t *P_GetSecnode() -{ - msecnode_t *node; - - if (headsecnode) - { - node = headsecnode; - headsecnode = headsecnode->m_snext; - } - else - { - node = (msecnode_t *)M_Malloc(sizeof(*node)); - } - return node; -} - -//============================================================================= -// -// P_PutSecnode -// -// Returns a node to the freelist. -// -//============================================================================= - -void P_PutSecnode(msecnode_t *node) -{ - node->m_snext = headsecnode; - headsecnode = node; -} - -//============================================================================= -// phares 3/16/98 -// -// P_AddSecnode -// -// Searches the current list to see if this sector is -// already there. If not, it adds a sector node at the head of the list of -// sectors this object appears in. This is called when creating a list of -// nodes that will get linked in later. Returns a pointer to the new node. -// -//============================================================================= - -msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecnode_t *&sec_thinglist) -{ - msecnode_t *node; - - if (s == 0) - { - I_FatalError("AddSecnode of 0 for %s\n", thing->GetClass()->TypeName.GetChars()); - } - - node = nextnode; - while (node) - { - if (node->m_sector == s) // Already have a node for this sector? - { - node->m_thing = thing; // Yes. Setting m_thing says 'keep it'. - return nextnode; - } - node = node->m_tnext; - } - - // Couldn't find an existing node for this sector. Add one at the head - // of the list. - - node = P_GetSecnode(); - - // killough 4/4/98, 4/7/98: mark new nodes unvisited. - node->visited = 0; - - node->m_sector = s; // sector - node->m_thing = thing; // mobj - node->m_tprev = NULL; // prev node on Thing thread - node->m_tnext = nextnode; // next node on Thing thread - if (nextnode) - nextnode->m_tprev = node; // set back link on Thing - - // Add new node at head of sector thread starting at s->touching_thinglist - - node->m_sprev = NULL; // prev node on sector thread - node->m_snext = sec_thinglist; // next node on sector thread - if (sec_thinglist) - node->m_snext->m_sprev = node; - sec_thinglist = node; - return node; -} - -//============================================================================= -// -// P_DelSecnode -// -// Deletes a sector node from the list of -// sectors this object appears in. Returns a pointer to the next node -// on the linked list, or NULL. -// -//============================================================================= - -msecnode_t *P_DelSecnode(msecnode_t *node, msecnode_t *sector_t::*listhead) -{ - msecnode_t* tp; // prev node on thing thread - msecnode_t* tn; // next node on thing thread - msecnode_t* sp; // prev node on sector thread - msecnode_t* sn; // next node on sector thread - - if (node) - { - // Unlink from the Thing thread. The Thing thread begins at - // sector_list and not from AActor->touching_sectorlist. - - tp = node->m_tprev; - tn = node->m_tnext; - if (tp) - tp->m_tnext = tn; - if (tn) - tn->m_tprev = tp; - - // Unlink from the sector thread. This thread begins at - // sector_t->touching_thinglist. - - sp = node->m_sprev; - sn = node->m_snext; - if (sp) - sp->m_snext = sn; - else - node->m_sector->*listhead = sn; - if (sn) - sn->m_sprev = sp; - - // Return this node to the freelist - - P_PutSecnode(node); - return tn; - } - return NULL; -} // phares 3/13/98 - -//============================================================================= -// -// P_DelSeclist -// -// Delete an entire sector list -// -//============================================================================= - -void P_DelSeclist(msecnode_t *node, msecnode_t *sector_t::*sechead) -{ - while (node) - node = P_DelSecnode(node, sechead); -} - -//============================================================================= -// phares 3/14/98 -// -// P_CreateSecNodeList -// -// Alters/creates the sector_list that shows what sectors the object resides in -// -//============================================================================= - -msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector_list, msecnode_t *sector_t::*seclisthead) -{ - msecnode_t *node; - - // First, clear out the existing m_thing fields. As each node is - // added or verified as needed, m_thing will be set properly. When - // finished, delete all nodes where m_thing is still NULL. These - // represent the sectors the Thing has vacated. - - node = sector_list; - while (node) - { - node->m_thing = NULL; - node = node->m_tnext; - } - - FBoundingBox box(thing->X(), thing->Y(), radius); - FBlockLinesIterator it(box); - line_t *ld; - - while ((ld = it.Next())) - { - if (!box.inRange(ld) || box.BoxOnLineSide(ld) != -1) - continue; - - // This line crosses through the object. - - // Collect the sector(s) from the line and add to the - // sector_list you're examining. If the Thing ends up being - // allowed to move to this position, then the sector_list - // will be attached to the Thing's AActor at touching_sectorlist. - - sector_list = P_AddSecnode(ld->frontsector, thing, sector_list, ld->frontsector->*seclisthead); - - // Don't assume all lines are 2-sided, since some Things - // like MT_TFOG are allowed regardless of whether their radius takes - // them beyond an impassable linedef. - - // killough 3/27/98, 4/4/98: - // Use sidedefs instead of 2s flag to determine two-sidedness. - - if (ld->backsector) - sector_list = P_AddSecnode(ld->backsector, thing, sector_list, ld->backsector->*seclisthead); - } - - // Add the sector of the (x,y) point to sector_list. - - sector_list = P_AddSecnode(thing->Sector, thing, sector_list, thing->Sector->*seclisthead); - - // Now delete any nodes that won't be used. These are the ones where - // m_thing is still NULL. - - node = sector_list; - while (node) - { - if (node->m_thing == NULL) - { - if (node == sector_list) - sector_list = node->m_tnext; - node = P_DelSecnode(node, seclisthead); - } - else - { - node = node->m_tnext; - } - } - return sector_list; -} - -//============================================================================= -// -// P_DelPortalnode -// -// Same for line portal nodes -// -//============================================================================= - -portnode_t *P_DelPortalnode(portnode_t *node) -{ - portnode_t* tp; // prev node on thing thread - portnode_t* tn; // next node on thing thread - portnode_t* sp; // prev node on sector thread - portnode_t* sn; // next node on sector thread - - if (node) - { - // Unlink from the Thing thread. The Thing thread begins at - // sector_list and not from AActor->touching_sectorlist. - - tp = node->m_tprev; - tn = node->m_tnext; - if (tp) - tp->m_tnext = tn; - if (tn) - tn->m_tprev = tp; - - // Unlink from the sector thread. This thread begins at - // sector_t->touching_thinglist. - - sp = node->m_sprev; - sn = node->m_snext; - if (sp) - sp->m_snext = sn; - else - node->m_portal->lineportal_thinglist = sn; - if (sn) - sn->m_sprev = sp; - - // Return this node to the freelist (use the same one as for msecnodes, since both types are the same size.) - P_PutSecnode(reinterpret_cast(node)); - return tn; - } - return NULL; -} - - -//============================================================================= -// -// P_AddPortalnode -// -//============================================================================= - -portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) -{ - portnode_t *node; - - if (s == 0) - { - I_FatalError("AddSecnode of 0 for %s\n", thing->GetClass()->TypeName.GetChars()); - } - - node = reinterpret_cast(P_GetSecnode()); - - // killough 4/4/98, 4/7/98: mark new nodes unvisited. - node->visited = 0; - - node->m_portal = s; // portal - node->m_thing = thing; // mobj - node->m_tprev = NULL; // prev node on Thing thread - node->m_tnext = nextnode; // next node on Thing thread - if (nextnode) - nextnode->m_tprev = node; // set back link on Thing - - // Add new node at head of portal thread starting at s->touching_thinglist - - node->m_sprev = NULL; // prev node on portal thread - node->m_snext = s->lineportal_thinglist; // next node on portal thread - if (s->lineportal_thinglist) - node->m_snext->m_sprev = node; - s->lineportal_thinglist = node; - return node; -} - - -//========================================================================== -// -// Handle the lists used to render actors from other portal areas -// -//========================================================================== - -void AActor::UpdateRenderSectorList() -{ - static const double SPRITE_SPACE = 64.; - if (Pos() != OldRenderPos && !(flags & MF_NOSECTOR)) - { - // Only check if the map contains line portals - ClearRenderLineList(); - if (PortalBlockmap.containsLines && Pos().XY() != OldRenderPos.XY()) - { - int bx = GetBlockX(X()); - int by = GetBlockY(Y()); - FBoundingBox bb(X(), Y(), MIN(radius*1.5, 128.)); // Don't go further than 128 map units, even for large actors - // Are there any portals near the actor's position? - if (bx >= 0 && by >= 0 && bx < bmapwidth && by < bmapheight && PortalBlockmap(bx, by).neighborContainsLines) - { - // Go through the entire list. In most cases this is faster than setting up a blockmap iterator - for (auto &p : linePortals) - { - if (p.mType == PORTT_VISUAL) continue; - if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin)) - { - touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist); - } - } - } - } - sector_t *sec = Sector; - double lasth = -FLT_MAX; - ClearRenderSectorList(); - while (!sec->PortalBlocksMovement(sector_t::ceiling)) - { - double planeh = sec->GetPortalPlaneZ(sector_t::ceiling); - if (planeh <= lasth) break; // broken setup. - if (Top() + SPRITE_SPACE < planeh) break; - lasth = planeh; - DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling); - sec = P_PointInSector(newpos); - touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); - } - sec = Sector; - lasth = FLT_MAX; - while (!sec->PortalBlocksMovement(sector_t::floor)) - { - double planeh = sec->GetPortalPlaneZ(sector_t::floor); - if (planeh >= lasth) break; // broken setup. - if (Z() - SPRITE_SPACE > planeh) break; - lasth = planeh; - DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor); - sec = P_PointInSector(newpos); - touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); - } - } -} - -void AActor::ClearRenderSectorList() -{ - msecnode_t *node = touching_sectorportallist; - while (node) - node = P_DelSecnode(node, §or_t::sectorportal_thinglist); - touching_sectorportallist = NULL; -} - -void AActor::ClearRenderLineList() -{ - portnode_t *node = touching_lineportallist; - while (node) - node = P_DelPortalnode(node); - touching_lineportallist = NULL; -} - - //========================================================================== // // diff --git a/src/p_secnodes.cpp b/src/p_secnodes.cpp new file mode 100644 index 000000000..14d354a7f --- /dev/null +++ b/src/p_secnodes.cpp @@ -0,0 +1,434 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// $Id:$ +// +// Copyright (C) 1998-1996 by id Software, Inc. +// +// This source is available for distribution and/or modification +// only under the terms of the DOOM Source Code License as +// published by id Software. All rights reserved. +// +// The source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License +// for more details. +// +// $Log:$ +// +// DESCRIPTION: +// Boom secnodes +// +//----------------------------------------------------------------------------- + +#include "r_state.h" +#include "p_maputl.h" +#include "p_blockmap.h" + +//============================================================================= +// phares 3/21/98 +// +// Maintain a freelist of msecnode_t's to reduce memory allocs and frees. +//============================================================================= + +msecnode_t *headsecnode = NULL; + +//============================================================================= +// +// P_GetSecnode +// +// Retrieve a node from the freelist. The calling routine +// should make sure it sets all fields properly. +// +//============================================================================= + +msecnode_t *P_GetSecnode() +{ + msecnode_t *node; + + if (headsecnode) + { + node = headsecnode; + headsecnode = headsecnode->m_snext; + } + else + { + node = (msecnode_t *)M_Malloc(sizeof(*node)); + } + return node; +} + +//============================================================================= +// +// P_PutSecnode +// +// Returns a node to the freelist. +// +//============================================================================= + +void P_PutSecnode(msecnode_t *node) +{ + node->m_snext = headsecnode; + headsecnode = node; +} + +//============================================================================= +// phares 3/16/98 +// +// P_AddSecnode +// +// Searches the current list to see if this sector is +// already there. If not, it adds a sector node at the head of the list of +// sectors this object appears in. This is called when creating a list of +// nodes that will get linked in later. Returns a pointer to the new node. +// +//============================================================================= + +msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecnode_t *&sec_thinglist) +{ + msecnode_t *node; + + if (s == 0) + { + I_FatalError("AddSecnode of 0 for %s\n", thing->GetClass()->TypeName.GetChars()); + } + + node = nextnode; + while (node) + { + if (node->m_sector == s) // Already have a node for this sector? + { + node->m_thing = thing; // Yes. Setting m_thing says 'keep it'. + return nextnode; + } + node = node->m_tnext; + } + + // Couldn't find an existing node for this sector. Add one at the head + // of the list. + + node = P_GetSecnode(); + + // killough 4/4/98, 4/7/98: mark new nodes unvisited. + node->visited = 0; + + node->m_sector = s; // sector + node->m_thing = thing; // mobj + node->m_tprev = NULL; // prev node on Thing thread + node->m_tnext = nextnode; // next node on Thing thread + if (nextnode) + nextnode->m_tprev = node; // set back link on Thing + + // Add new node at head of sector thread starting at s->touching_thinglist + + node->m_sprev = NULL; // prev node on sector thread + node->m_snext = sec_thinglist; // next node on sector thread + if (sec_thinglist) + node->m_snext->m_sprev = node; + sec_thinglist = node; + return node; +} + +//============================================================================= +// +// P_DelSecnode +// +// Deletes a sector node from the list of +// sectors this object appears in. Returns a pointer to the next node +// on the linked list, or NULL. +// +//============================================================================= + +msecnode_t *P_DelSecnode(msecnode_t *node, msecnode_t *sector_t::*listhead) +{ + msecnode_t* tp; // prev node on thing thread + msecnode_t* tn; // next node on thing thread + msecnode_t* sp; // prev node on sector thread + msecnode_t* sn; // next node on sector thread + + if (node) + { + // Unlink from the Thing thread. The Thing thread begins at + // sector_list and not from AActor->touching_sectorlist. + + tp = node->m_tprev; + tn = node->m_tnext; + if (tp) + tp->m_tnext = tn; + if (tn) + tn->m_tprev = tp; + + // Unlink from the sector thread. This thread begins at + // sector_t->touching_thinglist. + + sp = node->m_sprev; + sn = node->m_snext; + if (sp) + sp->m_snext = sn; + else + node->m_sector->*listhead = sn; + if (sn) + sn->m_sprev = sp; + + // Return this node to the freelist + + P_PutSecnode(node); + return tn; + } + return NULL; +} // phares 3/13/98 + +//============================================================================= +// +// P_DelSeclist +// +// Delete an entire sector list +// +//============================================================================= + +void P_DelSeclist(msecnode_t *node, msecnode_t *sector_t::*sechead) +{ + while (node) + node = P_DelSecnode(node, sechead); +} + +//============================================================================= +// phares 3/14/98 +// +// P_CreateSecNodeList +// +// Alters/creates the sector_list that shows what sectors the object resides in +// +//============================================================================= + +msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector_list, msecnode_t *sector_t::*seclisthead) +{ + msecnode_t *node; + + // First, clear out the existing m_thing fields. As each node is + // added or verified as needed, m_thing will be set properly. When + // finished, delete all nodes where m_thing is still NULL. These + // represent the sectors the Thing has vacated. + + node = sector_list; + while (node) + { + node->m_thing = NULL; + node = node->m_tnext; + } + + FBoundingBox box(thing->X(), thing->Y(), radius); + FBlockLinesIterator it(box); + line_t *ld; + + while ((ld = it.Next())) + { + if (!box.inRange(ld) || box.BoxOnLineSide(ld) != -1) + continue; + + // This line crosses through the object. + + // Collect the sector(s) from the line and add to the + // sector_list you're examining. If the Thing ends up being + // allowed to move to this position, then the sector_list + // will be attached to the Thing's AActor at touching_sectorlist. + + sector_list = P_AddSecnode(ld->frontsector, thing, sector_list, ld->frontsector->*seclisthead); + + // Don't assume all lines are 2-sided, since some Things + // like MT_TFOG are allowed regardless of whether their radius takes + // them beyond an impassable linedef. + + // killough 3/27/98, 4/4/98: + // Use sidedefs instead of 2s flag to determine two-sidedness. + + if (ld->backsector) + sector_list = P_AddSecnode(ld->backsector, thing, sector_list, ld->backsector->*seclisthead); + } + + // Add the sector of the (x,y) point to sector_list. + + sector_list = P_AddSecnode(thing->Sector, thing, sector_list, thing->Sector->*seclisthead); + + // Now delete any nodes that won't be used. These are the ones where + // m_thing is still NULL. + + node = sector_list; + while (node) + { + if (node->m_thing == NULL) + { + if (node == sector_list) + sector_list = node->m_tnext; + node = P_DelSecnode(node, seclisthead); + } + else + { + node = node->m_tnext; + } + } + return sector_list; +} + +//============================================================================= +// +// P_DelPortalnode +// +// Same for line portal nodes +// +//============================================================================= + +portnode_t *P_DelPortalnode(portnode_t *node) +{ + portnode_t* tp; // prev node on thing thread + portnode_t* tn; // next node on thing thread + portnode_t* sp; // prev node on sector thread + portnode_t* sn; // next node on sector thread + + if (node) + { + // Unlink from the Thing thread. The Thing thread begins at + // sector_list and not from AActor->touching_sectorlist. + + tp = node->m_tprev; + tn = node->m_tnext; + if (tp) + tp->m_tnext = tn; + if (tn) + tn->m_tprev = tp; + + // Unlink from the sector thread. This thread begins at + // sector_t->touching_thinglist. + + sp = node->m_sprev; + sn = node->m_snext; + if (sp) + sp->m_snext = sn; + else + node->m_portal->lineportal_thinglist = sn; + if (sn) + sn->m_sprev = sp; + + // Return this node to the freelist (use the same one as for msecnodes, since both types are the same size.) + P_PutSecnode(reinterpret_cast(node)); + return tn; + } + return NULL; +} + + +//============================================================================= +// +// P_AddPortalnode +// +//============================================================================= + +portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) +{ + portnode_t *node; + + if (s == 0) + { + I_FatalError("AddSecnode of 0 for %s\n", thing->GetClass()->TypeName.GetChars()); + } + + node = reinterpret_cast(P_GetSecnode()); + + // killough 4/4/98, 4/7/98: mark new nodes unvisited. + node->visited = 0; + + node->m_portal = s; // portal + node->m_thing = thing; // mobj + node->m_tprev = NULL; // prev node on Thing thread + node->m_tnext = nextnode; // next node on Thing thread + if (nextnode) + nextnode->m_tprev = node; // set back link on Thing + + // Add new node at head of portal thread starting at s->touching_thinglist + + node->m_sprev = NULL; // prev node on portal thread + node->m_snext = s->lineportal_thinglist; // next node on portal thread + if (s->lineportal_thinglist) + node->m_snext->m_sprev = node; + s->lineportal_thinglist = node; + return node; +} + + +//========================================================================== +// +// Handle the lists used to render actors from other portal areas +// +//========================================================================== + +void AActor::UpdateRenderSectorList() +{ + static const double SPRITE_SPACE = 64.; + if (Pos() != OldRenderPos && !(flags & MF_NOSECTOR)) + { + // Only check if the map contains line portals + ClearRenderLineList(); + if (PortalBlockmap.containsLines && Pos().XY() != OldRenderPos.XY()) + { + int bx = GetBlockX(X()); + int by = GetBlockY(Y()); + FBoundingBox bb(X(), Y(), MIN(radius*1.5, 128.)); // Don't go further than 128 map units, even for large actors + // Are there any portals near the actor's position? + if (bx >= 0 && by >= 0 && bx < bmapwidth && by < bmapheight && PortalBlockmap(bx, by).neighborContainsLines) + { + // Go through the entire list. In most cases this is faster than setting up a blockmap iterator + for (auto &p : linePortals) + { + if (p.mType == PORTT_VISUAL) continue; + if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin)) + { + touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist); + } + } + } + } + sector_t *sec = Sector; + double lasth = -FLT_MAX; + ClearRenderSectorList(); + while (!sec->PortalBlocksMovement(sector_t::ceiling)) + { + double planeh = sec->GetPortalPlaneZ(sector_t::ceiling); + if (planeh <= lasth) break; // broken setup. + if (Top() + SPRITE_SPACE < planeh) break; + lasth = planeh; + DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling); + sec = P_PointInSector(newpos); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); + } + sec = Sector; + lasth = FLT_MAX; + while (!sec->PortalBlocksMovement(sector_t::floor)) + { + double planeh = sec->GetPortalPlaneZ(sector_t::floor); + if (planeh >= lasth) break; // broken setup. + if (Z() - SPRITE_SPACE > planeh) break; + lasth = planeh; + DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor); + sec = P_PointInSector(newpos); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); + } + } +} + +void AActor::ClearRenderSectorList() +{ + msecnode_t *node = touching_sectorportallist; + while (node) + node = P_DelSecnode(node, §or_t::sectorportal_thinglist); + touching_sectorportallist = NULL; +} + +void AActor::ClearRenderLineList() +{ + portnode_t *node = touching_lineportallist; + while (node) + node = P_DelPortalnode(node); + touching_lineportallist = NULL; +} + + From 6c1fcdc34bcd14ee42139ed808894a27e3b00168 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 13:09:58 +0100 Subject: [PATCH 33/58] - use a memory arena to allocate msecnodes. These are rather small and extremely frequently allocated, so they are prime candidates for memory arena, because it not only avoids fragmentation and internal overhead due to mass allocation of small memory blocks but it also makes it a lot faster to free the memory when finishing a level. --- src/p_secnodes.cpp | 5 ++++- src/p_setup.cpp | 15 ++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/p_secnodes.cpp b/src/p_secnodes.cpp index 14d354a7f..38a9a5bab 100644 --- a/src/p_secnodes.cpp +++ b/src/p_secnodes.cpp @@ -24,6 +24,7 @@ #include "r_state.h" #include "p_maputl.h" #include "p_blockmap.h" +#include "memarena.h" //============================================================================= // phares 3/21/98 @@ -32,6 +33,7 @@ //============================================================================= msecnode_t *headsecnode = NULL; +FMemArena secnodearena; //============================================================================= // @@ -53,7 +55,8 @@ msecnode_t *P_GetSecnode() } else { - node = (msecnode_t *)M_Malloc(sizeof(*node)); + node = + node = (msecnode_t *)secnodearena.Alloc(sizeof(*node)); } return node; } diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 63cc7d4d6..7a026e172 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3557,6 +3557,7 @@ void P_FreeLevelData () P_ClearUDMFKeys(); } +extern FMemArena secnodearena; extern msecnode_t *headsecnode; void P_FreeExtraLevelData() @@ -3574,19 +3575,11 @@ void P_FreeExtraLevelData() } FBlockNode::FreeBlocks = NULL; } - { - msecnode_t *node = headsecnode; - - while (node != NULL) - { - msecnode_t *next = node->m_snext; - M_Free (node); - node = next; - } - headsecnode = NULL; - } + secnodearena.FreeAllBlocks(); + headsecnode = nullptr; } + // // P_SetupLevel // From 76153dbccc556718f5c43409905fabf491f9a51b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 15:06:17 +0100 Subject: [PATCH 34/58] - let the prediction code handle all 4 threaded lists an actor gets linked into. This is mostly a straight refactoring of the existing code to work independently of specific member variables in the involved classes, using a bit of template magic to avoid redundancy and moving the work code into subfunctions. It still needs some testing to see if it a) helps fix the crash issues and b) doesn't break anything- --- src/p_local.h | 12 ++- src/p_secnodes.cpp | 77 +++++++++-------- src/p_user.cpp | 209 ++++++++++++++++++++++++++------------------- src/r_defs.h | 2 +- 4 files changed, 173 insertions(+), 127 deletions(-) diff --git a/src/p_local.h b/src/p_local.h index 93875df2f..6bb65ad97 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -38,9 +38,11 @@ class APlayerPawn; struct line_t; struct sector_t; struct msecnode_t; +struct portnode_t; struct secplane_t; struct FCheckPosition; struct FTranslatedLineTarget; +struct FLinePortal; #include @@ -389,8 +391,14 @@ int P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, FName damageType, int flags, int fulldamagedistance=0); void P_DelSeclist(msecnode_t *, msecnode_t *sector_t::*seclisthead); -msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecnode_t *&sec_thinglist); -msecnode_t* P_DelSecnode(msecnode_t *, msecnode_t *sector_t::*head); +void P_DelSeclist(portnode_t *, portnode_t *FLinePortal::*seclisthead); + +template +nodetype *P_AddSecnode(linktype *s, AActor *thing, nodetype *nextnode, nodetype *&sec_thinglist); + +template +nodetype* P_DelSecnode(nodetype *, nodetype *linktype::*head); + msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector_list, msecnode_t *sector_t::*seclisthead); double P_GetMoveFactor(const AActor *mo, double *frictionp); // phares 3/6/98 double P_GetFriction(const AActor *mo, double *frictionfactor); diff --git a/src/p_secnodes.cpp b/src/p_secnodes.cpp index 38a9a5bab..8edfc0c70 100644 --- a/src/p_secnodes.cpp +++ b/src/p_secnodes.cpp @@ -32,7 +32,7 @@ // Maintain a freelist of msecnode_t's to reduce memory allocs and frees. //============================================================================= -msecnode_t *headsecnode = NULL; +msecnode_t *headsecnode = nullptr; FMemArena secnodearena; //============================================================================= @@ -55,7 +55,6 @@ msecnode_t *P_GetSecnode() } else { - node = node = (msecnode_t *)secnodearena.Alloc(sizeof(*node)); } return node; @@ -87,9 +86,10 @@ void P_PutSecnode(msecnode_t *node) // //============================================================================= -msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecnode_t *&sec_thinglist) +template +nodetype *P_AddSecnode(linktype *s, AActor *thing, nodetype *nextnode, nodetype *&sec_thinglist) { - msecnode_t *node; + nodetype *node; if (s == 0) { @@ -110,21 +110,21 @@ msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecn // Couldn't find an existing node for this sector. Add one at the head // of the list. - node = P_GetSecnode(); + node = (nodetype*)P_GetSecnode(); // killough 4/4/98, 4/7/98: mark new nodes unvisited. node->visited = 0; node->m_sector = s; // sector node->m_thing = thing; // mobj - node->m_tprev = NULL; // prev node on Thing thread + node->m_tprev = nullptr; // prev node on Thing thread node->m_tnext = nextnode; // next node on Thing thread if (nextnode) nextnode->m_tprev = node; // set back link on Thing // Add new node at head of sector thread starting at s->touching_thinglist - node->m_sprev = NULL; // prev node on sector thread + node->m_sprev = nullptr; // prev node on sector thread node->m_snext = sec_thinglist; // next node on sector thread if (sec_thinglist) node->m_snext->m_sprev = node; @@ -132,22 +132,26 @@ msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecn return node; } +template msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode, msecnode_t *&sec_thinglist); +template portnode_t *P_AddSecnode(FLinePortal *s, AActor *thing, portnode_t *nextnode, portnode_t *&sec_thinglist); + //============================================================================= // // P_DelSecnode // // Deletes a sector node from the list of // sectors this object appears in. Returns a pointer to the next node -// on the linked list, or NULL. +// on the linked list, or nullptr. // //============================================================================= -msecnode_t *P_DelSecnode(msecnode_t *node, msecnode_t *sector_t::*listhead) +template +nodetype *P_DelSecnode(nodetype *node, nodetype *linktype::*listhead) { - msecnode_t* tp; // prev node on thing thread - msecnode_t* tn; // next node on thing thread - msecnode_t* sp; // prev node on sector thread - msecnode_t* sn; // next node on sector thread + nodetype* tp; // prev node on thing thread + nodetype* tn; // next node on thing thread + nodetype* sp; // prev node on sector thread + nodetype* sn; // next node on sector thread if (node) { @@ -175,12 +179,15 @@ msecnode_t *P_DelSecnode(msecnode_t *node, msecnode_t *sector_t::*listhead) // Return this node to the freelist - P_PutSecnode(node); + P_PutSecnode((msecnode_t*)node); return tn; } - return NULL; + return nullptr; } // phares 3/13/98 +template msecnode_t *P_DelSecnode(msecnode_t *node, msecnode_t *sector_t::*listhead); +template portnode_t *P_DelSecnode(portnode_t *node, portnode_t *FLinePortal::*listhead); + //============================================================================= // // P_DelSeclist @@ -195,6 +202,13 @@ void P_DelSeclist(msecnode_t *node, msecnode_t *sector_t::*sechead) node = P_DelSecnode(node, sechead); } +void P_DelSeclist(portnode_t *node, portnode_t *FLinePortal::*sechead) +{ + while (node) + node = P_DelSecnode(node, sechead); +} + + //============================================================================= // phares 3/14/98 // @@ -210,13 +224,13 @@ msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector // First, clear out the existing m_thing fields. As each node is // added or verified as needed, m_thing will be set properly. When - // finished, delete all nodes where m_thing is still NULL. These + // finished, delete all nodes where m_thing is still nullptr. These // represent the sectors the Thing has vacated. node = sector_list; while (node) { - node->m_thing = NULL; + node->m_thing = nullptr; node = node->m_tnext; } @@ -254,12 +268,12 @@ msecnode_t *P_CreateSecNodeList(AActor *thing, double radius, msecnode_t *sector sector_list = P_AddSecnode(thing->Sector, thing, sector_list, thing->Sector->*seclisthead); // Now delete any nodes that won't be used. These are the ones where - // m_thing is still NULL. + // m_thing is still nullptr. node = sector_list; while (node) { - if (node->m_thing == NULL) + if (node->m_thing == nullptr) { if (node == sector_list) sector_list = node->m_tnext; @@ -308,7 +322,7 @@ portnode_t *P_DelPortalnode(portnode_t *node) if (sp) sp->m_snext = sn; else - node->m_portal->lineportal_thinglist = sn; + node->m_sector->lineportal_thinglist = sn; if (sn) sn->m_sprev = sp; @@ -316,7 +330,7 @@ portnode_t *P_DelPortalnode(portnode_t *node) P_PutSecnode(reinterpret_cast(node)); return tn; } - return NULL; + return nullptr; } @@ -340,16 +354,16 @@ portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) // killough 4/4/98, 4/7/98: mark new nodes unvisited. node->visited = 0; - node->m_portal = s; // portal + node->m_sector = s; // portal node->m_thing = thing; // mobj - node->m_tprev = NULL; // prev node on Thing thread + node->m_tprev = nullptr; // prev node on Thing thread node->m_tnext = nextnode; // next node on Thing thread if (nextnode) nextnode->m_tprev = node; // set back link on Thing // Add new node at head of portal thread starting at s->touching_thinglist - node->m_sprev = NULL; // prev node on portal thread + node->m_sprev = nullptr; // prev node on portal thread node->m_snext = s->lineportal_thinglist; // next node on portal thread if (s->lineportal_thinglist) node->m_snext->m_sprev = node; @@ -357,7 +371,6 @@ portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) return node; } - //========================================================================== // // Handle the lists used to render actors from other portal areas @@ -420,18 +433,12 @@ void AActor::UpdateRenderSectorList() void AActor::ClearRenderSectorList() { - msecnode_t *node = touching_sectorportallist; - while (node) - node = P_DelSecnode(node, §or_t::sectorportal_thinglist); - touching_sectorportallist = NULL; + P_DelSeclist(touching_sectorportallist, §or_t::sectorportal_thinglist); + touching_sectorportallist = nullptr; } void AActor::ClearRenderLineList() { - portnode_t *node = touching_lineportallist; - while (node) - node = P_DelPortalnode(node); - touching_lineportallist = NULL; + P_DelSeclist(touching_lineportallist, &FLinePortal::lineportal_thinglist); + touching_lineportallist = nullptr; } - - diff --git a/src/p_user.cpp b/src/p_user.cpp index 6db4a57f5..3ea9f451f 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -95,9 +95,19 @@ static int PredictionLerptics; static player_t PredictionPlayerBackup; static BYTE PredictionActorBackup[sizeof(APlayerPawn)]; -static TArray PredictionTouchingSectorsBackup; static TArray PredictionSectorListBackup; -static TArray PredictionSector_sprev_Backup; + +static TArray PredictionTouchingSectorsBackup; +static TArray PredictionTouchingSectors_sprev_Backup; + +static TArray PredictionRenderSectorsBackup; +static TArray PredictionRenderSectors_sprev_Backup; + +static TArray PredictionPortalSectorsBackup; +static TArray PredictionPortalSectors_sprev_Backup; + +static TArray PredictionPortalLinesBackup; +static TArray PredictionPortalLines_sprev_Backup; // [GRB] Custom player classes TArray PlayerClasses; @@ -2775,6 +2785,100 @@ bool P_LerpCalculate(AActor *pmo, PredictPos from, PredictPos to, PredictPos &re return (delta.LengthSquared() > cl_predict_lerpthreshold && scale <= 1.00f); } +template +void BackupNodeList(AActor *act, nodetype *head, nodetype *linktype::*otherlist, TArray &prevbackup, TArray &otherbackup) +{ + // The ordering of the touching_sectorlist needs to remain unchanged + // Also store a copy of all previous sector_thinglist nodes + prevbackup.Clear(); + otherbackup.Clear(); + + for (auto mnode = head; mnode != nullptr; mnode = mnode->m_tnext) + { + otherbackup.Push(mnode->m_sector); + + for (auto snode = mnode->m_sector->*otherlist; snode; snode = snode->m_snext) + { + if (snode->m_thing == act) + { + prevbackup.Push(snode->m_sprev); + break; + } + } + } +} + +template +nodetype *RestoreNodeList(AActor *act, nodetype *head, nodetype *linktype::*otherlist, TArray &prevbackup, TArray &otherbackup) +{ + // Destroy old refrences + nodetype *node = head; + while (node) + { + node->m_thing = NULL; + node = node->m_tnext; + } + + // Make the sector_list match the player's touching_sectorlist before it got predicted. + P_DelSeclist(head, otherlist); + head = NULL; + for (auto i = otherbackup.Size(); i-- > 0;) + { + head = P_AddSecnode(otherbackup[i], act, head, otherbackup[i]->*otherlist); + } + //act->touching_sectorlist = ctx.sector_list; // Attach to thing + //ctx.sector_list = NULL; // clear for next time + + // In the old code this block never executed because of the commented-out NULL assignment above. Needs to be checked + node = head; + while (node) + { + if (node->m_thing == NULL) + { + if (node == head) + head = node->m_tnext; + node = P_DelSecnode(node, otherlist); + } + else + { + node = node->m_tnext; + } + } + + nodetype *snode; + + // Restore sector thinglist order + for (auto i = otherbackup.Size(); i-- > 0;) + { + // If we were already the head node, then nothing needs to change + if (prevbackup[i] == NULL) + continue; + + for (snode = otherbackup[i]->*otherlist; snode; snode = snode->m_snext) + { + if (snode->m_thing == act) + { + if (snode->m_sprev) + snode->m_sprev->m_snext = snode->m_snext; + else + snode->m_sector->*otherlist = snode->m_snext; + if (snode->m_snext) + snode->m_snext->m_sprev = snode->m_sprev; + + snode->m_sprev = prevbackup[i]; + + // At the moment, we don't exist in the list anymore, but we do know what our previous node is, so we set its current m_snext->m_sprev to us. + if (snode->m_sprev->m_snext) + snode->m_sprev->m_snext->m_sprev = snode; + snode->m_snext = snode->m_sprev->m_snext; + snode->m_sprev->m_snext = snode; + break; + } + } + } + return head; +} + void P_PredictPlayer (player_t *player) { int maxtic; @@ -2809,28 +2913,10 @@ void P_PredictPlayer (player_t *player) act->flags2 &= ~MF2_PUSHWALL; player->cheats |= CF_PREDICTING; - // The ordering of the touching_sectorlist needs to remain unchanged - // Also store a copy of all previous sector_thinglist nodes - msecnode_t *mnode = act->touching_sectorlist; - msecnode_t *snode; - PredictionSector_sprev_Backup.Clear(); - PredictionTouchingSectorsBackup.Clear (); - - while (mnode != NULL) - { - PredictionTouchingSectorsBackup.Push (mnode->m_sector); - - for (snode = mnode->m_sector->touching_thinglist; snode; snode = snode->m_snext) - { - if (snode->m_thing == act) - { - PredictionSector_sprev_Backup.Push(snode->m_sprev); - break; - } - } - - mnode = mnode->m_tnext; - } + BackupNodeList(act, act->touching_sectorlist, §or_t::touching_thinglist, PredictionTouchingSectors_sprev_Backup, PredictionTouchingSectorsBackup); + BackupNodeList(act, act->touching_rendersectors, §or_t::touching_renderthings, PredictionRenderSectors_sprev_Backup, PredictionRenderSectorsBackup); + BackupNodeList(act, act->touching_sectorportallist, §or_t::sectorportal_thinglist, PredictionPortalSectors_sprev_Backup, PredictionPortalSectorsBackup); + BackupNodeList(act, act->touching_lineportallist, &FLinePortal::lineportal_thinglist, PredictionPortalLines_sprev_Backup, PredictionPortalLinesBackup); // Keep an ordered list off all actors in the linked sector. PredictionSectorListBackup.Clear(); @@ -2940,6 +3026,12 @@ void P_UnPredictPlayer () player->camera = savedcamera; FLinkContext ctx; + // Unlink from all list, includeing those which are not being handled by UnlinkFromWorld. + auto sectorportal_list = act->touching_sectorportallist; + auto lineportal_list = act->touching_lineportallist; + act->touching_sectorportallist = nullptr; + act->touching_lineportallist = nullptr; + act->UnlinkFromWorld(&ctx); memcpy(&act->snext, PredictionActorBackup, sizeof(APlayerPawn) - ((BYTE *)&act->snext - (BYTE *)act)); @@ -2968,71 +3060,10 @@ void P_UnPredictPlayer () *link = me; } - // Destroy old refrences - msecnode_t *node = ctx.sector_list; - while (node) - { - node->m_thing = NULL; - node = node->m_tnext; - } - - // Make the sector_list match the player's touching_sectorlist before it got predicted. - P_DelSeclist(ctx.sector_list, §or_t::touching_thinglist); - ctx.sector_list = NULL; - for (i = PredictionTouchingSectorsBackup.Size(); i-- > 0;) - { - ctx.sector_list = P_AddSecnode(PredictionTouchingSectorsBackup[i], act, ctx.sector_list, PredictionTouchingSectorsBackup[i]->touching_thinglist); - } - act->touching_sectorlist = ctx.sector_list; // Attach to thing - ctx.sector_list = NULL; // clear for next time - - // Huh??? - node = ctx.sector_list; - while (node) - { - if (node->m_thing == NULL) - { - if (node == ctx.sector_list) - ctx.sector_list = node->m_tnext; - node = P_DelSecnode(node, §or_t::touching_thinglist); - } - else - { - node = node->m_tnext; - } - } - - msecnode_t *snode; - - // Restore sector thinglist order - for (i = PredictionTouchingSectorsBackup.Size(); i-- > 0;) - { - // If we were already the head node, then nothing needs to change - if (PredictionSector_sprev_Backup[i] == NULL) - continue; - - for (snode = PredictionTouchingSectorsBackup[i]->touching_thinglist; snode; snode = snode->m_snext) - { - if (snode->m_thing == act) - { - if (snode->m_sprev) - snode->m_sprev->m_snext = snode->m_snext; - else - snode->m_sector->touching_thinglist = snode->m_snext; - if (snode->m_snext) - snode->m_snext->m_sprev = snode->m_sprev; - - snode->m_sprev = PredictionSector_sprev_Backup[i]; - - // At the moment, we don't exist in the list anymore, but we do know what our previous node is, so we set its current m_snext->m_sprev to us. - if (snode->m_sprev->m_snext) - snode->m_sprev->m_snext->m_sprev = snode; - snode->m_snext = snode->m_sprev->m_snext; - snode->m_sprev->m_snext = snode; - break; - } - } - } + act->touching_sectorlist = RestoreNodeList(act, ctx.sector_list, §or_t::touching_thinglist, PredictionTouchingSectors_sprev_Backup, PredictionTouchingSectorsBackup); + act->touching_rendersectors = RestoreNodeList(act, ctx.render_list, §or_t::touching_renderthings, PredictionRenderSectors_sprev_Backup, PredictionRenderSectorsBackup); + act->touching_sectorportallist = RestoreNodeList(act, sectorportal_list, §or_t::sectorportal_thinglist, PredictionPortalSectors_sprev_Backup, PredictionPortalSectorsBackup); + act->touching_lineportallist = RestoreNodeList(act, lineportal_list, &FLinePortal::lineportal_thinglist, PredictionPortalLines_sprev_Backup, PredictionPortalLinesBackup); } // Now fix the pointers in the blocknode chain diff --git a/src/r_defs.h b/src/r_defs.h index 67c9c8089..8e7cdd706 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -1373,7 +1373,7 @@ struct msecnode_t // use the same memory layout as msecnode_t so both can be used from the same freelist. struct portnode_t { - FLinePortal *m_portal; // a portal containing this object + FLinePortal *m_sector; // a portal containing this object (no, this isn't a sector, but if we want to use templates it needs the same variable names as msecnode_t.) AActor *m_thing; // this object struct portnode_t *m_tprev; // prev msecnode_t for this thing struct portnode_t *m_tnext; // next msecnode_t for this thing From fd0681edda810c099df1b97299b84758844e4e63 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 01:07:35 +0100 Subject: [PATCH 35/58] - fixed some edge cases with visible player sprites through non-static line portals. This required reinstating some code which I thought was no longer needed. --- src/actor.h | 1 + src/gl/scene/gl_portal.cpp | 25 +++++++++++++++++++++++-- src/gl/scene/gl_portal.h | 1 + src/gl/scene/gl_sprite.cpp | 17 +++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/actor.h b/src/actor.h index ffe3cc1a4..439ae2644 100644 --- a/src/actor.h +++ b/src/actor.h @@ -418,6 +418,7 @@ enum ActorRenderFlag RF_FLATSPRITE = 0x2000, // Flat sprite RF_VOXELSPRITE = 0x3000, // Voxel object RF_INVISIBLE = 0x8000, // Don't bother drawing this actor + RF_MAYBEINVISIBLE = 0x10000, RF_ROLLSPRITE = 0x40000, //[marrub]roll the sprite billboard RF_DONTFLIP = 0x80000, // Don't flip it when viewed from behind. RF_ROLLCENTER = 0x00100000, // Rotate from the center of sprite instead of offsets diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index e1fed484a..4cf8b9e7b 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -288,7 +288,9 @@ bool GLPortal::Start(bool usestencil, bool doquery) savedAngle = ViewAngle; savedviewactor=GLRenderer->mViewActor; savedviewarea=in_area; - savedvisibility = camera ? camera->renderflags & RF_INVISIBLE : ActorRenderFlags::FromInt(0); + savedviewpath[0] = ViewPath[0]; + savedviewpath[1] = ViewPath[1]; + savedvisibility = camera ? camera->renderflags & RF_MAYBEINVISIBLE : ActorRenderFlags::FromInt(0); PrevPortal = GLRenderer->mCurrentPortal; @@ -350,13 +352,15 @@ void GLPortal::End(bool usestencil) if (needdepth) FDrawInfo::EndDrawInfo(); // Restore the old view + ViewPath[0] = savedviewpath[0]; + ViewPath[1] = savedviewpath[1]; ViewPos = savedViewPos; r_showviewer = savedshowviewer; ViewActorPos = savedViewActorPos; ViewAngle = savedAngle; GLRenderer->mViewActor=savedviewactor; in_area=savedviewarea; - if (camera != nullptr) camera->renderflags = (camera->renderflags & ~RF_INVISIBLE) | savedvisibility; + if (camera != nullptr) camera->renderflags = (camera->renderflags & ~RF_MAYBEINVISIBLE) | savedvisibility; GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1)); { @@ -1011,6 +1015,23 @@ void GLLineToLinePortal::DrawContents() P_TranslatePortalXY(origin, ViewActorPos.X, ViewActorPos.Y); P_TranslatePortalAngle(origin, ViewAngle); P_TranslatePortalZ(origin, ViewPos.Z); + P_TranslatePortalXY(origin, ViewPath[0].X, ViewPath[0].Y); + P_TranslatePortalXY(origin, ViewPath[1].X, ViewPath[1].Y); + if (!r_showviewer && camera != nullptr && P_PointOnLineSidePrecise(ViewPath[0], glport->lines[0]->mDestination) != P_PointOnLineSidePrecise(ViewPath[1], glport->lines[0]->mDestination)) + { + double distp = (ViewPath[0] - ViewPath[1]).Length(); + if (distp > EQUAL_EPSILON) + { + double dist1 = (ViewPos - ViewPath[0]).Length(); + double dist2 = (ViewPos - ViewPath[1]).Length(); + + if (dist1 + dist2 < distp + 1) + { + camera->renderflags |= RF_MAYBEINVISIBLE; + } + } + } + SaveMapSection(); diff --git a/src/gl/scene/gl_portal.h b/src/gl/scene/gl_portal.h index 80f810cb5..8a40ec2e2 100644 --- a/src/gl/scene/gl_portal.h +++ b/src/gl/scene/gl_portal.h @@ -101,6 +101,7 @@ public: private: void DrawPortalStencil(); + DVector3 savedviewpath[2]; DVector3 savedViewPos; DVector3 savedViewActorPos; DAngle savedAngle; diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 7ed4199a1..4eda8aac1 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -677,6 +677,11 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) if (thruportal == 1) thingorigin += Displacements.getOffset(thing->Sector->PortalGroup, sector->PortalGroup); if (fabs(thingorigin.X - ViewActorPos.X) < 2 && fabs(thingorigin.Y - ViewActorPos.Y) < 2) return; } + // Thing is invisible if close to the camera. + if (thing->renderflags & RF_MAYBEINVISIBLE) + { + if (fabs(thingpos.X - ViewPos.X) < 32 && fabs(thingpos.Y - ViewPos.Y) < 32) return; + } // Too close to the camera. This doesn't look good if it is a sprite. if (fabs(thingpos.X - ViewPos.X) < 2 && fabs(thingpos.Y - ViewPos.Y) < 2) @@ -693,6 +698,10 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) } } } + if (thing == camera) + { + int a = 0; + } // don't draw first frame of a player missile if (thing->flags&MF_MISSILE) @@ -1203,6 +1212,14 @@ void gl_RenderActorsInPortal(FGLLinePortal *glport) DVector3 newpos = savedpos; sector_t fakesector; + if (!r_showviewer && th == camera) + { + if (fabs(savedpos.X - ViewActorPos.X) < 2 && fabs(savedpos.Y - ViewActorPos.Y) < 2) + { + continue; + } + } + P_TranslatePortalXY(line, newpos.X, newpos.Y); P_TranslatePortalZ(line, newpos.Z); P_TranslatePortalAngle(line, th->Angles.Yaw); From 8b001956ad3ea3da7ac87610a5450147019ba47d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 11:36:57 +0100 Subject: [PATCH 36/58] - fixed: initialization of local vector variables did not properly allocate registers if the initializer was a subelement of another local vector variable. --- src/scripting/codegeneration/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index d03f5b074..45969768c 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -10058,7 +10058,7 @@ ExpEmit FxLocalVariableDeclaration::Emit(VMFunctionBuilder *build) } emitval.Free(build); } - else if (Init->ExprType != EFX_LocalVariable) + else if (!emitval.Fixed) { // take over the register that got allocated while emitting the Init expression. RegNum = emitval.RegNum; From 362551e58d5ae6a3b022750763d5f4882e4c6290 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 13:13:16 +0100 Subject: [PATCH 37/58] - floatified the translucency values in particle_t to elimintate the gross inaccuracies with fadeout time. - widened ttl variable in particle_t to short to allow longer living particles than 6 seconds. - reordered fields in particle_t to reduce struct size a bit. --- src/gl/scene/gl_sprite.cpp | 4 ++-- src/p_effect.cpp | 27 +++++++++++++-------------- src/p_effect.h | 10 +++++----- src/r_things.cpp | 2 +- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 4eda8aac1..75d15543e 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -1060,7 +1060,7 @@ void GLSprite::ProcessParticle (particle_t *particle, sector_t *sector)//, int s player_t *player=&players[consoleplayer]; - if (particle->trans==0) return; + if (particle->alpha==0) return; lightlevel = gl_ClampLight(sector->GetTexture(sector_t::ceiling) == skyflatnum ? sector->GetCeilingLight() : sector->GetFloorLight()); @@ -1100,7 +1100,7 @@ void GLSprite::ProcessParticle (particle_t *particle, sector_t *sector)//, int s Colormap.ClearColor(); } - trans=particle->trans/255.0f; + trans=particle->alpha; RenderStyle = STYLE_Translucent; OverrideShader = 0; diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 827a457ee..eb872edc1 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -62,7 +62,7 @@ CVAR (Bool, r_particles, true, 0); FRandom pr_railtrail("RailTrail"); -#define FADEFROMTTL(a) (255/(a)) +#define FADEFROMTTL(a) (1.f/(a)) // [RH] particle globals WORD NumParticles; @@ -269,11 +269,10 @@ void P_ThinkParticles () continue; } - BYTE oldtrans; - oldtrans = particle->trans; - particle->trans -= particle->fade; + auto oldtrans = particle->alpha; + particle->alpha -= particle->fadestep; particle->size += particle->sizestep; - if (oldtrans < particle->trans || --particle->ttl <= 0 || (particle->size <= 0)) + if (oldtrans < particle->alpha || --particle->ttl <= 0 || (particle->size <= 0)) { // The particle has expired, so free it memset (particle, 0, sizeof(particle_t)); if (prev) @@ -331,9 +330,9 @@ void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &a particle->Vel = vel; particle->Acc = accel; particle->color = ParticleColor(color); - particle->trans = BYTE(startalpha*255); - if (fadestep < 0) particle->fade = FADEFROMTTL(lifetime); - else particle->fade = int(fadestep * 255); + particle->alpha = float(startalpha); + if (fadestep < 0) particle->fadestep = FADEFROMTTL(lifetime); + else particle->fadestep = float(fadestep); particle->ttl = lifetime; particle->bright = !!(flags & PS_FULLBRIGHT); particle->size = size; @@ -392,9 +391,9 @@ particle_t *JitterParticle (int ttl, double drift) for (i = 3; i; i--) particle->Acc[i] = ((1./16384) * (M_Random () - 128) * drift); - particle->trans = 255; // fully opaque + particle->alpha = 1.f; // fully opaque particle->ttl = ttl; - particle->fade = FADEFROMTTL(ttl); + particle->fadestep = FADEFROMTTL(ttl); } return particle; } @@ -622,8 +621,8 @@ void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, in break; p->ttl = 12; - p->fade = FADEFROMTTL(12); - p->trans = 255; + p->fadestep = FADEFROMTTL(12); + p->alpha = 1.f; p->size = 4; p->color = M_Random() & 0x80 ? color1 : color2; p->Vel.Z = M_Random() * zvel; @@ -763,9 +762,9 @@ void P_DrawRailTrail(AActor *source, TArray &portalhits, int color1, int spiralduration = (duration == 0) ? 35 : duration; - p->trans = 255; + p->alpha = 1.f; p->ttl = duration; - p->fade = FADEFROMTTL(spiralduration); + p->fadestep = FADEFROMTTL(spiralduration); p->size = 3; p->bright = fullbright; diff --git a/src/p_effect.h b/src/p_effect.h index 614702a49..4e8e73d09 100644 --- a/src/p_effect.h +++ b/src/p_effect.h @@ -57,17 +57,17 @@ struct particle_t DVector3 Pos; DVector3 Vel; DVector3 Acc; - BYTE ttl; - BYTE trans; double size; double sizestep; + subsector_t * subsector; + short ttl; BYTE bright; - BYTE fade; + bool notimefreeze; + float fadestep; + float alpha; int color; WORD tnext; WORD snext; - subsector_t * subsector; - bool notimefreeze; }; extern particle_t *Particles; diff --git a/src/r_things.cpp b/src/r_things.cpp index ce356808e..51b8221ec 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -2593,7 +2593,7 @@ void R_ProjectParticle (particle_t *particle, const sector_t *sector, int shade, vis->startfrac = 255 & (particle->color >>24); vis->pic = NULL; vis->bIsVoxel = false; - vis->renderflags = particle->trans; + vis->renderflags = short(particle->alpha * 255); vis->FakeFlatStat = fakeside; vis->floorclip = 0; vis->ColormapNum = 0; From 7cf7ebaf6d6dfc5aa891cba791fb0681ba522c92 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 14:29:04 +0100 Subject: [PATCH 38/58] - fixed: A_SetInventory must check for voodoo dolls and delegate the action to the real player because it will always break the real player's inventory if done so. --- src/p_actionfunctions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index 5bf5bf450..f4b2f8103 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -2500,6 +2500,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetInventory) ACTION_RETURN_BOOL(false); } + // Do not run this function on voodoo dolls because the way they transfer the inventory to the player will not work with the code below. + if (mobj->player != nullptr) + { + mobj = mobj->player->mo; + } + AInventory *item = mobj->FindInventory(itemtype); if (item != nullptr) From 7f59f00f59a67d952c99e7c570f870a5390f93e5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 14:30:26 +0100 Subject: [PATCH 39/58] - this is version 2.3.1 --- src/version.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/version.h b/src/version.h index a6a529f46..0b3e18f01 100644 --- a/src/version.h +++ b/src/version.h @@ -41,12 +41,12 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "2.3.0" +#define VERSIONSTR "2.3.1" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,3,0,0 -#define RC_PRODUCTVERSION 2,3,0,0 -#define RC_PRODUCTVERSION2 "2.3.0" +#define RC_FILEVERSION 2,3,1,0 +#define RC_PRODUCTVERSION 2,3,1,0 +#define RC_PRODUCTVERSION2 "2.3.1" // Version identifier for network games. // Bump it every time you do a release unless you're certain you From 0bdc2f59ada74e6b9f5213e87f46cefec868ff1a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 01:15:45 +0100 Subject: [PATCH 40/58] - added new Stairs_BuildUpDoomCrush special from Eternity and used it to fix the bad implementation to make Doom's turbo stairs crush. This also removes the crushing from Generic_Stairs entirely, just like it was in Boom. --- src/actionspecials.h | 1 + src/p_floor.cpp | 2 +- src/p_lnspec.cpp | 7 +++++++ src/p_spec.h | 3 ++- wadsrc/static/xlat/base.txt | 8 ++++---- wadsrc/static/xlat/strife.txt | 4 ++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/actionspecials.h b/src/actionspecials.h index 9b9c38cb9..3edb1671d 100644 --- a/src/actionspecials.h +++ b/src/actionspecials.h @@ -258,5 +258,6 @@ DEFINE_SPECIAL(Ceiling_LowerByTexture, 269, 2, 4, 4) DEFINE_SPECIAL(Stairs_BuildDownDoom, 270, 5, 5, 5) DEFINE_SPECIAL(Stairs_BuildUpDoomSync, 271, 4, 4, 4) DEFINE_SPECIAL(Stairs_BuildDownDoomSync, 272, 4, 4, 4) +DEFINE_SPECIAL(Stairs_BuildUpDoomCrush, 273, 5, 5, 5) #undef DEFINE_SPECIAL diff --git a/src/p_floor.cpp b/src/p_floor.cpp index fbfa70f2e..68602ab0a 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -626,7 +626,7 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line, floor->m_PauseTime = 0; floor->m_StepTime = floor->m_PerStepTime = persteptime; - floor->m_Crush = (!(usespecials & DFloor::stairUseSpecials) && speed == 4) ? 10 : -1; //jff 2/27/98 fix uninitialized crush field + floor->m_Crush = (usespecials & DFloor::stairCrush) ? 10 : -1; //jff 2/27/98 fix uninitialized crush field floor->m_Hexencrush = false; floor->m_Speed = speed; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index d368739e1..819ea372e 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -591,6 +591,13 @@ FUNC(LS_Stairs_BuildUpDoom) arg2, SPEED(arg1), TICS(arg3), arg4, 0, 0); } +FUNC(LS_Stairs_BuildUpDoomCrush) +// Stairs_BuildUpDoom (tag, speed, height, delay, reset) +{ + return EV_BuildStairs(arg0, DFloor::buildUp, ln, + arg2, SPEED(arg1), TICS(arg3), arg4, 0, DFloor::stairCrush); +} + FUNC(LS_Stairs_BuildDownDoom) // Stair_BuildDownDoom (tag, speed, height, delay, reset) { diff --git a/src/p_spec.h b/src/p_spec.h index ea98c82c1..a2fd0727a 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -503,7 +503,8 @@ public: enum EStairType { stairUseSpecials = 1, - stairSync = 2 + stairSync = 2, + stairCrush = 4, }; DFloor (sector_t *sec); diff --git a/wadsrc/static/xlat/base.txt b/wadsrc/static/xlat/base.txt index 8a99ba318..0fc02739e 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -99,7 +99,7 @@ include "xlat/defines.i" 97 = WALK|REP|MONST, Teleport (0, tag) 98 = WALK|REP, Floor_LowerToHighest (tag, F_FAST, 136) 99 = USE|REP, Door_LockedRaise (tag, D_FAST, 0, BCard | CardIsSkull) -100 = WALK, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +100 = WALK, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 101 = USE, Floor_RaiseToLowestCeiling (tag, F_SLOW) 102 = USE, Floor_LowerToHighest (tag, F_SLOW, 128) 103 = USE, Door_Open (tag, D_SLOW) @@ -126,7 +126,7 @@ include "xlat/defines.i" 124 = WALK, Exit_Secret (0) 125 = MONWALK, Teleport (0, tag) 126 = MONWALK|REP, Teleport (0, tag) -127 = USE, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +127 = USE, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 128 = WALK|REP, Floor_RaiseToNearest (tag, F_SLOW) 129 = WALK|REP, Floor_RaiseToNearest (tag, F_FAST) 130 = WALK, Floor_RaiseToNearest (tag, F_FAST) @@ -259,9 +259,9 @@ include "xlat/defines.i" 254 = 0, Scroll_Texture_Model (lineid, 0) 255 = 0, Scroll_Texture_Offsets () 256 = WALK|REP, Stairs_BuildUpDoom (tag, ST_SLOW, 8, 0, 0) -257 = WALK|REP, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +257 = WALK|REP, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 258 = USE|REP, Stairs_BuildUpDoom (tag, ST_SLOW, 8, 0, 0) -259 = USE|REP, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +259 = USE|REP, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 260 = 0, TranslucentLine (lineid, 168) // Changed to better reflect the BOOM default 261 = 0, Transfer_CeilingLight (tag) 262 = WALK|MONST, Teleport_Line (tag, tag, 1) diff --git a/wadsrc/static/xlat/strife.txt b/wadsrc/static/xlat/strife.txt index 50fcb2ff8..e4ae8244f 100644 --- a/wadsrc/static/xlat/strife.txt +++ b/wadsrc/static/xlat/strife.txt @@ -120,7 +120,7 @@ RetailOnly = 121 104 = WALK, Light_MinNeighbor (tag) 108 = WALK, Door_Raise (tag, D_FAST, VDOORWAIT) 109 = WALK, Door_Open (tag, D_FAST) -100 = WALK, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +100 = WALK, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 197 = WALK|REP, ACS_ExecuteAlways (0, 0, 197, tag) 110 = WALK, Door_Close (tag, D_FAST) 119 = WALK, Floor_RaiseToNearest (tag, F_SLOW) @@ -255,7 +255,7 @@ RetailOnly = 121 112 = USE, Door_Open (tag, D_FAST) 113 = USE, Door_Close (tag, D_FAST) 122 = USE, Plat_DownWaitUpStayLip (tag, P_TURBO, PLATWAIT, 0) -127 = USE, Stairs_BuildUpDoom (tag, ST_TURBO, 16, 0, 0) +127 = USE, Stairs_BuildUpDoomCrush (tag, ST_TURBO, 16, 0, 0) 131 = USE, Floor_RaiseToNearest (tag, F_FAST) 133 = USE, Door_LockedRaise (tag, D_FAST, 0, 4) 135 = USE, Door_LockedRaise (tag, D_FAST, 0, 11) From 748b1a6f66aee3b89bcd15f3587ba13040cacf18 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 18:53:02 +0100 Subject: [PATCH 41/58] - fixed bad variable assignment in Heresiarch. --- wadsrc/static/zscript/hexen/heresiarch.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index db4860c34..74bccbf4c 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -698,8 +698,8 @@ class SorcBall2 : SorcBall Actor parent = target; Actor mo = Spawn("SorcFX2", Pos + (0, 0, parent.Floorclip + Heresiarch.SORC_DEFENSE_HEIGHT), ALLOW_REPLACE); - bReflective = true; - bInvulnerable = true; + parent.bReflective = true; + parent.bInvulnerable = true; parent.args[0] = Heresiarch.SORC_DEFENSE_TIME; if (mo) mo.target = parent; } From f2ef2700425ae01a7908b8e27b1e561cd8745f66 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 19:07:26 +0100 Subject: [PATCH 42/58] - fixed: The check for virtual function overrides was never done if the overriding function had no qualifier at all. - fixed several occurences where an 'override' qualifier was missing. --- src/scripting/zscript/zcc_compile.cpp | 10 +++++++++- wadsrc/static/zscript/heretic/hereticartifacts.txt | 2 +- wadsrc/static/zscript/heretic/weaponblaster.txt | 2 +- wadsrc/static/zscript/heretic/weaponphoenix.txt | 2 +- wadsrc/static/zscript/heretic/weaponskullrod.txt | 2 +- wadsrc/static/zscript/hexen/heresiarch.txt | 2 +- wadsrc/static/zscript/shared/setcolor.txt | 2 +- wadsrc/static/zscript/strife/weapongrenade.txt | 2 +- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 9684ec924..52cbc1d65 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -2336,6 +2336,7 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool sym->Variants[0].Implementation->DefaultArgs = std::move(argdefaults); } + PClass *clstype = static_cast(c->Type()); if (varflags & VARF_Virtual) { if (sym->Variants[0].Implementation == nullptr) @@ -2349,7 +2350,6 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool } if (forclass) { - PClass *clstype = static_cast(c->Type()); int vindex = clstype->FindVirtualIndex(sym->SymbolName, sym->Variants[0].Proto); // specifying 'override' is necessary to prevent one of the biggest problem spots with virtual inheritance: Mismatching argument types. if (varflags & VARF_Override) @@ -2383,6 +2383,14 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool Error(p, "Virtual functions can only be defined for classes"); } } + else if (forclass) + { + int vindex = clstype->FindVirtualIndex(sym->SymbolName, sym->Variants[0].Proto); + if (vindex != -1) + { + Error(f, "Function %s attempts to override parent function without 'override' qualifier", FName(f->Name).GetChars()); + } + } } } diff --git a/wadsrc/static/zscript/heretic/hereticartifacts.txt b/wadsrc/static/zscript/heretic/hereticartifacts.txt index 20f52a2c9..3b7f14ad8 100644 --- a/wadsrc/static/zscript/heretic/hereticartifacts.txt +++ b/wadsrc/static/zscript/heretic/hereticartifacts.txt @@ -66,7 +66,7 @@ Class ArtiTomeOfPower : PowerupGiver Loop; } - bool Use (bool pickup) + override bool Use (bool pickup) { Playerinfo p = Owner.player; if (p && p.morphTics && (p.MorphStyle & MRF_UNDOBYTOMEOFPOWER)) diff --git a/wadsrc/static/zscript/heretic/weaponblaster.txt b/wadsrc/static/zscript/heretic/weaponblaster.txt index 913abffdb..e7e1e92b5 100644 --- a/wadsrc/static/zscript/heretic/weaponblaster.txt +++ b/wadsrc/static/zscript/heretic/weaponblaster.txt @@ -220,7 +220,7 @@ class Ripper : Actor Stop; } - int DoSpecialDamage (Actor target, int damage, Name damagetype) + override int DoSpecialDamage (Actor target, int damage, Name damagetype) { if (target is "Ironlich") { // Less damage to Ironlich bosses diff --git a/wadsrc/static/zscript/heretic/weaponphoenix.txt b/wadsrc/static/zscript/heretic/weaponphoenix.txt index eb75acb1d..558a257cd 100644 --- a/wadsrc/static/zscript/heretic/weaponphoenix.txt +++ b/wadsrc/static/zscript/heretic/weaponphoenix.txt @@ -311,7 +311,7 @@ class PhoenixFX2 : Actor } - int DoSpecialDamage (Actor target, int damage, Name damagetype) + override int DoSpecialDamage (Actor target, int damage, Name damagetype) { if (target.player && Random[PhoenixFX2]() < 128) { // Freeze player for a bit diff --git a/wadsrc/static/zscript/heretic/weaponskullrod.txt b/wadsrc/static/zscript/heretic/weaponskullrod.txt index a8d77e1d8..da959f7ae 100644 --- a/wadsrc/static/zscript/heretic/weaponskullrod.txt +++ b/wadsrc/static/zscript/heretic/weaponskullrod.txt @@ -402,7 +402,7 @@ class RainPillar : Actor // Rain pillar 1 ------------------------------------------------------------ - int DoSpecialDamage (Actor target, int damage, Name damagetype) + override int DoSpecialDamage (Actor target, int damage, Name damagetype) { if (target.bBoss) { // Decrease damage for bosses diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index 74bccbf4c..f89d2fb83 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -112,7 +112,7 @@ class Heresiarch : Actor Stop; } - void Die (Actor source, Actor inflictor, int dmgflags) + override void Die (Actor source, Actor inflictor, int dmgflags) { // The heresiarch just executes a script instead of a special upon death int script = special; diff --git a/wadsrc/static/zscript/shared/setcolor.txt b/wadsrc/static/zscript/shared/setcolor.txt index 18105ef54..2d9d3be57 100644 --- a/wadsrc/static/zscript/shared/setcolor.txt +++ b/wadsrc/static/zscript/shared/setcolor.txt @@ -28,7 +28,7 @@ class FadeSetter : Actor RenderStyle "None"; } - void PostBeginPlay() + override void PostBeginPlay() { Super.PostBeginPlay(); CurSector.SetFade(color(args[0], args[1], args[2])); diff --git a/wadsrc/static/zscript/strife/weapongrenade.txt b/wadsrc/static/zscript/strife/weapongrenade.txt index 7a775c57b..21e568313 100644 --- a/wadsrc/static/zscript/strife/weapongrenade.txt +++ b/wadsrc/static/zscript/strife/weapongrenade.txt @@ -241,7 +241,7 @@ class PhosphorousFire : Actor Stop; } - int DoSpecialDamage (Actor target, int damage, Name damagetype) + override int DoSpecialDamage (Actor target, int damage, Name damagetype) { if (target.bNoBlood) { From 6f507086511b5d75e04a9afe05b65b259ef30ece Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 19:34:04 +0100 Subject: [PATCH 43/58] - fixed: A single sight check iteration may not succeed if origin and end point are in different portal groups. All those may do is collect more portals. --- src/p_sight.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_sight.cpp b/src/p_sight.cpp index df02e2ebb..1b53e3844 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -790,6 +790,7 @@ sightcounts[2]++; bool traverseres = P_SightTraverseIntercepts ( ); if (itres == -1) return false; // if the iterator had an early out there was no line of sight. The traverser was only called to collect more portals. + if (seeingthing->Sector->PortalGroup != portalgroup) return false; // We are in a different group than the seeingthing, so this trace cannot determine visibility alone. return traverseres; } @@ -819,6 +820,11 @@ bool P_CheckSight (AActor *t1, AActor *t2, int flags) return false; } + if (t2->player) + { + int a = 0; + } + const sector_t *s1 = t1->Sector; const sector_t *s2 = t2->Sector; int pnum = int(s1 - sectors) * numsectors + int(s2 - sectors); From 80374383a0fc76758954f906c6cb2c980e27c25a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 19:44:00 +0100 Subject: [PATCH 44/58] - fixed: Particles should disappear if their alpha goes below zero. --- src/p_effect.cpp | 2 +- src/p_sight.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index eb872edc1..0181ba0b6 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -272,7 +272,7 @@ void P_ThinkParticles () auto oldtrans = particle->alpha; particle->alpha -= particle->fadestep; particle->size += particle->sizestep; - if (oldtrans < particle->alpha || --particle->ttl <= 0 || (particle->size <= 0)) + if (particle->alpha <= 0 || oldtrans < particle->alpha || --particle->ttl <= 0 || (particle->size <= 0)) { // The particle has expired, so free it memset (particle, 0, sizeof(particle_t)); if (prev) diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 1b53e3844..9337a2412 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -820,11 +820,6 @@ bool P_CheckSight (AActor *t1, AActor *t2, int flags) return false; } - if (t2->player) - { - int a = 0; - } - const sector_t *s1 = t1->Sector; const sector_t *s2 = t2->Sector; int pnum = int(s1 - sectors) * numsectors + int(s2 - sectors); From 5c14b80c8ec1a84406468982e94434bb7a099e00 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 9 Jan 2017 21:39:17 +0100 Subject: [PATCH 45/58] - copied sight check fix. --- src/p_sight.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 9337a2412..f00e59e8f 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -116,6 +116,7 @@ public: sightend = t2->PosRelative(task->portalgroup); sightstart.Z += t1->Height * 0.75; + portalgroup = task->portalgroup; Startfrac = task->Frac; Trace = { sightstart.X, sightstart.Y, sightend.X - sightstart.X, sightend.Y - sightstart.Y }; Lastztop = Lastzbottom = sightstart.Z; From 284ebd13b549b514bf22a4f1795510d08c171d54 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 9 Jan 2017 16:52:15 +0200 Subject: [PATCH 46/58] Autoaim is now updated when adjusting slider with mouse Fixes #208 Autoaim slider in Player Setup does not save if changed with cursor --- src/menu/playermenu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/menu/playermenu.cpp b/src/menu/playermenu.cpp index 9f5196367..ea22fdd71 100644 --- a/src/menu/playermenu.cpp +++ b/src/menu/playermenu.cpp @@ -1108,6 +1108,9 @@ bool DPlayerMenu::MouseEvent(int type, int x, int y) SendNewColor (RPART(color), GPART(color), v); } break; + case NAME_Autoaim: + AutoaimChanged(li); + break; } } return res; From 9a94613f5562d19526503e089481e3b127a3e900 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 9 Jan 2017 21:26:19 +0100 Subject: [PATCH 47/58] - fixed: The Windows CreateFramebuffer methods need to check the desired screen size for an actual resolution when switching to fullscreen. --- src/win32/win32gliface.cpp | 5 +++++ src/win32/win32video.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index aa4755e48..c4b5b7b43 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -352,6 +352,11 @@ DFrameBuffer *Win32GLVideo::CreateFrameBuffer(int width, int height, bool fs, DF { Win32GLFrameBuffer *fb; + if (fs) + { + I_ClosestResolution(&width, &height, 32); + } + m_DisplayWidth = width; m_DisplayHeight = height; m_DisplayBits = 32; diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index 0d91ed1d0..015a344e0 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -641,6 +641,11 @@ DFrameBuffer *Win32Video::CreateFrameBuffer (int width, int height, bool fullscr PalEntry flashColor; int flashAmount; + if (fullscreen) + { + I_ClosestResolution(&width, &height, D3D ? 32 : 8); + } + LOG4 ("CreateFB %d %d %d %p\n", width, height, fullscreen, old); if (old != NULL) From ea29e45ef5d66e26781e040a9bb5b62dee177bef Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Mon, 28 Nov 2016 00:25:43 +0100 Subject: [PATCH 48/58] - Fixed the wrong handling of empty command line argument. --- src/c_dispatch.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index d112634d6..296697ee7 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -1040,7 +1040,11 @@ FString BuildString (int argc, FString *argv) for (arg = 0; arg < argc; arg++) { - if (strchr(argv[arg], '"')) + if (argv[arg][0] == '\0') + { // It's an empty argument, we need to convert it to '""' + buf << "\"\" "; + } + else if (strchr(argv[arg], '"')) { // If it contains one or more quotes, we need to escape them. buf << '"'; long substr_start = 0, quotepos; From 9eb27303289a6a2b3ac740235f2359efefe2afbb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 9 Jan 2017 23:23:26 +0100 Subject: [PATCH 49/58] - fixed: The stair builder code tried to access a member of a null pointer after finding no more stair sectors. # Conflicts: # src/p_floor.cpp --- src/p_floor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 68602ab0a..5c21f771d 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -663,9 +663,8 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line, sec = tsec; continue; } - + newsecnum = tsec->Index(); } - newsecnum = (int)(tsec - sectors); } else { From 92c815074b8cb03a84b4f9ce5718a5f52cbc635f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 00:38:08 +0100 Subject: [PATCH 50/58] - added a workaround for a crashing condition in FThinkerIterator. It can actually happen that the thinker chain gets broken if an actor being iterated happens to destroy the immediately following actor in the chain as well. In that case both actors lose their chain links and the iterator cannot advance any further, the only solution to avoid a crash is to terminate the iteration of the current list. --- src/dthinker.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dthinker.cpp b/src/dthinker.cpp index fd20a4e79..11ba54dbc 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -675,6 +675,9 @@ DThinker *FThinkerIterator::Next (bool exact) { return thinker; } + // This can actually happen when a Destroy call on 'thinker' happens to destroy 'm_CurrThinker'. + // In that case there is no chance to recover, we have to terminate the iteration of this list. + if (m_CurrThinker == nullptr) break; } } if ((m_SearchingFresh = !m_SearchingFresh)) From 1061b34721fe7b75891addf72dab9c28ab002c76 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 01:00:06 +0100 Subject: [PATCH 51/58] - added global per-mod precaching lists, to be defined in MAPINFO's Gameinfo section. --- src/gi.cpp | 3 +++ src/gi.h | 5 +++++ src/p_setup.cpp | 10 ++++++++++ src/s_sound.cpp | 4 ++++ 4 files changed, 22 insertions(+) diff --git a/src/gi.cpp b/src/gi.cpp index 9d45d2724..c82128889 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -307,6 +307,9 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true) GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false) GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true) + GAMEINFOKEY_STRINGARRAY(PrecachedClasses, "precacheclasses", 0, false) + GAMEINFOKEY_STRINGARRAY(PrecachedTextures, "precachetextures", 0, false) + GAMEINFOKEY_STRINGARRAY(PrecachedSounds, "precachesounds", 0, false) GAMEINFOKEY_STRING(PauseSign, "pausesign") GAMEINFOKEY_STRING(quitSound, "quitSound") GAMEINFOKEY_STRING(BorderFlat, "borderFlat") diff --git a/src/gi.h b/src/gi.h index c5b8f79cf..d9e81bcf1 100644 --- a/src/gi.h +++ b/src/gi.h @@ -36,6 +36,7 @@ #include "basictypes.h" #include "zstring.h" +#include "s_sound.h" // Flags are not user configurable and only depend on the standard IWADs #define GI_MAPxx 0x00000001 @@ -120,6 +121,10 @@ struct gameinfo_t TArray DefaultWeaponSlots[10]; TArray PlayerClasses; + TArray PrecachedClasses; + TArray PrecachedTextures; + TArray PrecachedSounds; + FString titleMusic; int titleOrder; float titleTime; diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 7a026e172..6e2d7ed6d 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3383,6 +3383,11 @@ static void P_PrecacheLevel() actorhitlist[actor->GetClass()] = true; } + for (auto n : gameinfo.PrecachedClasses) + { + PClassActor *cls = PClass::FindActor(n); + if (cls != NULL) actorhitlist[cls] = true; + } for (unsigned i = 0; i < level.info->PrecacheClasses.Size(); i++) { // level.info can only store names, no class pointers. @@ -3419,6 +3424,11 @@ static void P_PrecacheLevel() hitlist[sky2texture.GetIndex()] |= FTextureManager::HIT_Sky; } + for (auto n : gameinfo.PrecachedTextures) + { + FTextureID tex = TexMan.CheckForTexture(n, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnFirst); + if (tex.Exists()) hitlist[tex.GetIndex()] |= FTextureManager::HIT_Wall; + } for (unsigned i = 0; i < level.info->PrecacheTextures.Size(); i++) { FTextureID tex = TexMan.CheckForTexture(level.info->PrecacheTextures[i], FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnFirst); diff --git a/src/s_sound.cpp b/src/s_sound.cpp index be1b572f1..1c7c5aea1 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -480,6 +480,10 @@ void S_PrecacheLevel () { actor->MarkPrecacheSounds(); } + for (auto i : gameinfo.PrecachedSounds) + { + level.info->PrecacheSounds[i].MarkUsed(); + } // Precache all extra sounds requested by this map. for (i = 0; i < level.info->PrecacheSounds.Size(); ++i) { From bc6530a3ce6da8fee7b2ee68dd553bf0ed6233ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 22:01:29 +0100 Subject: [PATCH 52/58] - fixed: Any inventory item that is about to be placed in an inventory must stop all its sounds. --- src/g_inventory/a_pickups.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/g_inventory/a_pickups.cpp b/src/g_inventory/a_pickups.cpp index 3c1d32d42..438293d40 100644 --- a/src/g_inventory/a_pickups.cpp +++ b/src/g_inventory/a_pickups.cpp @@ -644,6 +644,8 @@ void AInventory::BecomeItem () RemoveFromHash (); flags &= ~MF_SPECIAL; ChangeStatNum(STAT_INVENTORY); + // stop all sounds this item is playing. + for(int i = 1;i<=7;i++) S_StopSound(this, i); SetState (FindState("Held")); } From 62648ca29c32343c0612af36ee9be39e80f2dcce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 22:16:32 +0100 Subject: [PATCH 53/58] - fixed: 'stat music' tried to access a non-existent stream decoder for any music played through Timidity++ on OpenAL. --- src/sound/oalsound.cpp | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 53c471a31..1b34583f9 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -407,7 +407,7 @@ public: virtual FString GetStats() { FString stats; - size_t pos, len; + size_t pos = 0, len = 0; ALfloat volume; ALint offset; ALint processed; @@ -429,28 +429,34 @@ public: return stats; } - pos = Decoder->getSampleOffset(); - len = Decoder->getSampleLength(); + if (Decoder != nullptr) + { + pos = Decoder->getSampleOffset(); + len = Decoder->getSampleLength(); + } lock.unlock(); stats = (state == AL_INITIAL) ? "Buffering" : (state == AL_STOPPED) ? "Underrun" : (state == AL_PLAYING || state == AL_PAUSED) ? "Ready" : "Unknown state"; - if(state == AL_STOPPED) - offset = BufferCount * (Data.Size()/FrameSize); - else - { - size_t rem = queued*(Data.Size()/FrameSize) - offset; - if(pos > rem) pos -= rem; - else if(len > 0) pos += len - rem; - else pos = 0; - } - pos = (size_t)(pos * 1000.0 / SampleRate); - len = (size_t)(len * 1000.0 / SampleRate); - stats.AppendFormat(",%3u%% buffered", 100 - 100*offset/(BufferCount*(Data.Size()/FrameSize))); - stats.AppendFormat(", %zu.%03zu", pos/1000, pos%1000); - if(len > 0) - stats.AppendFormat(" / %zu.%03zu", len/1000, len%1000); + if (Decoder != nullptr) + { + if (state == AL_STOPPED) + offset = BufferCount * (Data.Size() / FrameSize); + else + { + size_t rem = queued*(Data.Size() / FrameSize) - offset; + if (pos > rem) pos -= rem; + else if (len > 0) pos += len - rem; + else pos = 0; + } + pos = (size_t)(pos * 1000.0 / SampleRate); + len = (size_t)(len * 1000.0 / SampleRate); + stats.AppendFormat(",%3u%% buffered", 100 - 100 * offset / (BufferCount*(Data.Size() / FrameSize))); + stats.AppendFormat(", %zu.%03zu", pos / 1000, pos % 1000); + if (len > 0) + stats.AppendFormat(" / %zu.%03zu", len / 1000, len % 1000); + } if(state == AL_PAUSED) stats += ", paused"; if(state == AL_PLAYING) From ff9513a814ca99f1a403865d4f3b38709b30ad00 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 22:21:57 +0100 Subject: [PATCH 54/58] Revert "- fixed: The stair builder code tried to access a member of a null pointer after finding no more stair sectors." This reverts commit 9eb27303289a6a2b3ac740235f2359efefe2afbb. This fix doesn't apply to 'maint'. --- src/p_floor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 5c21f771d..68602ab0a 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -663,8 +663,9 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line, sec = tsec; continue; } - newsecnum = tsec->Index(); + } + newsecnum = (int)(tsec - sectors); } else { From 5ec33de8a79a20a2a521057ae2c8cc70ed5d6788 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 10 Jan 2017 22:28:15 +0100 Subject: [PATCH 55/58] - removed r_columnmethod 1 because the code was broken and already gone from QZDoom. --- src/r_draw.cpp | 4 ++-- wadsrc/static/language.enu | 1 - wadsrc/static/menudef.txt | 7 ------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 8206c2391..10bc104c2 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -435,7 +435,7 @@ namespace swrenderer { dc_colormap += fixedlightlev; } - return r_columnmethod ? DoDraw1 : DoDraw0; + return DoDraw0; } fglevel = GetAlpha(style.SrcAlpha, alpha); @@ -468,7 +468,7 @@ namespace swrenderer { return DontDraw; } - return r_columnmethod ? DoDraw1 : DoDraw0; + return DoDraw0; } ESPSResult R_SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color) diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index fc611b3c0..b7558d1b2 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1779,7 +1779,6 @@ DSPLYMNU_SCREENSIZE = "Screen size"; DSPLYMNU_BRIGHTNESS = "Brightness"; DSPLYMNU_VSYNC = "Vertical Sync"; DSPLYMNU_CAPFPS = "Rendering Interpolation"; -DSPLYMNU_COLUMNMETHOD = "Column render mode"; DSPLYMNU_WIPETYPE = "Screen wipe style"; DSPLYMNU_SHOWENDOOM = "Show ENDOOM screen"; DSPLYMNU_BLOODFADE = "Blood Flash Intensity"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 06ad094d6..47213a0f6 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -594,12 +594,6 @@ OptionMenu "JoystickConfigMenu" // //------------------------------------------------------------------------------------------- -OptionValue ColumnMethods -{ - 0.0, "$OPTVAL_ORIGINAL" - 1.0, "$OPTVAL_OPTIMIZED" -} - OptionValue SkyModes { 0.0, "$OPTVAL_NORMAL" @@ -684,7 +678,6 @@ OptionMenu "VideoOptions" Slider "$DSPLYMNU_BLOODFADE", "blood_fade_scalar", 0.0, 1.0, 0.05, 2 Slider "$DSPLYMNU_PICKUPFADE", "pickup_fade_scalar", 0.0, 1.0, 0.05, 2 Slider "$DSPLYMNU_WATERFADE", "underwater_fade_scalar", 0.0, 1.0, 0.05, 2 - Option "$DSPLYMNU_COLUMNMETHOD", "r_columnmethod", "ColumnMethods" StaticText " " Option "$DSPLYMNU_WIPETYPE", "wipetype", "Wipes" From b7460144b67a7dd335e81a4b70e6cf584ae68ff7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 Jan 2017 01:13:39 +0100 Subject: [PATCH 56/58] - fixed: Stairs_BuildUpDoomCrush wasn't in the special dispatcher list. --- src/p_lnspec.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 819ea372e..0ce41e126 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -3589,6 +3589,7 @@ static lnSpecFunc LineSpecials[] = /* 270 */ LS_Stairs_BuildDownDoom, /* 271 */ LS_Stairs_BuildUpDoomSync, /* 272 */ LS_Stairs_BuildDownDoomSync, + /* 273 */ LS_Stairs_BuildUpDoomCrush, }; From 98adc98e56e8b21adb93e7887073bcbda993db1f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 Jan 2017 01:23:08 +0100 Subject: [PATCH 57/58] - fixed the railgun's spiral duration was set incorrectly. --- src/p_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 0181ba0b6..96295d6f5 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -763,7 +763,7 @@ void P_DrawRailTrail(AActor *source, TArray &portalhits, int color1, int spiralduration = (duration == 0) ? 35 : duration; p->alpha = 1.f; - p->ttl = duration; + p->ttl = spiralduration; p->fadestep = FADEFROMTTL(spiralduration); p->size = 3; p->bright = fullbright; From a1026ff03762bd30f0e5f5e076c7acdd46b819c3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 Jan 2017 01:24:16 +0100 Subject: [PATCH 58/58] This is 2.3.2. --- src/version.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/version.h b/src/version.h index 0b3e18f01..2e0aeb3b8 100644 --- a/src/version.h +++ b/src/version.h @@ -41,12 +41,12 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "2.3.1" +#define VERSIONSTR "2.3.2" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,3,1,0 -#define RC_PRODUCTVERSION 2,3,1,0 -#define RC_PRODUCTVERSION2 "2.3.1" +#define RC_FILEVERSION 2,3,2,0 +#define RC_PRODUCTVERSION 2,3,2,0 +#define RC_PRODUCTVERSION2 "2.3.2" // Version identifier for network games. // Bump it every time you do a release unless you're certain you