From 1c50b5dd6f764eb70f29624cead70a929ffeab9c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 20 Apr 2014 13:37:59 +0300 Subject: [PATCH] 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; }