From 1c50b5dd6f764eb70f29624cead70a929ffeab9c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 20 Apr 2014 13:37:59 +0300 Subject: [PATCH 1/3] Fixed initialization of Hexen-style things Recently added pitch and roll members were not initialized with zeroes when loading Hexen-style maps At least, hitscan attack can be fired in random direction because of this --- src/p_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 77b9b077b..c564d1aa7 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1826,6 +1826,8 @@ void P_LoadThings2 (MapData * map) for(int i = 0; i< numthings; i++) { + memset (&mti[i], 0, sizeof(mti[i])); + mti[i].thingid = LittleShort(mth[i].thingid); mti[i].x = LittleShort(mth[i].x)<> MTF_CLASS_SHIFT; mti[i].flags &= ~(MTF_SKILLMASK|MTF_CLASS_MASK); - mti[i].Conversation = 0; mti[i].gravity = FRACUNIT; mti[i].RenderStyle = STYLE_Count; mti[i].alpha = -1; mti[i].health = 1; - mti[i].fillcolor = mti[i].scaleX = mti[i].scaleY = mti[i].score = 0; } delete[] mtp; } From 265917c923bb33bac32d91ad15ebbf79b1d169dc Mon Sep 17 00:00:00 2001 From: Gaerzi Date: Tue, 22 Apr 2014 13:31:55 +0200 Subject: [PATCH 2/3] Add shadow and subtract styles to ACS. There is a matching pull request for rheit/acs. --- src/p_acs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4cb34defa..1c84c9401 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3546,6 +3546,8 @@ static const int LegacyRenderStyleIndices[] = 65, // STYLE_Add, 66, // STYLE_Shaded, 67, // STYLE_TranslucentStencil, + 68, // STYLE_Shadow, + 69, // STYLE_Subtract, -1 }; From 7c3660087ed7fc1db18c0ae38285a14f6f5a5c9f Mon Sep 17 00:00:00 2001 From: Gaerzi Date: Tue, 22 Apr 2014 13:32:33 +0200 Subject: [PATCH 3/3] Restore shadow renderstyle. It was accidentally lost in r3085. --- src/thingdef/thingdef_properties.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 61ab5b968..4e4fb4218 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -796,11 +796,13 @@ DEFINE_PROPERTY(renderstyle, S, Actor) { PROP_STRING_PARM(str, 0); static const char * renderstyles[]={ - "NONE", "NORMAL", "FUZZY", "SOULTRANS", "OPTFUZZY", "STENCIL", "TRANSLUCENT", "ADD", "SHADED", "SUBTRACT", NULL }; + "NONE", "NORMAL", "FUZZY", "SOULTRANS", "OPTFUZZY", "STENCIL", + "TRANSLUCENT", "ADD", "SHADED", "SHADOW", "SUBTRACT", NULL }; static const int renderstyle_values[]={ STYLE_None, STYLE_Normal, STYLE_Fuzzy, STYLE_SoulTrans, STYLE_OptFuzzy, - STYLE_TranslucentStencil, STYLE_Translucent, STYLE_Add, STYLE_Shaded, STYLE_Subtract}; + STYLE_TranslucentStencil, STYLE_Translucent, STYLE_Add, STYLE_Shaded, + STYLE_Shadow, STYLE_Subtract}; // make this work for old style decorations, too. if (!strnicmp(str, "style_", 6)) str+=6;