mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
HandleSnitchExposition: assignment instead of value check
HourlySnitchUpdate: NUM_PROFILES limit Strategic AI.cpp: MAP_WORLD_X * MAP_WORLD_Y limit RemoveMPButtonsForMapScreen: MAX_MP_BUTTONS limit WrapString: '/0' char instead of '\0' git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8257 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3329,7 +3329,7 @@ BOOL HandleSnitchExposition(SOLDIERTYPE *pSoldier)
|
|||||||
//pSoldier->SoldierTakeDamage( 0, 0, usDamageTaken, TAKE_DAMAGE_HANDTOHAND, NOBODY, NOWHERE, 0, TRUE );
|
//pSoldier->SoldierTakeDamage( 0, 0, usDamageTaken, TAKE_DAMAGE_HANDTOHAND, NOBODY, NOWHERE, 0, TRUE );
|
||||||
pSoldier->bBreath = max( 0, pSoldier->bBreath - usDamageTaken );
|
pSoldier->bBreath = max( 0, pSoldier->bBreath - usDamageTaken );
|
||||||
// he drowned?
|
// he drowned?
|
||||||
if( pSoldier->bBreath = 0 )
|
if( pSoldier->bBreath == 0 )
|
||||||
{
|
{
|
||||||
// dead
|
// dead
|
||||||
pSoldier->SoldierTakeDamage( 0, 100, 100, TAKE_DAMAGE_HANDTOHAND, NOBODY, NOWHERE, 0, TRUE );
|
pSoldier->SoldierTakeDamage( 0, 100, 100, TAKE_DAMAGE_HANDTOHAND, NOBODY, NOWHERE, 0, TRUE );
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ void HourlySmokerUpdate( )
|
|||||||
// anv: decrease exposed snitch cooldown (for simplified exposition handling)
|
// anv: decrease exposed snitch cooldown (for simplified exposition handling)
|
||||||
void HourlySnitchUpdate()
|
void HourlySnitchUpdate()
|
||||||
{
|
{
|
||||||
for( INT32 cnt = 0; cnt <= NUM_PROFILES; ++cnt )
|
for( INT32 cnt = 0; cnt < NUM_PROFILES; ++cnt )
|
||||||
{
|
{
|
||||||
if( gMercProfiles[cnt].ubSnitchExposedCooldown > 0 )
|
if( gMercProfiles[cnt].ubSnitchExposedCooldown > 0 )
|
||||||
gMercProfiles[cnt].ubSnitchExposedCooldown--;
|
gMercProfiles[cnt].ubSnitchExposedCooldown--;
|
||||||
|
|||||||
@@ -5984,7 +5984,7 @@ void StrategicHandleQueenLosingControlOfSector( INT16 sSectorX, INT16 sSectorY,
|
|||||||
|
|
||||||
if( ubTownId != BLANK_SECTOR && GetTownSectorSize( ubTownId ) != 1 )
|
if( ubTownId != BLANK_SECTOR && GetTownSectorSize( ubTownId ) != 1 )
|
||||||
{
|
{
|
||||||
for( INT32 i = 0; i < MAP_WORLD_X * MAP_WORLD_Y + 1; i++ )
|
for( INT32 i = 0; i < MAP_WORLD_X * MAP_WORLD_Y; i++ )
|
||||||
{
|
{
|
||||||
if( StrategicMap[ i ].bNameId == ubTownId )
|
if( StrategicMap[ i ].bNameId == ubTownId )
|
||||||
SectorInfo[ STRATEGIC_INDEX_TO_SECTOR_INFO( i ) ].ubInvestigativeState++;
|
SectorInfo[ STRATEGIC_INDEX_TO_SECTOR_INFO( i ) ].ubInvestigativeState++;
|
||||||
@@ -6292,7 +6292,7 @@ void StrategicHandleMineThatRanOut( UINT8 ubSectorID )
|
|||||||
|
|
||||||
if( ubTownId != BLANK_SECTOR )
|
if( ubTownId != BLANK_SECTOR )
|
||||||
{
|
{
|
||||||
for( INT32 i = 0; i < MAP_WORLD_X * MAP_WORLD_Y + 1; i++ )
|
for( INT32 i = 0; i < MAP_WORLD_X * MAP_WORLD_Y; i++ )
|
||||||
{
|
{
|
||||||
if( StrategicMap[ i ].bNameId == ubTownId )
|
if( StrategicMap[ i ].bNameId == ubTownId )
|
||||||
gArmyComp[ gGarrisonGroup[ SectorInfo[ STRATEGIC_INDEX_TO_SECTOR_INFO( i ) ].ubGarrisonID ].ubComposition ].bPriority /= 4;
|
gArmyComp[ gGarrisonGroup[ SectorInfo[ STRATEGIC_INDEX_TO_SECTOR_INFO( i ) ].ubGarrisonID ].ubComposition ].bPriority /= 4;
|
||||||
|
|||||||
@@ -14323,10 +14323,12 @@ void RemoveMPButtonsForMapScreen( void )
|
|||||||
UnloadButtonImage( giMapMPButtonImage[ iCounter ] );
|
UnloadButtonImage( giMapMPButtonImage[ iCounter ] );
|
||||||
|
|
||||||
if(iCounter < MAX_MP_BUTTONS)
|
if(iCounter < MAX_MP_BUTTONS)
|
||||||
|
{
|
||||||
RemoveButton( giMapMPButton[ iCounter ] );
|
RemoveButton( giMapMPButton[ iCounter ] );
|
||||||
|
giMapMPButton[ iCounter ] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
giMapMPButtonImage[ iCounter ] = -1;
|
giMapMPButtonImage[ iCounter ] = -1;
|
||||||
giMapMPButton[ iCounter ] = -1;
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -250,7 +250,7 @@ BOOLEAN WrapString( STR16 pStr, STR16 pStr2, UINT16 usWidth, INT32 uiFont )
|
|||||||
{
|
{
|
||||||
//We completed the check for a space, but failed, so use the hyphen method.
|
//We completed the check for a space, but failed, so use the hyphen method.
|
||||||
swprintf( pStr2, L"-%s", &(pStr[uiHyphenLet]) );
|
swprintf( pStr2, L"-%s", &(pStr[uiHyphenLet]) );
|
||||||
pStr[uiHyphenLet] = (INT16)'/0';
|
pStr[uiHyphenLet] = (INT16)'\0';
|
||||||
fLineSplit = TRUE; //hyphen method
|
fLineSplit = TRUE; //hyphen method
|
||||||
// HEADROCK HAM 3.6: This is erroneous. At this point, the function should RETURN, otherwise it
|
// HEADROCK HAM 3.6: This is erroneous. At this point, the function should RETURN, otherwise it
|
||||||
// cuts another bit off pStr for no reason.
|
// cuts another bit off pStr for no reason.
|
||||||
|
|||||||
Reference in New Issue
Block a user