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); 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. 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 diff --git a/wadsrc/static/language.eng b/wadsrc/static/language.eng index bf0a0a91d..365005fb9 100644 --- a/wadsrc/static/language.eng +++ b/wadsrc/static/language.eng @@ -108,5 +108,7 @@ 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 amount while moving"; +DSPLYMNU_STILLBOB = "View bob amount while not moving"; OPTVAL_ANYFIXEDCOLORMAP = "Any fixed colourmap"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 0820b4d69..36717c7e4 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -700,6 +700,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 } //-------------------------------------------------------------------------------------------