mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: we have to bury corpses, or their rot causes diseases in sectors
Requires GameDir >= r2436. Fopr more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23828&goto=354321&#msg_354321 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8591 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2131,6 +2131,24 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub
|
||||
ChooseMapEdgepoints( &MapEdgepointInfo, ubStrategicInsertionCode, ubTotalSoldiers );
|
||||
#endif
|
||||
|
||||
extern INT16 gsStrategicDiseaseOriginSector;
|
||||
|
||||
// Flugente: we need to set the sector of origin to determine from which sector to take the disease ratio that affects health
|
||||
gsStrategicDiseaseOriginSector = -1;
|
||||
|
||||
if ( !gbWorldSectorZ )
|
||||
{
|
||||
switch ( ubStrategicInsertionCode )
|
||||
{
|
||||
case INSERTION_CODE_NORTH: gsStrategicDiseaseOriginSector = SECTOR( gWorldSectorX, gWorldSectorY - 1 ); break;
|
||||
case INSERTION_CODE_EAST: gsStrategicDiseaseOriginSector = SECTOR( gWorldSectorX + 1, gWorldSectorY ); break;
|
||||
case INSERTION_CODE_SOUTH: gsStrategicDiseaseOriginSector = SECTOR( gWorldSectorX, gWorldSectorY + 1 ); break;
|
||||
case INSERTION_CODE_WEST: gsStrategicDiseaseOriginSector = SECTOR( gWorldSectorX - 1, gWorldSectorY ); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ubCurrSlot = 0;
|
||||
while( ubTotalSoldiers )
|
||||
{
|
||||
@@ -2265,6 +2283,9 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_REINFORCEMENTS_ENEMY;
|
||||
}
|
||||
}
|
||||
|
||||
// set this back so it doesn't affect others
|
||||
gsStrategicDiseaseOriginSector = -1;
|
||||
|
||||
#ifdef JA2UB
|
||||
gsGridNoForMapEdgePointInfo = -1;
|
||||
|
||||
Reference in New Issue
Block a user