From 9098bc1a465f6c5764d2eef1d5246ad519ce551b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Dec 2008 12:02:08 +0000 Subject: [PATCH] - Added a constant name for Skulltag's 128 flag for A_SpawnItemEx. For compatibility ZDoom needs to define this name, too, even though it doesn't use it. - Fixed: The nodebuilder could hang on badly set up polyobjects. Now it aborts when the loop iterates NumberOfSegs times. SVN r1338 (trunk) --- docs/rh-log.txt | 7 +++++++ src/g_shared/sbar_mugshot.cpp | 2 +- src/nodebuild_utility.cpp | 4 +++- wadsrc/static/actors/constants.txt | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6c1ab6d57e..6f0d91171d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,10 @@ +December 31, 2008 (Changes by Graf Zahl) +- Added a constant name for Skulltag's 128 flag for A_SpawnItemEx. For + compatibility ZDoom needs to define this name, too, even though it doesn't + use it. +- Fixed: The nodebuilder could hang on badly set up polyobjects. Now it aborts + when the loop iterates NumberOfSegs times. + December 30, 2008 (Changes by Graf Zahl) - Fixed: FMOD calls for setting the water reverb must check the return code for errors. diff --git a/src/g_shared/sbar_mugshot.cpp b/src/g_shared/sbar_mugshot.cpp index aa1117cdf9..28479684dd 100644 --- a/src/g_shared/sbar_mugshot.cpp +++ b/src/g_shared/sbar_mugshot.cpp @@ -251,7 +251,7 @@ void FMugShot::Tick(player_t *player) CurrentState = NULL; } } - if ((player->cmd.ucmd.buttons & (BT_ATTACK|BT_ALTATTACK)) && !(player->cheats & (CF_FROZEN | CF_TOTALLYFROZEN))) + if ((player->cmd.ucmd.buttons & (BT_ATTACK|BT_ALTATTACK)) && !(player->cheats & (CF_FROZEN | CF_TOTALLYFROZEN)) && player->ReadyWeapon) { if (RampageTimer != ST_RAMPAGEDELAY) { diff --git a/src/nodebuild_utility.cpp b/src/nodebuild_utility.cpp index a7e136c797..112defcda8 100644 --- a/src/nodebuild_utility.cpp +++ b/src/nodebuild_utility.cpp @@ -440,6 +440,7 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4]) { vertex_t start; unsigned int vert; + unsigned int count = 0; vert = Segs[i].v1; @@ -451,7 +452,8 @@ bool FNodeBuilder::GetPolyExtents (int polynum, fixed_t bbox[4]) AddSegToBBox (bbox, &Segs[i]); vert = Segs[i].v2; i = Vertices[vert].segs; - } while (i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y)); + count++; // to prevent endless loops. Stop when this reaches the number of segs. + } while (i != DWORD_MAX && (Vertices[vert].x != start.x || Vertices[vert].y != start.y) && count < Segs.Size()); return true; } diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 17b1a1ea5a..127aeb8609 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -13,7 +13,7 @@ const int SXF_ABSOLUTEMOMENTUM=8; const int SXF_SETMASTER=16; const int SXF_NOCHECKPOSITION = 32; const int SXF_TELEFRAG=64; -// 128 was uses by Skulltag +const int SXF_CLIENTSPAWN=128; // only used by Skulltag const int SXF_TRANSFERAMBUSHFLAG=256; // Flags for A_Chase