From 6fd98f0bbbb06257f1c3a19339f25086f6207e49 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 5 Sep 2013 21:23:15 +0000 Subject: [PATCH] Fix: updateRate for showing Cover had wrong type resulting in frequent recalculation of cover with little to no time for other calculations (by Moa) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6366 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.h | 2 +- Tactical/DisplayCover.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GameSettings.h b/GameSettings.h index 3b66c78fb..89cf074b1 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -810,7 +810,7 @@ typedef struct UINT8 ubStanceEffectiveness; UINT8 ubLBEEffectiveness; UINT8 ubMovementEffectiveness; - UINT8 ubCoverDisplayUpdateWait; + UINT16 ubCoverDisplayUpdateWait;//Moa: changed to UINT16 to allow values 500ms to 10000ms, see ini file and DisplayCover( BOOLEAN ), DisplayMines( BOOLEAN ) // HEADROCK HAM B1: Global modifier for mine income (0 is automatically turned to 1 to avoid divide-by-zero.) INT16 usMineIncomePercentage; diff --git a/Tactical/DisplayCover.cpp b/Tactical/DisplayCover.cpp index d4b7a20d3..1d7d67704 100644 --- a/Tactical/DisplayCover.cpp +++ b/Tactical/DisplayCover.cpp @@ -429,7 +429,7 @@ BOOLEAN GridNoOnScreenAndAround( const INT32& sGridNo, const UINT8& ubRadius ) void DisplayCover( const BOOLEAN& forceUpdate ) { - if ( gGameExternalOptions.ubCoverDisplayUpdateWait == -1 ) + if ( gGameExternalOptions.ubCoverDisplayUpdateWait == (UINT16)-1 ) { return; } @@ -948,7 +948,7 @@ void RemoveMinesObjectsFromViewArea() void DisplayMines( const BOOLEAN& forceUpdate ) { - if ( gGameExternalOptions.ubCoverDisplayUpdateWait == -1 ) + if ( gGameExternalOptions.ubCoverDisplayUpdateWait == (UINT16)-1 ) { return; }