mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- Fix: crash when checking for muzzleflash
- Fix: under certain conditions, AI-selffeeding could lead to invalid inventory sizes - information from prisoner interrogation is about new sectors - no autoriot in a prison sector if militia is present git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5912 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5608,10 +5608,14 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
UINT32 result = Random(100);
|
||||
if ( result < gGameExternalOptions.ubPrisonerProcessInfoDetectChance )
|
||||
{
|
||||
// there need to be mobile enemies here - that the quenn has troops in towns we do not own is hardly worthy information
|
||||
// there need to be mobile enemies here - that the queen has troops in towns we do not own is hardly worthy information
|
||||
if ( NumMobileEnemiesInSector( sX, sY ) == 0 )
|
||||
continue;
|
||||
|
||||
// not if we already know about this sector
|
||||
if ( SectorInfo[ SECTOR( sX, sY ) ].uiFlags & SF_ASSIGN_NOTICED_ENEMIES_HERE )
|
||||
continue;
|
||||
|
||||
// enemy patrol detected
|
||||
SectorInfo[ SECTOR( sX, sY ) ].uiFlags |= SF_ASSIGN_NOTICED_ENEMIES_HERE;
|
||||
|
||||
@@ -5783,6 +5787,7 @@ void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
|
||||
// add militia strength
|
||||
prisonguardvalue += 100 * pSectorInfo->ubNumberOfCivsAtLevel[ GREEN_MILITIA ] + 150 * pSectorInfo->ubNumberOfCivsAtLevel[ REGULAR_MILITIA ] + 200 * pSectorInfo->ubNumberOfCivsAtLevel[ ELITE_MILITIA ];
|
||||
numprisonguards += pSectorInfo->ubNumberOfCivsAtLevel[ GREEN_MILITIA ] + pSectorInfo->ubNumberOfCivsAtLevel[ REGULAR_MILITIA ] + pSectorInfo->ubNumberOfCivsAtLevel[ ELITE_MILITIA ];
|
||||
|
||||
if ( !numprisonguards )
|
||||
fBeginRiot = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user