From 92219f3e5aa41b0920d70f290461bc4d3f76e11e Mon Sep 17 00:00:00 2001 From: ChrisL Date: Tue, 2 Dec 2008 22:57:32 +0000 Subject: [PATCH] Altered the RemoveRegion failsafe so use the REGION_EXISTS flag. This seems to resolve the "timed" crash and/or infinite loop that people have been reporting with sector inventory. Added a cheat hotkey that creates a huge variety of items for troubleshooting sector inventory with multiple pages. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2442 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Standard Gaming Platform/mousesystem.cpp | 2 +- Tactical/Turn Based Input.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Standard Gaming Platform/mousesystem.cpp b/Standard Gaming Platform/mousesystem.cpp index 28b650da..1bc7bd56 100644 --- a/Standard Gaming Platform/mousesystem.cpp +++ b/Standard Gaming Platform/mousesystem.cpp @@ -987,7 +987,7 @@ void MSYS_RemoveRegion(MOUSE_REGION *region) AssertMsg( 0, "Attempting to remove a NULL region."); } //CHRISL: Obviously, we should never run this function if a region hasn't been setup, but a failsafe would be nice - if(region->IDNumber == 0) + if(!(region->uiFlags & MSYS_REGION_EXISTS)) return; #ifdef MOUSESYSTEM_DEBUGGING diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 44a2f749..b655dcdc 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -2942,6 +2942,23 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) ShouldTheHelpScreenComeUp( HELP_SCREEN_TACTICAL, TRUE ); } break; + case 'I': + //CHRISL: This will create a large number of objects for checking overloading + if( fAlt && fCtrl ) + { + INT16 tempMapPos = sMapPos; + if( CHEATER_CHEAT_LEVEL( ) ) + { + for(UINT16 i = 1; i < 1300; i++) + { + if(i == OWNERSHIP || i == CHALICE) + continue; + //tempMapPos = sMapPos + (i / 200); + CreateItem(i, 100, &gTempObject); + AddItemToPool( tempMapPos, &gTempObject, VISIBLE , 0, WORLD_ITEM_REACHABLE, 0 ); + } + } + } case 'i':