diff --git a/src/actor.h b/src/actor.h index 437c661bc..6a70c0e85 100644 --- a/src/actor.h +++ b/src/actor.h @@ -388,6 +388,7 @@ enum ActorFlag7 MF7_SPRITEANGLE = 0x02000000, // [MC] Utilize the SpriteAngle property and lock the rotation to the degrees specified. MF7_SMASHABLE = 0x04000000, // dies if hitting the floor. MF7_NOSHIELDREFLECT = 0x08000000, // will not be reflected by shields. + MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen. }; // --- mobj.renderflags --- diff --git a/src/g_statusbar/sbar.h b/src/g_statusbar/sbar.h index 3c911e693..1e8af1514 100644 --- a/src/g_statusbar/sbar.h +++ b/src/g_statusbar/sbar.h @@ -404,16 +404,6 @@ public: double CrosshairSize; double Displacement; - enum - { - imgLAME = 0, - imgNEGATIVE = 1, - imgINumbers = 2, - imgBNEGATIVE = 12, - imgBNumbers = 13, - imgSmNumbers = 23, - NUM_BASESB_IMAGES = 33 - }; FImageCollection Images; player_t *CPlayer; diff --git a/src/g_statusbar/sbarinfo.cpp b/src/g_statusbar/sbarinfo.cpp index 2fd21737f..5096ee813 100644 --- a/src/g_statusbar/sbarinfo.cpp +++ b/src/g_statusbar/sbarinfo.cpp @@ -54,7 +54,6 @@ #include "v_palette.h" #include "p_acs.h" #include "gstrings.h" -#include "version.h" #include "cmdlib.h" #include "g_levellocals.h" diff --git a/src/g_statusbar/strife_sbar.cpp b/src/g_statusbar/strife_sbar.cpp index 177117eb2..972657482 100644 --- a/src/g_statusbar/strife_sbar.cpp +++ b/src/g_statusbar/strife_sbar.cpp @@ -186,18 +186,6 @@ class DStrifeStatusBar : public DBaseStatusBar public: DStrifeStatusBar () : DBaseStatusBar (32) { - static const char *sharedLumpNames[] = - { - NULL, NULL, "INVFONY0", "INVFONY1", "INVFONY2", - "INVFONY3", "INVFONY4", "INVFONY5", "INVFONY6", "INVFONY7", - "INVFONY8", "INVFONY9", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, "INVFONG0", "INVFONG1", - "INVFONG2", "INVFONG3", "INVFONG4", "INVFONG5", "INVFONG6", - "INVFONG7", "INVFONG8", "INVFONG9" - }; - - DBaseStatusBar::Images.Init (sharedLumpNames, NUM_BASESB_IMAGES); DoCommonInit (); } @@ -301,10 +289,11 @@ private: "INVFONY0", "INVFONY1", "INVFONY2", "INVFONY3", "INVFONY4", "INVFONY5", "INVFONY6", "INVFONY7", "INVFONY8", "INVFONY9", "INVFONY%", - "I_COMM", "I_MDKT", "I_ARM1", "I_ARM2" + "I_COMM", "I_MDKT", "I_ARM1", "I_ARM2", nullptr + }; - Images.Init (strifeLumpNames, NUM_STRIFESB_IMAGES); + Images.Init (strifeLumpNames, countof(strifeLumpNames)); CursorImage = Images[imgINVCURS] != NULL ? imgINVCURS : imgCURSOR01; @@ -834,8 +823,8 @@ private: imgMEDI, imgARM1, imgARM2, - - NUM_STRIFESB_IMAGES + imgNEGATIVE, + imgINumbers = imgFONG0, }; FImageCollection Images; diff --git a/src/gl/compatibility/gl_20.cpp b/src/gl/compatibility/gl_20.cpp index eeb5572c1..7fc8b783b 100644 --- a/src/gl/compatibility/gl_20.cpp +++ b/src/gl/compatibility/gl_20.cpp @@ -34,7 +34,6 @@ #include "doomtype.h" #include "m_argv.h" #include "zstring.h" -#include "version.h" #include "i_system.h" #include "v_text.h" #include "r_utility.h" diff --git a/src/menu/menu.h b/src/menu/menu.h index 8922147e1..6d7bdc927 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -9,7 +9,6 @@ #include "r_data/r_translate.h" #include "c_cvars.h" #include "v_font.h" -#include "version.h" #include "textures/textures.h" EXTERN_CVAR(Float, snd_menuvolume) diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index 0416beb45..e7bc021d8 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -365,7 +365,7 @@ static void ParseListMenuBody(FScanner &sc, DListMenuDescriptor *desc) PClass *cls = PClass::FindClass(buildname); if (cls != nullptr && cls->IsDescendantOf("ListMenuItem")) { - auto func = dyn_cast(cls->Symbols.FindSymbol("Init", false)); + auto func = dyn_cast(cls->Symbols.FindSymbol("Init", true)); if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method. { auto &args = func->Variants[0].Proto->ArgumentTypes; @@ -737,7 +737,7 @@ static void ParseOptionMenuBody(FScanner &sc, DOptionMenuDescriptor *desc) PClass *cls = PClass::FindClass(buildname); if (cls != nullptr && cls->IsDescendantOf("OptionMenuItem")) { - auto func = dyn_cast(cls->Symbols.FindSymbol("Init", false)); + auto func = dyn_cast(cls->Symbols.FindSymbol("Init", true)); if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method. { auto &args = func->Variants[0].Proto->ArgumentTypes; diff --git a/src/p_map.cpp b/src/p_map.cpp index c49a0efe0..e7a78cd71 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5675,8 +5675,9 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom } points *= thing->GetClass()->RDFactor; + double check = int(points) * bombdamage; // points and bombdamage should be the same sign (the double cast of 'points' is needed to prevent overflows and incorrect values slipping through.) - if ((((double)int(points) * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) + if ((check > 0 || (check == 0 && bombspot->flags7 & MF7_FORCEZERORADIUSDMG)) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) { // OK to damage; target is in direct path double vz; double thrust; @@ -5753,7 +5754,7 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom double factor = splashfactor * thing->GetClass()->RDFactor; damage = int(damage * factor); - if (damage > 0) + if (damage > 0 || (bombspot->flags7 & MF7_FORCEZERORADIUSDMG)) { //[MC] Don't count actors saved by buddha if already at 1 health. int prehealth = thing->health; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index a4b6e472e..69af53375 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3849,7 +3849,7 @@ void AActor::CheckPortalTransition(bool islinked) DVector3 oldpos = Pos(); if (islinked && !moved) UnlinkFromWorld(&ctx); SetXYZ(PosRelative(Sector->GetOppositePortalGroup(sector_t::ceiling))); - Prev = Pos() - oldpos; + Prev += Pos() - oldpos; Sector = P_PointInSector(Pos()); PrevPortalGroup = Sector->PortalGroup; moved = true; @@ -3866,7 +3866,7 @@ void AActor::CheckPortalTransition(bool islinked) DVector3 oldpos = Pos(); if (islinked && !moved) UnlinkFromWorld(&ctx); SetXYZ(PosRelative(Sector->GetOppositePortalGroup(sector_t::floor))); - Prev = Pos() - oldpos; + Prev += Pos() - oldpos; Sector = P_PointInSector(Pos()); PrevPortalGroup = Sector->PortalGroup; moved = true; diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index 991577f68..e444d30a9 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -52,7 +52,6 @@ #include "backend/codegen.h" #include "w_wad.h" #include "v_video.h" -#include "version.h" #include "v_text.h" #include "m_argv.h" diff --git a/src/scripting/decorate/thingdef_states.cpp b/src/scripting/decorate/thingdef_states.cpp index 63269eeeb..74c67cf84 100644 --- a/src/scripting/decorate/thingdef_states.cpp +++ b/src/scripting/decorate/thingdef_states.cpp @@ -54,7 +54,6 @@ #include "i_system.h" #include "colormatcher.h" #include "backend/codegen.h" -#include "version.h" #include "templates.h" #include "backend/vmbuilder.h" diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 378c6c927..41d8644ea 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -316,6 +316,7 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(MF7, SPRITEANGLE, AActor, flags7), DEFINE_FLAG(MF7, SMASHABLE, AActor, flags7), DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7), + DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index c802dda36..29f82d90e 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -49,7 +49,6 @@ #include "i_system.h" #include "gdtoa.h" #include "backend/vmbuilder.h" -#include "version.h" static int GetIntConst(FxExpression *ex, FCompileContext &ctx) { diff --git a/src/version.h b/src/version.h index bd0069338..5ee5472f2 100644 --- a/src/version.h +++ b/src/version.h @@ -31,6 +31,8 @@ ** */ +#include "gitinfo.h" + #ifndef __VERSION_H__ #define __VERSION_H__ @@ -41,12 +43,16 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "2.3.2" +#ifdef GIT_DESCRIPTION +#define VERSIONSTR GIT_DESCRIPTION +#else +#define VERSIONSTR "2.3pre" +#endif // The version as seen in the Windows resource -#define RC_FILEVERSION 2,3,2,0 -#define RC_PRODUCTVERSION 2,3,2,0 -#define RC_PRODUCTVERSION2 "2.3.2" +#define RC_FILEVERSION 2,3,9999,0 +#define RC_PRODUCTVERSION 2,3,9999,0 +#define RC_PRODUCTVERSION2 VERSIONSTR // Version identifier for network games. // Bump it every time you do a release unless you're certain you diff --git a/wadsrc/static/zscript/hexen/flechette.txt b/wadsrc/static/zscript/hexen/flechette.txt index 3440312c9..1708b843b 100644 --- a/wadsrc/static/zscript/hexen/flechette.txt +++ b/wadsrc/static/zscript/hexen/flechette.txt @@ -437,7 +437,7 @@ class PoisonCloud : Actor Mass 0x7fffffff; +NOBLOCKMAP +NOGRAVITY +DROPOFF +NODAMAGETHRUST - +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS + +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG RenderStyle "Translucent"; Alpha 0.6; DeathSound "PoisonShroomDeath"; diff --git a/wadsrc/static/zscript/menu/loadsavemenu.txt b/wadsrc/static/zscript/menu/loadsavemenu.txt index 34d56f374..05638d393 100644 --- a/wadsrc/static/zscript/menu/loadsavemenu.txt +++ b/wadsrc/static/zscript/menu/loadsavemenu.txt @@ -426,6 +426,8 @@ class LoadSaveMenu : ListMenu class SaveMenu : LoadSaveMenu { + String mSaveName; + //============================================================================= // // @@ -464,7 +466,6 @@ class SaveMenu : LoadSaveMenu override bool MenuEvent (int mkey, bool fromcontroller) { - if (Super.MenuEvent(mkey, fromcontroller)) { return true; @@ -483,8 +484,9 @@ class SaveMenu : LoadSaveMenu } else if (mkey == MKEY_Input) { + // Do not start the save here, it would cause some serious execution ordering problems. mEntering = false; - manager.DoSave(Selected, mInput.GetText()); + mSaveName = mInput.GetText(); mInput = null; } else if (mkey == MKEY_Abort) @@ -525,6 +527,14 @@ class SaveMenu : LoadSaveMenu } + override void Ticker() + { + if (mSaveName.Length() > 0) + { + manager.DoSave(Selected, mSaveName); + mSaveName = ""; + } + } } diff --git a/wadsrc/static/zscript/menu/menu.txt b/wadsrc/static/zscript/menu/menu.txt index 84478ba81..9f59b3239 100644 --- a/wadsrc/static/zscript/menu/menu.txt +++ b/wadsrc/static/zscript/menu/menu.txt @@ -266,7 +266,7 @@ class Menu : Object native virtual bool CheckFocus(MenuItemBase fc) { return false; } virtual void ReleaseFocus() {} virtual void ResetColor() {} - virtual bool MouseEvent(int type, int mx, int my) { return false; } + virtual bool MouseEvent(int type, int mx, int my) { return true; } virtual void Ticker() {} //============================================================================= diff --git a/wadsrc/static/zscript/menu/optionmenuitems.txt b/wadsrc/static/zscript/menu/optionmenuitems.txt index 9ac308372..404ce5b36 100644 --- a/wadsrc/static/zscript/menu/optionmenuitems.txt +++ b/wadsrc/static/zscript/menu/optionmenuitems.txt @@ -1129,6 +1129,7 @@ class OptionMenuItemTextField : OptionMenuFieldBase { Menu.MenuSound("menu/choose"); mEnter = TextEnterMenu.Open(Menu.GetCurrentMenu(), GetCVarString(), -1, 2, fromcontroller); + mEnter.ActivateMenu(); return true; } else if (mkey == Menu.MKEY_Input) diff --git a/wadsrc/static/zscript/menu/playercontrols.txt b/wadsrc/static/zscript/menu/playercontrols.txt index b7b4f05f4..b0f97cdbc 100644 --- a/wadsrc/static/zscript/menu/playercontrols.txt +++ b/wadsrc/static/zscript/menu/playercontrols.txt @@ -188,6 +188,7 @@ class ListMenuItemPlayerNameBox : ListMenuItemSelectable { Menu.MenuSound ("menu/choose"); mEnter = TextEnterMenu.Open(Menu.GetCurrentMenu(), mPlayerName, MAXPLAYERNAME, 2, fromcontroller); + mEnter.ActivateMenu(); return true; } else if (mkey == Menu.MKEY_Input) diff --git a/wadsrc/static/zscript/menu/textentermenu.txt b/wadsrc/static/zscript/menu/textentermenu.txt index 356eba1e6..b92932aaf 100644 --- a/wadsrc/static/zscript/menu/textentermenu.txt +++ b/wadsrc/static/zscript/menu/textentermenu.txt @@ -171,31 +171,28 @@ class TextEnterMenu : Menu override bool MouseEvent(int type, int x, int y) { - if (mMouseCapture || m_use_mouse == 1) - { - int cell_width = 18 * CleanXfac; - int cell_height = 12 * CleanYfac; - int screen_y = screen.GetHeight() - INPUTGRID_HEIGHT * cell_height; - int screen_x = (screen.GetWidth() - INPUTGRID_WIDTH * cell_width) / 2; + int cell_width = 18 * CleanXfac; + int cell_height = 12 * CleanYfac; + int screen_y = screen.GetHeight() - INPUTGRID_HEIGHT * cell_height; + int screen_x = (screen.GetWidth() - INPUTGRID_WIDTH * cell_width) / 2; - if (x >= screen_x && x < screen_x + INPUTGRID_WIDTH * cell_width && y >= screen_y) + if (x >= screen_x && x < screen_x + INPUTGRID_WIDTH * cell_width && y >= screen_y) + { + InputGridX = (x - screen_x) / cell_width; + InputGridY = (y - screen_y) / cell_height; + if (type == MOUSE_Release) { - InputGridX = (x - screen_x) / cell_width; - InputGridY = (y - screen_y) / cell_height; - if (type == MOUSE_Release) + if (MenuEvent(MKEY_Enter, true)) { - if (MenuEvent(MKEY_Enter, true)) - { - MenuSound("menu/choose"); - if (m_use_mouse == 2) InputGridX = InputGridY = -1; - return true; - } + MenuSound("menu/choose"); + if (m_use_mouse == 2) InputGridX = InputGridY = -1; } } - else - { - InputGridX = InputGridY = -1; - } + return true; + } + else + { + InputGridX = InputGridY = -1; } return Super.MouseEvent(type, x, y); } @@ -262,8 +259,8 @@ class TextEnterMenu : Menu if (mEnterString.Length() > 0) { Menu parent = mParentMenu; - Close(); parent.MenuEvent(MKEY_Input, false); + Close(); return true; } }