- Fix: compiler warning

- If possible, use the intended macrso to determine sector coordinates

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8018 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-01-10 18:06:55 +00:00
parent f09d7818f0
commit 3af6748b03
6 changed files with 38 additions and 41 deletions
+1 -1
View File
@@ -2005,7 +2005,7 @@ UINT32 PlayerStrength( void )
pSoldier = MercPtrs[ ubLoop ];
if ( pSoldier->bActive )
{
if ( pSoldier->bInSector || ( pSoldier->flags.fBetweenSectors && ((pSoldier->ubPrevSectorID % 16) + 1) == gWorldSectorX && ((pSoldier->ubPrevSectorID / 16) + 1) == gWorldSectorY && ( pSoldier->bSectorZ == gbWorldSectorZ ) ) )
if ( pSoldier->bInSector || (pSoldier->flags.fBetweenSectors && SECTORX( pSoldier->ubPrevSectorID ) == gWorldSectorX && SECTORY( pSoldier->ubPrevSectorID ) == gWorldSectorY && (pSoldier->bSectorZ == gbWorldSectorZ)) )
{
// count this person's strength (condition), calculated as life reduced up to half according to maxbreath
uiStrength = pSoldier->stats.bLife * ( pSoldier->bBreathMax + 100 ) / 200;