mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
- New Feature: Arulco special division controls other features to fight the player. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=343706&#msg_343706
- New Feature: Enemy helicopters allow the AI to rapidly deploy troops aross the map. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=343707&#msg_343707. GameDir <= r2279 is required. - Fix: income of mine 0 was not correctly calculated git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8015 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -954,6 +954,8 @@ UINT8 AddSoldierInitListTeamToWorld( INT8 bTeam, UINT8 ubMaxNum )
|
||||
{
|
||||
SectorAddPrisonersofWar(gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
|
||||
|
||||
SectorAddDownedPilot( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
|
||||
LuaHandleSectorTacticalEntry( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
}
|
||||
|
||||
@@ -1009,6 +1011,8 @@ UINT8 AddSoldierInitListTeamToWorld( INT8 bTeam, UINT8 ubMaxNum )
|
||||
{
|
||||
SectorAddPrisonersofWar(gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
|
||||
|
||||
SectorAddDownedPilot( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
|
||||
LuaHandleSectorTacticalEntry( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
}
|
||||
|
||||
@@ -3049,3 +3053,28 @@ void SectorAddPrisonersofWar( INT16 sMapX, INT16 sMapY, INT16 sMapZ )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: decide wether to add a downed pilot if a helicopter was shot down here
|
||||
void SectorAddDownedPilot( INT16 sMapX, INT16 sMapY, INT16 sMapZ )
|
||||
{
|
||||
// not in underground sectors
|
||||
if ( sMapZ > 0 )
|
||||
return;
|
||||
|
||||
// get sector
|
||||
SECTORINFO *pSector = &SectorInfo[SECTOR( sMapX, sMapY )];
|
||||
if ( !pSector )
|
||||
return;
|
||||
|
||||
if ( pSector->usSectorInfoFlag & SECTORINFO_ENEMYHELI_SHOTDOWN )
|
||||
{
|
||||
// it is likely that a pilot has survived, but not guaranteed
|
||||
if ( Chance( 75 ) )
|
||||
{
|
||||
CreateDownedPilot();
|
||||
}
|
||||
|
||||
// remove the flag. We can only find the pilot the first time we visit this sector after the heli was shut down
|
||||
pSector->usSectorInfoFlag &= ~SECTORINFO_ENEMYHELI_SHOTDOWN;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user