From 5335553158151c9095ba47536b5a555ee70a78b6 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sun, 9 Dec 2012 16:14:24 +0000 Subject: [PATCH] - Fix: prisoner interrogation was stopped even though it shouldn't - Fix: prison location was displayed wrong git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5721 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Assignments.cpp | 2 +- Tactical/Overhead.cpp | 4 ++-- Tactical/Soldier Control.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 36110547a..14b58df0a 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -5504,7 +5504,7 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) return; // Are there any prisoners in this prison? - SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] ); + SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] ); UINT32 numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar; diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index ddb4f4ee3..0f9641f25 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -6703,7 +6703,7 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue ) pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved; CHAR16 wString[ 64 ]; - GetShortSectorString( gWorldSectorX, gWorldSectorY, wString ); + GetShortSectorString( (INT16)((uSectorID % MAP_WORLD_X) + 1), (INT16)((uSectorID / MAP_WORLD_X) + 2), wString ); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString ); } } @@ -6731,7 +6731,7 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue ) pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved; CHAR16 wString[ 64 ]; - GetShortSectorString( gWorldSectorX, gWorldSectorY, wString ); + GetShortSectorString( (INT16)(uSectorID % MAP_WORLD_X), (INT16)(uSectorID / MAP_WORLD_X), wString ); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString ); } } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 112166358..92ce1e875 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -15273,7 +15273,7 @@ void SOLDIERTYPE::Strip() // can we process prisoners in this sector? BOOLEAN SOLDIERTYPE::CanProcessPrisoners() { - if ( !bInSector || stats.bLife < OKLIFE ) + if ( stats.bLife < OKLIFE ) return FALSE; // Is there a prison in this sector? @@ -15298,7 +15298,7 @@ BOOLEAN SOLDIERTYPE::CanProcessPrisoners() // Are there any prisoners in this prison? if ( !this->bSectorZ ) { - SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] ); + SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( this->sSectorX, this->sSectorY ) ] ); if ( pSectorInfo->uiNumberOfPrisonersOfWar > 0 ) return TRUE;