mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user