From c6d8125b455625ace7c2a2911de5d822d39847da Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 22 Jun 2016 13:35:03 +0200 Subject: [PATCH 1/8] - fixed FraggleScript's resurrect function to call AActor::Revive to ensure that everything gets reset. --- src/fragglescript/t_func.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index f8648808d..ef4f65d34 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3473,12 +3473,7 @@ void FParser::SF_Resurrect() mo->SetState(state); mo->Height = mo->GetDefault()->Height; mo->radius = mo->GetDefault()->radius; - mo->flags = mo->GetDefault()->flags; - mo->flags2 = mo->GetDefault()->flags2; - mo->flags3 = mo->GetDefault()->flags3; - mo->flags4 = mo->GetDefault()->flags4; - mo->flags5 = mo->GetDefault()->flags5; - mo->health = mo->GetDefault()->health; + mo->Revive(); mo->target = NULL; } } From a3450ab8243b42364b03bfedc46f92ac0d45d6f1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 22 Jun 2016 13:37:35 +0200 Subject: [PATCH 2/8] - removed unused cruft in FS code. --- src/fragglescript/t_func.cpp | 64 ------------------------------------ 1 file changed, 64 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index ef4f65d34..aabe797ef 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3761,30 +3761,6 @@ void FParser::SF_SetCorona(void) t_return.value.i = 0; } -//========================================================================== -// -// new for GZDoom: Call a Hexen line special (deprecated, superseded by direct use) -// -//========================================================================== - -void FParser::SF_Ls() -{ - int args[5]={0,0,0,0,0}; - int spc; - - if (CheckArgs(1)) - { - spc=intvalue(t_argv[0]); - for(int i=0;i<5;i++) - { - if (t_argc>=i+2) args[i]=intvalue(t_argv[i+1]); - } - if (spc>=0 && spc<256) - P_ExecuteSpecial(spc, NULL,Script->trigger,false, args[0],args[1],args[2],args[3],args[4]); - } -} - - //========================================================================== // // new for GZDoom: Gets the levelnum @@ -4019,17 +3995,6 @@ void FParser::SF_KillInSector() } } -//========================================================================== -// -// new for GZDoom: Sets a sector's type -// -//========================================================================== - -void FParser::SF_SectorType(void) -{ - // I don't think this was ever used publicly so I'm not going to bother fixing it. -} - //========================================================================== // // new for GZDoom: Sets a new line trigger type (Doom format!) @@ -4064,30 +4029,6 @@ void FParser::SF_SetLineTrigger() } -//========================================================================== -// -// -// -//========================================================================== - -void FParser::SF_ChangeTag() -{ - // Development garbage! -} - - -//========================================================================== -// -// -// -//========================================================================== - -void FParser::SF_WallGlow() -{ - // Development garbage! -} - - //========================================================================== // // new for GZDoom: Call a Hexen line special @@ -4505,13 +4446,10 @@ void init_functions(void) // new for GZDoom gscr->NewFunction("spawnshot2", &FParser::SF_SpawnShot2); gscr->NewFunction("setcolor", &FParser::SF_SetColor); - gscr->NewFunction("sectortype", &FParser::SF_SectorType); - gscr->NewFunction("wallglow", &FParser::SF_WallGlow); gscr->NewFunction("objradius", &FParser::SF_MobjRadius); gscr->NewFunction("objheight", &FParser::SF_MobjHeight); gscr->NewFunction("thingcount", &FParser::SF_ThingCount); gscr->NewFunction("killinsector", &FParser::SF_KillInSector); - gscr->NewFunction("changetag", &FParser::SF_ChangeTag); gscr->NewFunction("levelnum", &FParser::SF_LevelNum); // new inventory @@ -4520,8 +4458,6 @@ void init_functions(void) gscr->NewFunction("checkinventory", &FParser::SF_CheckInventory); gscr->NewFunction("setweapon", &FParser::SF_SetWeapon); - gscr->NewFunction("ls", &FParser::SF_Ls); // execute Hexen type line special - // Dummies - shut up warnings gscr->NewFunction("setcorona", &FParser::SF_SetCorona); } From f8ae166281a07b7b0f235e7186f3c580b7d3f420 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Jun 2016 12:01:11 +0200 Subject: [PATCH 3/8] - fixed return value inversion of FS's ceilingheight and floorheight functions. --- src/fragglescript/t_func.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index aabe797ef..f02843c89 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -1573,7 +1573,7 @@ void FParser::SF_FloorHeight(void) sectors[i].floorplane.PointToDist (sectors[i].centerspot, dest), crush? 10:-1, (dest > sectors[i].CenterFloor()) ? 1 : -1, - false) != EMoveResult::crushed) + false) == EMoveResult::crushed) { returnval = 0; } @@ -1662,7 +1662,7 @@ void FParser::SF_CeilingHeight(void) sectors[i].ceilingplane.PointToDist (sectors[i].centerspot, dest), crush? 10:-1, (dest > sectors[i].CenterCeiling()) ? 1 : -1, - false) != EMoveResult::crushed) + false) == EMoveResult::crushed) { returnval = 0; } From 6cf96372ba363ef9f9674f97cb43736f53984e60 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 29 Jun 2016 12:13:24 +0200 Subject: [PATCH 4/8] - fixed: incorrect flag masking for polyobjects disabled all line portals. --- src/portal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/portal.cpp b/src/portal.cpp index f180a4fbf..bf919f09a 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -288,7 +288,7 @@ static void SetRotation(FLinePortal *port) } else { - port->mFlags &= PORTF_POLYOBJ; + port->mFlags &= ~PORTF_POLYOBJ; } } else From 41d20fa6cf585b83ac64c2269a0b5c55cc10a656 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Thu, 23 Jun 2016 10:28:05 -0500 Subject: [PATCH 5/8] Fixed freeze with A_ClearOverlays. --- src/p_pspr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index ebfc14da3..e63490110 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -1169,8 +1169,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearOverlays) int count = 0; DPSprite *pspr = player->psprites; + int startID = (pspr != nullptr) ? pspr->GetID() : start; + bool first = true; while (pspr != nullptr) { + if (pspr->GetID() == startID) + { + if (first) + first = false; + else + break; + } int id = pspr->GetID(); //Do not wipe out layer 0. Ever. From 43e62c4236ed22227a870aa1865a1e8a98113c3e Mon Sep 17 00:00:00 2001 From: jayman2000 Date: Fri, 24 Jun 2016 17:54:43 -0400 Subject: [PATCH 6/8] Added sliders in the display options menu to control movebob and stillbob. --- wadsrc/static/language.eng | 2 ++ wadsrc/static/menudef.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wadsrc/static/language.eng b/wadsrc/static/language.eng index ca27bf80a..2f61f7496 100644 --- a/wadsrc/static/language.eng +++ b/wadsrc/static/language.eng @@ -108,3 +108,5 @@ CMPTMNU_SECTORSOUNDS = "Sector sounds use centre as source"; OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colours only"; C_GRAY = "\ccgrey"; C_DARKGRAY = "\cudark grey"; +DSPLYMNU_MOVEBOB = "View bob ammount while moving"; +DSPLYMNU_STILLBOB = "View bob ammount while not moving"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index ff395ff2a..bb854f378 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -688,6 +688,8 @@ OptionMenu "VideoOptions" Option "$DSPLYMNU_NOMONSTERINTERPOLATION", "nomonsterinterpolation", "NoYes" Slider "$DSPLYMNU_MENUDIM", "dimamount", 0, 1.0, 0.05, 2 ColorPicker "$DSPLYMNU_DIMCOLOR", "dimcolor" + Slider "$DSPLYMNU_MOVEBOB", "movebob", 0, 1.0, 0.05, 2 + Slider "$DSPLYMNU_STILLBOB", "stillbob", 0, 1.0, 0.05, 2 } //------------------------------------------------------------------------------------------- From 593e2f7641adffd852c34e03e0aea91f1aefa621 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 29 Jun 2016 13:03:39 +0200 Subject: [PATCH 7/8] - fixed spelling. --- wadsrc/static/language.eng | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/language.eng b/wadsrc/static/language.eng index 2f61f7496..ed0f95a9a 100644 --- a/wadsrc/static/language.eng +++ b/wadsrc/static/language.eng @@ -108,5 +108,5 @@ CMPTMNU_SECTORSOUNDS = "Sector sounds use centre as source"; OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colours only"; C_GRAY = "\ccgrey"; C_DARKGRAY = "\cudark grey"; -DSPLYMNU_MOVEBOB = "View bob ammount while moving"; -DSPLYMNU_STILLBOB = "View bob ammount while not moving"; +DSPLYMNU_MOVEBOB = "View bob amount while moving"; +DSPLYMNU_STILLBOB = "View bob amount while not moving"; From 4defb6e9673f5bc75939c336f04b540feaffbca5 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Tue, 21 Jun 2016 12:44:03 +0200 Subject: [PATCH 8/8] - Fix myoffsetof using misaligned pointer access. That could be a problem for particularly pedantic platforms. --- src/cmdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmdlib.h b/src/cmdlib.h index 05e515374..b035842cd 100644 --- a/src/cmdlib.h +++ b/src/cmdlib.h @@ -16,7 +16,7 @@ #include // the dec offsetof macro doesnt work very well... -#define myoffsetof(type,identifier) ((size_t)&((type *)1)->identifier - 1) +#define myoffsetof(type,identifier) ((size_t)&((type *)alignof(type))->identifier - alignof(type)) int Q_filelength (FILE *f); bool FileExists (const char *filename);