From 4ca20e0297f56f8ee517e2bd612da27ed8b857c8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Feb 2017 21:35:06 +0100 Subject: [PATCH 1/3] - fixed: AActor::SetPortalTransition set an incorrect value for the previous position. --- src/p_mobj.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 2508f50f2..f9a62892a 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3848,7 +3848,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; @@ -3865,7 +3865,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; From 165a9800658c89e2a4244eb14492cfe329070eae Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Feb 2017 22:08:22 +0100 Subject: [PATCH 2/3] - fixed: The base MouseEvent method must return true, not false. - fixed: It is a bad idea to start a save within an MKEY_Input event. At this time the window chain is not stable because the text input screen is in the middle of being taken down, so the save should be deferred until the next Ticker call of the SaveMenu. --- wadsrc/static/zscript/menu/loadsavemenu.txt | 14 ++++++- wadsrc/static/zscript/menu/menu.txt | 2 +- wadsrc/static/zscript/menu/textentermenu.txt | 39 +++++++++----------- 3 files changed, 31 insertions(+), 24 deletions(-) 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/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; } } From c2eed19b5107751e3c324875e7163b62dad0330e Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 15 Feb 2017 10:10:54 -0500 Subject: [PATCH 3/3] - fixed: Change compiled exe version strings to match git repo numbers. This is viewable in Windows by right-clicking on the executable and selecting "Properties". --- src/version.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index ca7de97fe..b9f9a1327 100644 --- a/src/version.h +++ b/src/version.h @@ -41,12 +41,16 @@ const char *GetVersionString(); /** Lots of different version numbers **/ +#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,9999,0 #define RC_PRODUCTVERSION 2,3,9999,0 -#define RC_PRODUCTVERSION2 "2.3pre" +#define RC_PRODUCTVERSION2 VERSIONSTR // Version identifier for network games. // Bump it every time you do a release unless you're certain you