From e3c36998b6ce182f9dfe513c19891e3d54db81e4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Jan 2017 11:57:42 +0100 Subject: [PATCH 01/15] - delete all compile-time symbols for scripting after finishing compiling data. Even the bare-bones gzdoom.pk3 gets rid of over 2000 symbols this way that otherwise would need to be tracked by the garbage collector. --- src/d_main.cpp | 3 +++ src/dobjtype.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ src/dobjtype.h | 6 ++++++ 3 files changed, 51 insertions(+) diff --git a/src/d_main.cpp b/src/d_main.cpp index 971e0ece0..6041af9b4 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2517,6 +2517,9 @@ void D_DoomMain (void) // Create replacements for dehacked pickups FinishDehPatch(); + + // clean up the compiler symbols which are not needed any longer. + RemoveUnusedSymbols(); InitActorNumsFromMapinfo(); InitSpawnablesFromMapinfo(); diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index dbd3e6d6f..76330867e 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -3898,3 +3898,45 @@ void FNamespaceManager::ReleaseSymbols() GlobalNamespace = nullptr; AllNamespaces.Clear(); } + +// removes all symbols from the symbol tables. +// After running the compiler these are not needed anymore. +// Only the namespaces themselves are kept because the type table references them. +int FNamespaceManager::RemoveSymbols() +{ + int count = 0; + for (auto ns : AllNamespaces) + { + count += ns->Symbols.Symbols.CountUsed(); + ns->Symbols.ReleaseSymbols(); + } + return count; +} + +void RemoveUnusedSymbols() +{ + // Global symbols are not needed anymore after running the compiler. + int count = Namespaces.RemoveSymbols(); + + // We do not need any non-field and non-function symbols in structs and classes anymore. + for (size_t i = 0; i < countof(TypeTable.TypeHash); ++i) + { + for (PType *ty = TypeTable.TypeHash[i]; ty != NULL; ty = ty->HashNext) + { + if (ty->IsKindOf(RUNTIME_CLASS(PStruct))) + { + auto it = ty->Symbols.GetIterator(); + PSymbolTable::MapType::Pair *pair; + while (it.NextPair(pair)) + { + if (!pair->Value->IsKindOf(RUNTIME_CLASS(PField)) && !pair->Value->IsKindOf(RUNTIME_CLASS(PFunction))) + { + ty->Symbols.RemoveSymbol(pair->Value); + count++; + } + } + } + } + } + DPrintf(DMSG_SPAMMY, "%d symbols removed after compilation\n", count); +} diff --git a/src/dobjtype.h b/src/dobjtype.h index 61747134c..632ef96bb 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -76,6 +76,7 @@ class VMFrameStack; struct VMValue; struct VMReturn; class VMFunction; +struct FNamespaceManager; // A VM function ------------------------------------------------------------ @@ -157,6 +158,7 @@ private: MapType Symbols; friend class DObject; + friend struct FNamespaceManager; }; // A symbol for a compiler tree node ---------------------------------------- @@ -1010,6 +1012,7 @@ struct FNamespaceManager PNamespace *NewNamespace(int filenum); size_t MarkSymbols(); void ReleaseSymbols(); + int RemoveSymbols(); }; extern FNamespaceManager Namespaces; @@ -1047,4 +1050,7 @@ inline T *&DObject::PointerVar(FName field) { return *(T**)ScriptVar(field, nullptr); // pointer check is more tricky and for the handful of uses in the DECORATE parser not worth the hassle. } + +void RemoveUnusedSymbols(); + #endif From 02f678dccc8b6a635b07f9a96b20aed7b3b5b9ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Jan 2017 11:59:59 +0100 Subject: [PATCH 02/15] - there seem to be ACS compilers which let 'delay' pass inside a function. Since this is an unsupported feature which brings the ACS VM into an unstable state it has to be handled with a hard abort to avoid crashes. --- src/p_acs.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 50f50ff31..24142e0ec 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -9716,7 +9716,16 @@ scriptwait: if (runaway != 0 && InModuleScriptNumber >= 0) { - activeBehavior->GetScriptPtr(InModuleScriptNumber)->ProfileData.AddRun(runaway); + auto scriptptr = activeBehavior->GetScriptPtr(InModuleScriptNumber); + if (scriptptr != nullptr) + { + scriptptr->ProfileData.AddRun(runaway); + } + else + { + // It is pointless to continue execution. The script is broken and needs to be aborted. + I_Error("Bad script definition encountered. Script %d is reported running but not present.\nThe most likely cause for this message is using 'delay' inside a function which is not supported.\nPlease check the ACS compiler used for compiling the script!", InModuleScriptNumber); + } } if (state == SCRIPT_DivideBy0) From 6e47bf9bbc12c496f3d32996506ba6f003cfbd0b Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 10:19:59 -0500 Subject: [PATCH 03/15] - Added gl_paltonemap_powtable and gl_paltonemap_reverselookup for tweaking palette tonemap generation. --- src/gl/renderer/gl_postprocess.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 30c0000d3..0c24d89ae 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -81,6 +81,9 @@ CVAR(Float, gl_exposure_min, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_base, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_speed, 0.05f, CVAR_ARCHIVE) +CVAR(Float, gl_paltonemap_powtable, 1.2f, CVAR_ARCHIVE) +CVAR(Bool, gl_paltonemap_reverselookup, false, CVAR_ARCHIVE) + CUSTOM_CVAR(Int, gl_tonemap, 0, CVAR_ARCHIVE) { if (self < 0 || self > 5) @@ -828,7 +831,7 @@ int FGLRenderer::PTM_BestColor (const uint32 *pal_in, int r, int g, int b, int f if (firstTime) { firstTime = false; - for (int x = 0; x < 256; x++) powtable[x] = pow((double)x/255,1.2); + for (int x = 0; x < 256; x++) powtable[x] = pow((double)x/255, (double)gl_paltonemap_powtable); } for (int color = first; color < num; color++) @@ -837,9 +840,9 @@ int FGLRenderer::PTM_BestColor (const uint32 *pal_in, int r, int g, int b, int f double y = powtable[abs(g-pal[color].g)]; double z = powtable[abs(b-pal[color].b)]; fdist = x + y + z; - if (color == first || fdist < fbestdist) + if (color == first || ((gl_paltonemap_reverselookup)?(fdist <= fbestdist):(fdist < fbestdist))) { - if (fdist == 0) + if (fdist == 0 && !gl_paltonemap_reverselookup) return color; fbestdist = fdist; From 494be00ce5155854d6bcc1b8fa236d32433d0952 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 10:21:02 -0500 Subject: [PATCH 04/15] - Made default values for gl_paltonemap_powtable and gl_paltonemap_reverselookup more "id-like". --- src/gl/renderer/gl_postprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 0c24d89ae..3329231d8 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -81,8 +81,8 @@ CVAR(Float, gl_exposure_min, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_base, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_speed, 0.05f, CVAR_ARCHIVE) -CVAR(Float, gl_paltonemap_powtable, 1.2f, CVAR_ARCHIVE) -CVAR(Bool, gl_paltonemap_reverselookup, false, CVAR_ARCHIVE) +CVAR(Float, gl_paltonemap_powtable, 2.0f, CVAR_ARCHIVE) +CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE) CUSTOM_CVAR(Int, gl_tonemap, 0, CVAR_ARCHIVE) { From 6263704741710f37088d0cdfadd530b3af234ea3 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 11:19:01 -0500 Subject: [PATCH 05/15] - Added menu options for pal tonemap tweaks. # Conflicts: # wadsrc/static/language.enu --- wadsrc/static/language.enu | 4 ++++ wadsrc/static/menudef.zz | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index b7558d1b2..ddf23edb9 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -2645,6 +2645,8 @@ GLPREFMNU_LENS = "Lens distortion effect"; GLPREFMNU_SSAO = "Ambient occlusion quality"; GLPREFMNU_SSAO_PORTALS = "Portals with AO"; GLPREFMNU_FXAA = "FXAA Quality"; +GLPREFMNU_PALTONEMAPORDER = "Tonemap Palette Order"; +GLPREFMNU_PALTONEMAPPOWER = "Tonemap Palette Exponent"; // Option Values OPTVAL_SMART = "Smart"; @@ -2728,3 +2730,5 @@ OPTVAL_LOW = "Low"; OPTVAL_MEDIUM = "Medium"; OPTVAL_HIGH = "High"; OPTVAL_EXTREME = "Extreme"; +OPTVAL_OBVERSEFIRST = "Obverse"; +OPTVAL_REVERSEFIRST = "Reverse"; diff --git a/wadsrc/static/menudef.zz b/wadsrc/static/menudef.zz index 599c28a2d..f683f2e0d 100644 --- a/wadsrc/static/menudef.zz +++ b/wadsrc/static/menudef.zz @@ -1,3 +1,9 @@ +OptionValue "LookupOrder" +{ + 0, "$OPTVAL_OBVERSEFIRST" + 1, "$OPTVAL_REVERSEFIRST" +} + OptionValue "SpriteclipModes" { 0, "$OPTVAL_NEVER" @@ -249,4 +255,7 @@ OptionMenu "GLPrefOptions" Option "$GLPREFMNU_SSAO", gl_ssao, "SSAOModes" Slider "$GLPREFMNU_SSAO_PORTALS", gl_ssao_portals, 0.0, 4.0, 1.0, 0 Option "$GLPREFMNU_FXAA", gl_fxaa, "FXAAQuality" + StaticText " " + Slider "$GLPREFMNU_PALTONEMAPPOWER", gl_paltonemap_powtable, 0.2, 3.0, 0.1, 0 + Option "$GLPREFMNU_PALTONEMAPORDER", gl_paltonemap_reverselookup, "LookupOrder" } From eb3f83f9084088fbce1e3a993ca0817aa9c9e2b1 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 11:33:42 -0500 Subject: [PATCH 06/15] - Since tonemap tweaks are on the menu now, make their changes affect instantly. --- src/gl/renderer/gl_postprocess.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 3329231d8..c504088f4 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -81,9 +81,6 @@ CVAR(Float, gl_exposure_min, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_base, 0.35f, CVAR_ARCHIVE) CVAR(Float, gl_exposure_speed, 0.05f, CVAR_ARCHIVE) -CVAR(Float, gl_paltonemap_powtable, 2.0f, CVAR_ARCHIVE) -CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE) - CUSTOM_CVAR(Int, gl_tonemap, 0, CVAR_ARCHIVE) { if (self < 0 || self > 5) @@ -136,6 +133,17 @@ CUSTOM_CVAR(Float, gl_ssao_exponent, 1.8f, 0) if (self < 0.1f) self = 0.1f; } +CUSTOM_CVAR(Float, gl_paltonemap_powtable, 2.0f, CVAR_ARCHIVE | CVAR_NOINITCALL) +{ + GLRenderer->ClearTonemapPalette(); +} + +CUSTOM_CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE | CVAR_NOINITCALL) +{ + GLRenderer->ClearTonemapPalette(); +} + + EXTERN_CVAR(Float, vid_brightness) EXTERN_CVAR(Float, vid_contrast) @@ -536,8 +544,11 @@ void FGLRenderer::CreateTonemapPalette() void FGLRenderer::ClearTonemapPalette() { - delete mTonemapPalette; - mTonemapPalette = nullptr; + if (mTonemapPalette) + { + delete mTonemapPalette; + mTonemapPalette = nullptr; + } } //----------------------------------------------------------------------------- @@ -824,12 +835,14 @@ int FGLRenderer::PTM_BestColor (const uint32 *pal_in, int r, int g, int b, int f const PalEntry *pal = (const PalEntry *)pal_in; static double powtable[256]; static bool firstTime = true; + static float trackpowtable = 0.; double fbestdist, fdist; int bestcolor; - if (firstTime) + if (firstTime || trackpowtable != gl_paltonemap_powtable) { + trackpowtable = gl_paltonemap_powtable; firstTime = false; for (int x = 0; x < 256; x++) powtable[x] = pow((double)x/255, (double)gl_paltonemap_powtable); } From 9a777f719b700c3370f73a63d4b115a69650c563 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 13:44:12 -0500 Subject: [PATCH 07/15] - Added "gl_bandedswlight" to reduce the software light emulation gradient to 32 levels. --- src/gl/renderer/gl_renderstate.cpp | 2 ++ src/gl/shaders/gl_shader.cpp | 1 + src/gl/shaders/gl_shader.h | 1 + wadsrc/static/language.enu | 1 + wadsrc/static/menudef.zz | 1 + wadsrc/static/shaders/glsl/main.fp | 6 +++++- wadsrc/static/shaders/glsl/shaderdefs.i | 1 + 7 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index fa8237cca..22330905f 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -43,6 +43,7 @@ void gl_SetTextureMode(int type); FRenderState gl_RenderState; CVAR(Bool, gl_direct_state_change, true, 0) +CVAR(Bool, gl_bandedswlight, true, CVAR_ARCHIVE) static VSMatrix identityMatrix(1); @@ -146,6 +147,7 @@ bool FRenderState::ApplyShader() activeShader->muDesaturation.Set(mDesaturation / 255.f); activeShader->muFogEnabled.Set(fogset); + activeShader->muPalLightLevels.Set(gl_bandedswlight); activeShader->muTextureMode.Set(mTextureMode); activeShader->muCameraPos.Set(mCameraPos.vec); activeShader->muLightParms.Set(mLightParms); diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index 327ac5fd4..ef512faea 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -214,6 +214,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char * muDesaturation.Init(hShader, "uDesaturationFactor"); muFogEnabled.Init(hShader, "uFogEnabled"); + muPalLightLevels.Init(hShader, "uPalLightLevels"); muTextureMode.Init(hShader, "uTextureMode"); muCameraPos.Init(hShader, "uCameraPos"); muLightParms.Init(hShader, "uLightAttr"); diff --git a/src/gl/shaders/gl_shader.h b/src/gl/shaders/gl_shader.h index acdd530aa..f9eb5c292 100644 --- a/src/gl/shaders/gl_shader.h +++ b/src/gl/shaders/gl_shader.h @@ -259,6 +259,7 @@ class FShader FBufferedUniform1f muDesaturation; FBufferedUniform1i muFogEnabled; + FBufferedUniform1i muPalLightLevels; FBufferedUniform1i muTextureMode; FBufferedUniform4f muCameraPos; FBufferedUniform4f muLightParms; diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index ddf23edb9..bdc1ce3ae 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -2647,6 +2647,7 @@ GLPREFMNU_SSAO_PORTALS = "Portals with AO"; GLPREFMNU_FXAA = "FXAA Quality"; GLPREFMNU_PALTONEMAPORDER = "Tonemap Palette Order"; GLPREFMNU_PALTONEMAPPOWER = "Tonemap Palette Exponent"; +GLPREFMNU_SWLMBANDED = "Banded SW Lightmode"; // Option Values OPTVAL_SMART = "Smart"; diff --git a/wadsrc/static/menudef.zz b/wadsrc/static/menudef.zz index f683f2e0d..606d21ab6 100644 --- a/wadsrc/static/menudef.zz +++ b/wadsrc/static/menudef.zz @@ -232,6 +232,7 @@ OptionMenu "GLPrefOptions" { Title "$GLPREFMNU_TITLE" Option "$GLPREFMNU_SECLIGHTMODE", gl_lightmode, "LightingModes" + Option "$GLPREFMNU_SWLMBANDED", gl_bandedswlight, "OnOff" Option "$GLPREFMNU_FOGMODE", gl_fogmode, "FogMode" Option "$GLPREFMNU_FOGFORCEFULLBRIGHT", gl_brightfog, "YesNo" Slider "$GLPREFMNU_WPNLIGHTSTR", gl_weaponlight, 0,32, 2 diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 5834dcf5d..0c55adb50 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -121,7 +121,11 @@ float R_DoomLightingEquation(float light) /* The zdoom light equation */ float vis = globVis / z; float shade = 64.0 - (L + 12.0) * 32.0/128.0; - float lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); + float lightscale; + if (uPalLightLevels != 0) + lightscale = clamp(int(shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); + else + lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); // Result is the normalized colormap index (0 bright .. 1 dark) return lightscale; diff --git a/wadsrc/static/shaders/glsl/shaderdefs.i b/wadsrc/static/shaders/glsl/shaderdefs.i index 8c5697a66..2099427d5 100644 --- a/wadsrc/static/shaders/glsl/shaderdefs.i +++ b/wadsrc/static/shaders/glsl/shaderdefs.i @@ -41,6 +41,7 @@ uniform vec4 uLightAttr; #define uLightFactor uLightAttr.g #define uLightDist uLightAttr.r uniform int uFogEnabled; +uniform int uPalLightLevels; // dynamic lights uniform int uLightIndex; From 3154652885f4ed8ded158b5d3495087b6abbe5aa Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 14:01:42 -0500 Subject: [PATCH 08/15] - fixed possible AMD compilation error. --- wadsrc/static/shaders/glsl/main.fp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 0c55adb50..145f76964 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -123,7 +123,7 @@ float R_DoomLightingEquation(float light) float shade = 64.0 - (L + 12.0) * 32.0/128.0; float lightscale; if (uPalLightLevels != 0) - lightscale = clamp(int(shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); + lightscale = clamp(float(int(shade - min(24.0, vis))) / 32.0, 0.0, 31.0/32.0); else lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0); From c1ff1c6336168d90098aca2b735f6191ccb68f81 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 14:03:59 -0500 Subject: [PATCH 09/15] - Set banded light to "false" to not impact GZDoom defaults. --- src/gl/renderer/gl_renderstate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index 22330905f..429f69c34 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -43,7 +43,7 @@ void gl_SetTextureMode(int type); FRenderState gl_RenderState; CVAR(Bool, gl_direct_state_change, true, 0) -CVAR(Bool, gl_bandedswlight, true, CVAR_ARCHIVE) +CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE) static VSMatrix identityMatrix(1); From 949862f78f831ac96976840d896bd0ab72528609 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 24 Jan 2017 14:18:11 -0500 Subject: [PATCH 10/15] - fixed: PalTonemap Exponent slider didn't have a proper decimal place. --- wadsrc/static/menudef.zz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/menudef.zz b/wadsrc/static/menudef.zz index 606d21ab6..84ddb9448 100644 --- a/wadsrc/static/menudef.zz +++ b/wadsrc/static/menudef.zz @@ -257,6 +257,6 @@ OptionMenu "GLPrefOptions" Slider "$GLPREFMNU_SSAO_PORTALS", gl_ssao_portals, 0.0, 4.0, 1.0, 0 Option "$GLPREFMNU_FXAA", gl_fxaa, "FXAAQuality" StaticText " " - Slider "$GLPREFMNU_PALTONEMAPPOWER", gl_paltonemap_powtable, 0.2, 3.0, 0.1, 0 + Slider "$GLPREFMNU_PALTONEMAPPOWER", gl_paltonemap_powtable, 0.2, 3.0, 0.1, 1 Option "$GLPREFMNU_PALTONEMAPORDER", gl_paltonemap_reverselookup, "LookupOrder" } From 15b95cc02304ee4fd09d12fee03a488ec12b8b67 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 10:50:35 +0100 Subject: [PATCH 11/15] - fixed: DECORATE was creating a new global constant namespace for each single included file, not just once per DECORATE lump. --- src/r_data/sprites.cpp | 2 +- src/scripting/decorate/thingdef_parse.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/r_data/sprites.cpp b/src/r_data/sprites.cpp index b384211fc..7fb59ef94 100644 --- a/src/r_data/sprites.cpp +++ b/src/r_data/sprites.cpp @@ -63,7 +63,7 @@ static bool R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool if (frame >= MAX_SPRITE_FRAMES || rotation > 16) { - Printf (TEXTCOLOR_RED"R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars()); + Printf (TEXTCOLOR_RED "R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars()); return false; } diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index 9b78ef3d5..505585937 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -1217,9 +1217,8 @@ static void ParseDamageDefinition(FScanner &sc) // //========================================================================== -void ParseDecorate (FScanner &sc) +void ParseDecorate (FScanner &sc, PNamespace *ns) { - auto ns = Namespaces.NewNamespace(sc.LumpNum); // Get actor class name. for(;;) { @@ -1245,7 +1244,7 @@ void ParseDecorate (FScanner &sc) } FScanner newscanner; newscanner.Open(sc.String); - ParseDecorate(newscanner); + ParseDecorate(newscanner, ns); break; } @@ -1308,6 +1307,7 @@ void ParseAllDecorate() while ((lump = Wads.FindLump("DECORATE", &lastlump)) != -1) { FScanner sc(lump); - ParseDecorate(sc); + auto ns = Namespaces.NewNamespace(sc.LumpNum); + ParseDecorate(sc, ns); } } \ No newline at end of file From 08c252274ab3a5220cb0c9b5a79869b1c4f7d0d7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 12:02:47 +0100 Subject: [PATCH 12/15] - fixed issues with uninitialized RNGs and bad assumptions about corpse pointers always being fully initialized when being destroyed. Both of these may be true when occuring during normal gameplay, but not during an exception unwind in the serializer, which caused crashes if ACS errored out due to mismatched scripts. --- src/g_shared/a_action.cpp | 24 ++++++++++++++---------- src/m_random.cpp | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index ddfd23268..aed8457f8 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -142,21 +142,25 @@ void DCorpsePointer::OnDestroy () TThinkerIterator iterator (STAT_CORPSEPOINTER); DCorpsePointer *first = iterator.Next (); - int prevCount = first->Count; - - if (first == this) + // During a serialization unwind the thinker list won't be available. + if (first != nullptr) { - first = iterator.Next (); - } + int prevCount = first->Count; - if (first != NULL) - { - first->Count = prevCount - 1; - } + if (first == this) + { + first = iterator.Next(); + } + if (first != NULL) + { + first->Count = prevCount - 1; + } + + } if (Corpse != NULL) { - Corpse->Destroy (); + Corpse->Destroy(); } Super::OnDestroy(); } diff --git a/src/m_random.cpp b/src/m_random.cpp index 60ce12fd6..697bb173f 100644 --- a/src/m_random.cpp +++ b/src/m_random.cpp @@ -156,6 +156,7 @@ FRandom::FRandom () #endif Next = RNGList; RNGList = this; + Init(0); } //========================================================================== @@ -199,6 +200,7 @@ FRandom::FRandom (const char *name) Next = probe; *prev = this; + Init(0); } //========================================================================== From 1eb2c753288a8baf61535aed4c5d25f39013de7e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 16:14:53 +0100 Subject: [PATCH 13/15] - explode bouncing objects directly inside P_BounceActor if the bounce count expired. The calling code is too messed up to handle this cleanly. --- src/p_map.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index ac5ca10a7..4e5cc31fd 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3532,7 +3532,14 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop) || ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE)) || ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER))))) { - if (mo->bouncecount > 0 && --mo->bouncecount == 0) return false; + if (mo->bouncecount>0 && --mo->bouncecount == 0) + { + if (mo->flags & MF_MISSILE) + P_ExplodeMissile(mo, nullptr, nullptr); + else + mo->CallDie(nullptr, nullptr); + return true; + } if (mo->flags7 & MF7_HITTARGET) mo->target = BlockingMobj; if (mo->flags7 & MF7_HITMASTER) mo->master = BlockingMobj; From 46ee2c5ec685fc2f926a5008b0b582359e798727 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Fri, 27 Jan 2017 10:21:22 -0600 Subject: [PATCH 14/15] - Fixed HITTARGET, HITMASTER, HITTRACER, crash and xdeath states being broken on bouncing actors that die/explode. --- src/p_map.cpp | 4 ++-- src/p_mobj.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 4e5cc31fd..435478756 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3535,9 +3535,9 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop) if (mo->bouncecount>0 && --mo->bouncecount == 0) { if (mo->flags & MF_MISSILE) - P_ExplodeMissile(mo, nullptr, nullptr); + P_ExplodeMissile(mo, nullptr, BlockingMobj); else - mo->CallDie(nullptr, nullptr); + mo->CallDie(BlockingMobj, nullptr); return true; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 807326d78..bd31af4a1 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1814,15 +1814,18 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target) mo->effects = 0; // [RH] mo->flags &= ~MF_SHOOTABLE; - FState *nextstate=NULL; + FState *nextstate = nullptr; - if (target != NULL && ((target->flags & (MF_SHOOTABLE|MF_CORPSE)) || (target->flags6 & MF6_KILLED)) ) + if (target != nullptr) { if (mo->flags7 & MF7_HITTARGET) mo->target = target; if (mo->flags7 & MF7_HITMASTER) mo->master = target; if (mo->flags7 & MF7_HITTRACER) mo->tracer = target; - if (target->flags & MF_NOBLOOD) nextstate = mo->FindState(NAME_Crash); - if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme); + if ((target->flags & (MF_SHOOTABLE | MF_CORPSE)) || (target->flags6 & MF6_KILLED)) + { + if (target->flags & MF_NOBLOOD) nextstate = mo->FindState(NAME_Crash); + if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme); + } } if (nextstate == NULL) nextstate = mo->FindState(NAME_Death); From 97ad1496b34cbdb3a8c5523666c70e42b1d88b89 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 18:23:30 +0100 Subject: [PATCH 15/15] - changed all Hexen lights to being attenuated. --- wadsrc_lights/static/filter/hexen/gldefs.txt | 842 +++++++++++-------- 1 file changed, 484 insertions(+), 358 deletions(-) diff --git a/wadsrc_lights/static/filter/hexen/gldefs.txt b/wadsrc_lights/static/filter/hexen/gldefs.txt index 6c03da6db..d72b9c76f 100644 --- a/wadsrc_lights/static/filter/hexen/gldefs.txt +++ b/wadsrc_lights/static/filter/hexen/gldefs.txt @@ -9,25 +9,28 @@ // Charged Axe Puff flickerlight CAXEPUFF1 { - color 0.4 0.4 1.0 - size 40 - secondarySize 44 + attenuate 1 + color 0.4 0.4 1.0 + size 60 + secondarysize 66 chance 0.5 } flickerlight CAXEPUFF2 { - color 0.2 0.2 0.8 - size 48 - secondarySize 52 + attenuate 1 + color 0.2 0.2 0.8 + size 72 + secondarysize 78 chance 0.5 } flickerlight CAXEPUFF3 { - color 0.0 0.0 0.5 - size 44 - secondarySize 48 + attenuate 1 + color 0.0 0.0 0.5 + size 66 + secondarysize 72 chance 0.5 } @@ -45,57 +48,64 @@ object AxePuffGlow // Flying Hammer flickerlight THROWHAMMER { - color 1.0 0.2 0.0 - size 48 - secondarySize 52 + attenuate 1 + color 1.0 0.2 0.0 + size 72 + secondarysize 78 chance 0.4 } flickerlight THROWHAMMER_X1 { - color 1.0 0.7 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 1.0 0.7 0.0 + size 72 + secondarysize 84 chance 0.4 } flickerlight THROWHAMMER_X2 { - color 1.0 0.7 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.7 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight THROWHAMMER_X3 { - color 1.0 0.7 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 1.0 0.7 0.0 + size 108 + secondarysize 120 chance 0.4 } flickerlight THROWHAMMER_X4 { - color 0.8 0.8 0.0 - size 80 - secondarySize 84 + attenuate 1 + color 0.8 0.8 0.0 + size 120 + secondarysize 132 chance 0.4 } flickerlight THROWHAMMER_X5 { - color 0.5 0.5 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.5 0.5 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight THROWHAMMER_X6 { - color 0.2 0.2 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 0.2 0.2 0.0 + size 60 + secondarysize 72 chance 0.4 } @@ -125,49 +135,55 @@ object HammerMissile // Fighter sword shot flickerlight SWORDSHOT { - color 0.0 1.0 0.0 - size 48 - secondarySize 44 + attenuate 1 + color 0.0 1.0 0.0 + size 72 + secondarysize 66 chance 0.4 } flickerlight SWORDSHOT_X1 { - color 0.0 1.0 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.0 1.0 0.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight SWORDSHOT_X2 { - color 0.0 1.0 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.0 1.0 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight SWORDSHOT_X3 { - color 0.0 0.7 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.0 0.7 0.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight SWORDSHOT_X4 { - color 0.0 0.4 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 0.0 0.4 0.0 + size 60 + secondarysize 72 chance 0.4 } flickerlight SWORDSHOT_X5 { - color 0.0 0.2 0.0 - size 32 - secondarySize 40 + attenuate 1 + color 0.0 0.2 0.0 + size 48 + secondarysize 60 chance 0.4 } @@ -191,39 +207,44 @@ object FSwordMissile // Cleric Serpent Staff ball pointlight CSTAFFBALL { - color 0.0 1.0 0.0 - size 40 + attenuate 1 + color 0.0 1.0 0.0 + size 60 } flickerlight CSTAFFBALL_X1 { - color 0.0 1.0 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.0 1.0 0.0 + size 84 + secondarysize 96 chance 0.3 } flickerlight CSTAFFBALL_X2 { - color 0.0 0.7 0.0 - size 60 - secondarySize 68 + attenuate 1 + color 0.0 0.7 0.0 + size 90 + secondarysize 104 chance 0.3 } flickerlight CSTAFFBALL_X3 { - color 0.0 0.5 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.0 0.5 0.0 + size 96 + secondarysize 108 chance 0.3 } flickerlight CSTAFFBALL_X4 { - color 0.0 0.3 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 0.0 0.3 0.0 + size 108 + secondarysize 120 chance 0.3 } @@ -241,49 +262,55 @@ object CStaffMissile // Cleric fire hands flickerlight CFLAMETRAIL { - color 1.0 0.8 0.0 - size 40 - secondarySize 44 + attenuate 1 + color 1.0 0.8 0.0 + size 60 + secondarysize 66 chance 0.5 } flickerlight CFLAME1 { - color 1.0 0.8 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 1.0 0.8 0.0 + size 72 + secondarysize 84 chance 0.4 } flickerlight CFLAME2 { - color 1.0 0.8 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.8 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight CFLAME3 { - color 0.7 0.4 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 0.7 0.4 0.0 + size 72 + secondarysize 84 chance 0.4 } flickerlight CFLAME4 { - color 0.5 0.2 0.0 - size 32 - secondarySize 40 + attenuate 1 + color 0.5 0.2 0.0 + size 48 + secondarysize 60 chance 0.4 } flickerlight CFLAME5 { - color 0.2 0.2 0.0 - size 24 - secondarySize 32 + attenuate 1 + color 0.2 0.2 0.0 + size 36 + secondarysize 48 chance 0.4 } @@ -310,9 +337,10 @@ object CFlameFloor // Wraithverge flickerlight GHOST { - color 1.0 1.0 1.0 - size 56 - secondarySize 52 + attenuate 1 + color 1.0 1.0 1.0 + size 84 + secondarysize 78 chance 0.7 subtractive 1 } @@ -331,26 +359,30 @@ object HolySpirit // Mage wand pointlight MWAND_X1 { - color 0.3 0.3 1.0 - size 32 + attenuate 1 + color 0.3 0.3 1.0 + size 48 } pointlight MWAND_X2 { - color 0.2 0.2 0.8 - size 40 + attenuate 1 + color 0.2 0.2 0.8 + size 60 } pointlight MWAND_X3 { - color 0.1 0.1 0.6 - size 48 + attenuate 1 + color 0.1 0.1 0.6 + size 72 } pointlight MWAND_X4 { - color 0.0 0.0 0.4 - size 56 + attenuate 1 + color 0.0 0.0 0.4 + size 84 } object MageWandMissile @@ -364,41 +396,46 @@ object MageWandMissile // Frost shards flickerlight MFROSTSHARD { - color 0.3 0.3 1.0 - size 32 - secondarySize 40 + attenuate 1 + color 0.3 0.3 1.0 + size 48 + secondarysize 60 chance 0.3 } flickerlight MFROSTSHARD_X1 { - color 0.3 0.3 1.0 - size 40 - secondarySize 48 + attenuate 1 + color 0.3 0.3 1.0 + size 60 + secondarysize 72 chance 0.3 } flickerlight MFROSTSHARD_X2 { - color 0.2 0.2 0.8 - size 48 - secondarySize 56 + attenuate 1 + color 0.2 0.2 0.8 + size 72 + secondarysize 84 chance 0.3 } flickerlight MFROSTSHARD_X3 { - color 0.1 0.1 0.5 - size 56 - secondarySize 64 + attenuate 1 + color 0.1 0.1 0.5 + size 84 + secondarysize 96 chance 0.3 } flickerlight MFROSTSHARD_X4 { - color 0.0 0.0 0.2 - size 64 - secondarySize 68 + attenuate 1 + color 0.0 0.0 0.2 + size 96 + secondarysize 104 chance 0.3 } @@ -415,9 +452,10 @@ object FrostMissile // Mage lightning flickerlight MAGELIGHT { - color 0.4 0.4 1.0 - size 48 - secondarySize 52 + attenuate 1 + color 0.4 0.4 1.0 + size 72 + secondarysize 78 chance 0.7 } @@ -442,41 +480,46 @@ object LightningZap // BloodScourge flickerlight BSBALL { - color 1.0 0.2 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 1.0 0.2 0.0 + size 72 + secondarysize 84 chance 0.3 } flickerlight BSBALL_X1 { - color 1.0 0.4 0.0 - size 24 - secondarySize 28 + attenuate 1 + color 1.0 0.4 0.0 + size 36 + secondarysize 42 chance 0.3 } flickerlight BSBALL_X2 { - color 0.7 0.3 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 0.7 0.3 0.0 + size 72 + secondarysize 84 chance 0.3 } flickerlight BSBALL_X3 { - color 0.5 0.2 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.5 0.2 0.0 + size 96 + secondarysize 108 chance 0.3 } flickerlight BSBALL_X4 { - color 0.3 0.1 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 0.3 0.1 0.0 + size 60 + secondarysize 72 chance 0.3 } @@ -500,39 +543,44 @@ object MageStaffFX2 // Stalker slimeball pointlight STALKERSLIME { - color 0.0 1.0 0.0 - size 40 + attenuate 1 + color 0.0 1.0 0.0 + size 60 } flickerlight STALKERSLIME_X1 { - color 0.0 1.0 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 0.0 1.0 0.0 + size 72 + secondarysize 84 chance 0.4 } flickerlight STALKERSLIME_X2 { - color 0.0 0.7 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.0 0.7 0.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight STALKERSLIME_X3 { - color 0.0 0.5 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.0 0.5 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight STALKERSLIME_X4 { - color 0.0 0.2 0.0 - size 68 - secondarySize 76 + attenuate 1 + color 0.0 0.2 0.0 + size 104 + secondarysize 114 chance 0.4 } @@ -552,39 +600,44 @@ object SerpentFX // Centaur fireball pointlight TAURBALL { - color 0.2 0.2 1.0 - size 48 + attenuate 1 + color 0.2 0.2 1.0 + size 72 } flickerlight TAURBALL_X1 { - color 0.2 0.2 1.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.2 0.2 1.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight TAURBALL_X2 { - color 0.2 0.2 0.7 - size 64 - secondarySize 72 + attenuate 1 + color 0.2 0.2 0.7 + size 96 + secondarysize 108 chance 0.4 } flickerlight TAURBALL_X3 { - color 0.1 0.1 0.5 - size 72 - secondarySize 80 + attenuate 1 + color 0.1 0.1 0.5 + size 108 + secondarysize 120 chance 0.4 } flickerlight TAURBALL_X4 { - color 0.0 0.0 0.3 - size 80 - secondarySize 88 + attenuate 1 + color 0.0 0.0 0.3 + size 120 + secondarysize 132 chance 0.4 } @@ -602,41 +655,46 @@ object CentaurFX // Green Chaos Serpent fireball flickerlight SERPENTBALL { - color 1.0 0.95 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 1.0 0.95 0.0 + size 84 + secondarysize 96 chance 0.5 } flickerlight SERPENTBALL_X1 { - color 1.0 0.95 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.95 0.0 + size 96 + secondarysize 108 chance 0.5 } flickerlight SERPENTBALL_X2 { - color 0.8 0.8 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 0.8 0.8 0.0 + size 108 + secondarysize 120 chance 0.5 } flickerlight SERPENTBALL_X3 { - color 0.5 0.5 0.0 - size 88 - secondarySize 96 + attenuate 1 + color 0.5 0.5 0.0 + size 132 + secondarysize 144 chance 0.5 } flickerlight SERPENTBALL_X4 { - color 0.2 0.2 0.0 - size 96 - secondarySize 104 + attenuate 1 + color 0.2 0.2 0.0 + size 144 + secondarysize 156 chance 0.5 } @@ -656,39 +714,44 @@ object Demon1FX1 // Brown Chaos Serpent gasball pointlight CSGASBALL { - color 0.0 1.0 0.0 - size 48 + attenuate 1 + color 0.0 1.0 0.0 + size 72 } flickerlight CSGASBALL_X1 { - color 0.0 1.0 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.0 1.0 0.0 + size 96 + secondarysize 108 chance 0.5 } flickerlight CSGASBALL_X2 { - color 0.0 0.8 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 0.0 0.8 0.0 + size 108 + secondarysize 120 chance 0.5 } flickerlight CSGASBALL_X3 { - color 0.0 0.5 0.0 - size 88 - secondarySize 96 + attenuate 1 + color 0.0 0.5 0.0 + size 132 + secondarysize 144 chance 0.5 } flickerlight CSGASBALL_X4 { - color 0.0 0.2 0.0 - size 96 - secondarySize 104 + attenuate 1 + color 0.0 0.2 0.0 + size 144 + secondarysize 156 chance 0.5 } @@ -712,29 +775,33 @@ object Demon2FX1 // Reaver fireball pointlight REAVERBALL { - color 1.0 0.5 0.0 - size 48 + attenuate 1 + color 1.0 0.5 0.0 + size 72 } flickerlight REAVERBALL_X1 { - color 1.0 0.7 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.7 0.0 + size 96 + secondarysize 108 } flickerlight REAVERBALL_X2 { - color 0.6 0.2 0.0 - size 60 - secondarySize 68 + attenuate 1 + color 0.6 0.2 0.0 + size 90 + secondarysize 104 } flickerlight REAVERBALL_X3 { - color 0.2 0.0 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.2 0.0 0.0 + size 84 + secondarysize 96 } object WraithFX1 @@ -751,9 +818,10 @@ object WraithFX1 // Dragon Fireball flickerlight DRAGONBALL { - color 1.0 1.0 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 1.0 0.0 + size 96 + secondarysize 108 chance 0.3 } @@ -775,33 +843,37 @@ object DragonFireball flickerlight DRAGONBALL_X1 { - color 0.8 0.8 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 0.8 0.8 0.0 + size 108 + secondarysize 120 chance 0.3 } flickerlight DRAGONBALL_X2 { - color 0.6 0.6 0.0 - size 96 - secondarySize 104 + attenuate 1 + color 0.6 0.6 0.0 + size 144 + secondarysize 156 chance 0.3 } flickerlight DRAGONBALL_X3 { - color 0.4 0.4 0.0 - size 88 - secondarySize 96 + attenuate 1 + color 0.4 0.4 0.0 + size 132 + secondarysize 144 chance 0.3 } flickerlight DRAGONBALL_X4 { - color 0.2 0.2 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.2 0.2 0.0 + size 96 + secondarysize 108 chance 0.3 } @@ -819,39 +891,44 @@ object DragonExplosion // Bishop fireball pointlight BISHOPBALL { - color 0.6 1.0 0.0 - size 48 + attenuate 1 + color 0.6 1.0 0.0 + size 72 } flickerlight BISHOPBALL_X1 { - color 0.6 1.0 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.6 1.0 0.0 + size 84 + secondarysize 96 chance 0.3 } flickerlight BISHOPBALL_X2 { - color 0.2 0.8 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.2 0.8 0.0 + size 96 + secondarysize 108 chance 0.3 } flickerlight BISHOPBALL_X3 { - color 0.1 0.5 0.0 - size 72 - secondarySize 80 + attenuate 1 + color 0.1 0.5 0.0 + size 108 + secondarysize 120 chance 0.3 } flickerlight BISHOPBALL_X4 { - color 0.0 0.3 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.0 0.3 0.0 + size 84 + secondarysize 96 chance 0.3 } @@ -871,41 +948,46 @@ object BishopFX // Fire gargoyle flickerlight FGARG { - color 1.0 1.0 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 1.0 1.0 0.0 + size 60 + secondarysize 72 chance 0.4 } flickerlight FGARGATK { - color 1.0 1.0 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 1.0 1.0 0.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight FGARGBALL_X1 { - color 0.8 0.8 0.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.8 0.8 0.0 + size 84 + secondarysize 96 chance 0.4 } flickerlight FGARGBALL_X2 { - color 0.5 0.5 0.0 - size 50 - secondarySize 54 + attenuate 1 + color 0.5 0.5 0.0 + size 75 + secondarysize 81 chance 0.4 } flickerlight FGARGBALL_X3 { - color 0.2 0.2 0.0 - size 44 - secondarySize 48 + attenuate 1 + color 0.2 0.2 0.0 + size 66 + secondarysize 72 chance 0.4 } @@ -934,52 +1016,59 @@ object FireDemonMissile // Wendigo pointlight ICEGUYATK { - color 0.3 0.3 1.0 - size 64 + attenuate 1 + color 0.3 0.3 1.0 + size 96 } pointlight ICEBALL { - color 0.3 0.3 1.0 - size 56 + attenuate 1 + color 0.3 0.3 1.0 + size 84 } flickerlight ICEBALL_X1 { - color 0.3 0.3 1.0 - size 56 - secondarySize 64 + attenuate 1 + color 0.3 0.3 1.0 + size 84 + secondarysize 96 chance 0.3 } flickerlight ICEBALL_X2 { - color 0.3 0.3 0.7 - size 64 - secondarySize 72 + attenuate 1 + color 0.3 0.3 0.7 + size 96 + secondarysize 108 chance 0.3 } flickerlight ICEBALL_X3 { - color 0.2 0.2 0.4 - size 72 - secondarySize 74 + attenuate 1 + color 0.2 0.2 0.4 + size 108 + secondarysize 111 chance 0.3 } flickerlight ICEBALL_X4 { - color 0.0 0.0 0.2 - size 74 - secondarySize 80 + attenuate 1 + color 0.0 0.0 0.2 + size 111 + secondarysize 120 chance 0.3 } pointlight ICESHARD { - color 0.3 0.3 1.0 - size 40 + attenuate 1 + color 0.3 0.3 1.0 + size 60 } object IceGuyFX @@ -1009,83 +1098,94 @@ object IceGuy // Heresiarch flickerlight HARCHATK { - color 1.0 0.0 1.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.0 1.0 + size 96 + secondarysize 108 chance 0.4 } pointlight HARCHBLUCUBE { - color 0.0 0.0 1.0 - size 32 + attenuate 1 + color 0.0 0.0 1.0 + size 48 } pointlight HARCHGRNCUBE { - color 0.0 1.0 0.0 - size 32 + attenuate 1 + color 0.0 1.0 0.0 + size 48 } pointlight HARCHPURCUBE { - color 1.0 0.0 1.0 - size 32 + attenuate 1 + color 1.0 0.0 1.0 + size 48 } flickerlight HARCHBALL_X1 { - color 0.8 0.0 0.8 - size 48 - secondarySize 56 + attenuate 1 + color 0.8 0.0 0.8 + size 72 + secondarysize 84 chance 0.4 } flickerlight HARCHBALL_X2 { - color 0.5 0.0 0.5 - size 64 - secondarySize 72 + attenuate 1 + color 0.5 0.0 0.5 + size 96 + secondarysize 108 chance 0.4 } flickerlight HARCHBALL_X3 { - color 0.2 0.0 0.2 - size 72 - secondarySize 76 + attenuate 1 + color 0.2 0.0 0.2 + size 108 + secondarysize 114 chance 0.4 } flickerlight HARCHBALL2_X1 { - color 0.0 0.8 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 0.0 0.8 0.0 + size 72 + secondarysize 84 chance 0.4 } flickerlight HARCHBALL2_X2 { - color 0.0 0.5 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 0.0 0.5 0.0 + size 96 + secondarysize 108 chance 0.4 } flickerlight HARCHBALL2_X3 { - color 0.0 0.2 0.0 - size 72 - secondarySize 76 + attenuate 1 + color 0.0 0.2 0.0 + size 108 + secondarysize 114 chance 0.4 } flickerlight HARCHHEAD { - color 1.0 0.5 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 1.0 0.5 0.0 + size 72 + secondarysize 84 chance 0.4 } @@ -1154,9 +1254,10 @@ object Korax // Candles flickerlight2 HCANDLES { - color 1.0 1.0 0.0 - size 16 - secondarySize 20 + attenuate 1 + color 1.0 1.0 0.0 + size 24 + secondarysize 30 interval 0.1 } @@ -1168,9 +1269,10 @@ object ZCandle // Twined torch flickerlight2 TWINETORCH { - color 1.0 0.7 0.0 - size 46 - secondarySize 52 + attenuate 1 + color 1.0 0.7 0.0 + size 69 + secondarysize 78 interval 0.1 offset 0 64 0 } @@ -1203,9 +1305,10 @@ object ZTwinedTorchUnlit // Wall torch flickerlight2 WALLTORCH2 { - color 1.0 0.7 0.0 - size 24 - secondarySize 28 + attenuate 1 + color 1.0 0.7 0.0 + size 36 + secondarysize 42 interval 0.1 offset 0 24 0 } @@ -1239,18 +1342,20 @@ object ZWallTorchUnlit // Fire bull flickerlight2 FIREBULL { - color 1.0 0.7 0.0 - size 64 - secondarySize 70 + attenuate 1 + color 1.0 0.7 0.0 + size 96 + secondarysize - 105 interval 0.1 offset 0 40 0 } flickerlight2 FIREBULL2 { - color 1.0 0.7 0.0 - size 48 - secondarySize 60 + attenuate 1 + color 1.0 0.7 0.0 + size 72 + secondarysize 90 interval 0.1 offset 0 40 0 } @@ -1285,9 +1390,10 @@ object ZFireBullUnlit // Cauldron flickerlight2 CAULFLAME { - color 1.0 0.9 0.0 - size 24 - secondarySize 26 + attenuate 1 + color 1.0 0.9 0.0 + size 36 + secondarysize 39 interval 0.1 } @@ -1316,9 +1422,10 @@ object ZCauldronUnlit // Blue candle flickerlight2 BCANDLE { - color 0.3 0.3 1.0 - size 14 - secondarySize 16 + attenuate 1 + color 0.3 0.3 1.0 + size 21 + secondarysize 24 interval 0.1 } @@ -1341,9 +1448,10 @@ object FlameSmallTemp // Large flame flickerlight2 LARGEFLAME { - color 1.0 0.7 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 1.0 0.7 0.0 + size 60 + secondarysize 72 interval 0.1 } @@ -1360,9 +1468,10 @@ object FlameLargeTemp // Chandelier flickerlight2 CHANDELIER { - color 1.0 1.0 0.0 - size 64 - secondarySize 68 + attenuate 1 + color 1.0 1.0 0.0 + size 96 + secondarysize 104 interval 0.1 } @@ -1374,9 +1483,10 @@ object ZChandelier // Brass torch flickerlight2 BRASSTORCH { - color 1.0 0.7 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 1.0 0.7 0.0 + size 60 + secondarysize 72 interval 0.1 offset 0 32 0 } @@ -1395,9 +1505,10 @@ object FireThing // Teleport smoke flickerlight2 TELESMOKE { - color 1.0 0.0 0.0 - size 64 - secondarySize 72 + attenuate 1 + color 1.0 0.0 0.0 + size 96 + secondarysize 108 interval 0.1 offset 0 44 0 } @@ -1410,8 +1521,9 @@ object TeleSmoke // Fireball pointlight HFIREBALL { - color 1.0 0.4 0.0 - size 48 + attenuate 1 + color 1.0 0.4 0.0 + size 72 } object FireBall @@ -1427,8 +1539,9 @@ object FireBall // Blue mana pointlight MANA1 { - color 0.0 0.0 0.7 - size 24 + attenuate 1 + color 0.0 0.0 0.7 + size 36 offset 0 36 0 } @@ -1440,8 +1553,9 @@ object Mana1 // Green mana pointlight MANA2 { - color 0.0 0.6 0.0 - size 24 + attenuate 1 + color 0.0 0.6 0.0 + size 36 offset 0 36 0 } @@ -1453,8 +1567,9 @@ object Mana2 // Combined mana pointlight MANA3 { - color 0.7 0.0 0.0 - size 24 + attenuate 1 + color 0.7 0.0 0.0 + size 36 offset 0 36 0 } @@ -1466,9 +1581,10 @@ object Mana3 // ZXmasTree flickerlight2 XMASFIRE1 { - color 1.0 0.7 0.0 - size 16 - secondarySize 24 + attenuate 1 + color 1.0 0.7 0.0 + size 24 + secondarysize 36 interval 0.1 offset 0 48 0 } @@ -1476,9 +1592,10 @@ flickerlight2 XMASFIRE1 flickerlight2 XMASFIRE2 { - color 1.0 0.8 0.0 - size 32 - secondarySize 48 + attenuate 1 + color 1.0 0.8 0.0 + size 48 + secondarysize 72 interval 0.1 offset 0 48 0 } @@ -1486,9 +1603,10 @@ flickerlight2 XMASFIRE2 flickerlight2 XMASFIRE3 { - color 1.0 0.9 0.0 - size 48 - secondarySize 64 + attenuate 1 + color 1.0 0.9 0.0 + size 72 + secondarysize 96 interval 0.1 offset 0 32 0 } @@ -1496,9 +1614,10 @@ flickerlight2 XMASFIRE3 flickerlight2 XMASFIRE4 { - color 1.0 0.8 0.0 - size 32 - secondarySize 40 + attenuate 1 + color 1.0 0.8 0.0 + size 48 + secondarysize 60 interval 0.1 offset 0 120 0 } @@ -1506,9 +1625,10 @@ flickerlight2 XMASFIRE4 flickerlight2 XMASFIRE5 { - color 1.0 0.7 0.0 - size 12 - secondarySize 20 + attenuate 1 + color 1.0 0.7 0.0 + size 18 + secondarysize 30 interval 0.1 offset 0 140 0 } @@ -1516,9 +1636,10 @@ flickerlight2 XMASFIRE5 flickerlight2 XMASFIRE6 { - color 1.0 0.8 0.0 - size 10 - secondarySize 14 + attenuate 1 + color 1.0 0.8 0.0 + size 15 + secondarysize 21 interval 0.1 offset 0 148 0 } @@ -1541,9 +1662,10 @@ object ZXmasTree // TreeDestructible flickerlight2 TDESTRUCT1 { - color 1.0 0.8 0.0 - size 48 - secondarySize 56 + attenuate 1 + color 1.0 0.8 0.0 + size 72 + secondarysize 84 interval 0.1 offset 0 32 0 } @@ -1551,9 +1673,10 @@ flickerlight2 TDESTRUCT1 flickerlight2 TDESTRUCT2 { - color 1.0 0.9 0.0 - size 56 - secondarySize 72 + attenuate 1 + color 1.0 0.9 0.0 + size 84 + secondarysize 108 interval 0.1 offset 0 32 0 } @@ -1561,9 +1684,10 @@ flickerlight2 TDESTRUCT2 flickerlight2 TDESTRUCT3 { - color 1.0 0.8 0.0 - size 40 - secondarySize 48 + attenuate 1 + color 1.0 0.8 0.0 + size 60 + secondarysize 72 interval 0.1 offset 0 20 0 } @@ -1571,18 +1695,20 @@ flickerlight2 TDESTRUCT3 flickerlight2 TDESTRUCT4 { - color 1.0 0.7 0.0 - size 16 - secondarySize 24 + attenuate 1 + color 1.0 0.7 0.0 + size 24 + secondarysize 36 interval 0.1 offset 0 12 0 } flickerlight2 TDESTRUCT5 { - color 1.0 0.7 0.0 - size 8 - secondarySize 12 + attenuate 1 + color 1.0 0.7 0.0 + size 12 + secondarysize 18 interval 0.1 offset 0 4 0 }