UpdateStrategicDetectionLevel fix: reset detection level

ScoutIsPresentInSquad: allow scouting only if soldier is not in a vehicle and not on assignment
StartCivQuote fix: uninitialized ubCivQuoteID2

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8256 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2016-06-25 08:48:40 +00:00
parent 0955d6ddfd
commit 120507a9fd
3 changed files with 23 additions and 2 deletions
+17 -1
View File
@@ -5870,13 +5870,28 @@ BOOLEAN ValidateGroups( GROUP *pGroup )
return isValid;
}
// SANDRO - added check if we have a scout in group
BOOLEAN ScoutIsPresentInSquad( INT16 ubSectorNumX, INT16 ubSectorNumY )
{
BOOLEAN fScoutPresent = FALSE;
INT32 i;
// sevenfm: scout should not be sleeping, in vehicle or on assignment
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
{
if( MercPtrs[ i ]->bActive &&
MercPtrs[ i ]->stats.bLife >= OKLIFE &&
MercPtrs[ i ]->sSectorX == ubSectorNumX &&
MercPtrs[ i ]->sSectorY == ubSectorNumY &&
MercPtrs[ i ]->bAssignment < ON_DUTY &&
!MercPtrs[ i ]->flags.fMercAsleep &&
HAS_SKILL_TRAIT( MercPtrs[ i ], SCOUTING_NT ) )
{
fScoutPresent = TRUE;
}
}
/*
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
{
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
@@ -5890,6 +5905,7 @@ BOOLEAN ScoutIsPresentInSquad( INT16 ubSectorNumX, INT16 ubSectorNumY )
}
}
}
*/
return ( fScoutPresent );
}