mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +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:
@@ -467,7 +467,8 @@ void UpdateStrategicDetectionLevel( )
|
|||||||
for (UINT16 X = 0; X < 256; X++)
|
for (UINT16 X = 0; X < 256; X++)
|
||||||
{
|
{
|
||||||
// Reset detection level first
|
// Reset detection level first
|
||||||
SectorInfo[X].ubDetectionLevel = 0;
|
// sevenfm: this will disable enemy detection using facility, and detection levels are already zeroed in this function
|
||||||
|
//SectorInfo[X].ubDetectionLevel = 0;
|
||||||
|
|
||||||
if (ubStrategicDetectionLevel & (1<<DETECT_ENEMIES_DYNAMIC))
|
if (ubStrategicDetectionLevel & (1<<DETECT_ENEMIES_DYNAMIC))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5870,13 +5870,28 @@ BOOLEAN ValidateGroups( GROUP *pGroup )
|
|||||||
return isValid;
|
return isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SANDRO - added check if we have a scout in group
|
// SANDRO - added check if we have a scout in group
|
||||||
BOOLEAN ScoutIsPresentInSquad( INT16 ubSectorNumX, INT16 ubSectorNumY )
|
BOOLEAN ScoutIsPresentInSquad( INT16 ubSectorNumX, INT16 ubSectorNumY )
|
||||||
{
|
{
|
||||||
BOOLEAN fScoutPresent = FALSE;
|
BOOLEAN fScoutPresent = FALSE;
|
||||||
INT32 i;
|
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++ )
|
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) )
|
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 );
|
return ( fScoutPresent );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -934,6 +934,10 @@ void StartCivQuote( SOLDIERTYPE *pCiv )
|
|||||||
ubCivQuoteID2 = Random(RandomVal-2);
|
ubCivQuoteID2 = Random(RandomVal-2);
|
||||||
pCiv->bCurrentCivQuoteDelta = 0;
|
pCiv->bCurrentCivQuoteDelta = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ubCivQuoteID2 = pCiv->bCurrentCivQuote;
|
||||||
|
}
|
||||||
|
|
||||||
//ubEntryID = pCiv->bCurrentCivQuote + pCiv->bCurrentCivQuoteDelta;
|
//ubEntryID = pCiv->bCurrentCivQuote + pCiv->bCurrentCivQuoteDelta;
|
||||||
ubEntryID = ubCivQuoteID2 + pCiv->bCurrentCivQuoteDelta;
|
ubEntryID = ubCivQuoteID2 + pCiv->bCurrentCivQuoteDelta;
|
||||||
|
|||||||
Reference in New Issue
Block a user