- New Feature: Tactical recruitment allows recruiting civilians as volunteers.

See http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=341335&#msg_341335

This is fully savegame compatible.
GameDir <= r2250 is recommended.
- Fix: prisoners do not talk.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7886 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-06-03 21:04:06 +00:00
parent 6c9d75480f
commit 962393d170
7 changed files with 125 additions and 4 deletions
+5 -1
View File
@@ -438,6 +438,10 @@ typedef enum
PRISONER_MAX,
} PrisonerType;
// -------- added by Flugente: sector info flags --------
// easier than adding 32 differently named variables. DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
#define SECTORINFO_VOLUNTEERS_RECENTLY_RECRUITED 0x01 //1 // we recruited volunteers here. Until this flag is removed, newly created civilians wont be potential volunteers anymore
typedef struct SECTORINFO
{
//information pertaining to this sector
@@ -495,7 +499,7 @@ typedef struct SECTORINFO
// HEADROCK HAM 3.6: Flag to determine whether enemy units in this sector can be seen, and whether their numbers
// should be displayed. One filler was replaced to make room.
UINT8 ubDetectionLevel;
UINT8 bFiller2;
UINT8 usSectorInfoFlag; // a flagmask
UINT8 bFiller3;
UINT32 uiNumberOfWorldItemsInTempFileThatCanBeSeenByPlayer;
+17
View File
@@ -824,6 +824,23 @@ void HandleNPCSystemEvent( UINT32 uiEvent )
void HandleEarlyMorningEvents( void )
{
// Flugente: no reason to put this into LUA
for ( UINT8 sX = 1; sX < MAP_WORLD_X - 1; ++sX )
{
for ( UINT8 sY = 1; sY < MAP_WORLD_X - 1; ++sY )
{
UINT8 sector = SECTOR( sX, sY );
SECTORINFO *pSectorInfo = &(SectorInfo[sector]);
// A flag prevents us from exploiting the civilian recruitment mechanic. Every x hours, we reset it
if ( pSectorInfo )
{
pSectorInfo->usSectorInfoFlag &= ~SECTORINFO_VOLUNTEERS_RECENTLY_RECRUITED;
}
}
}
#ifdef LUA_STRATEGY_EVENT_HANDLER
LetLuaHandleEarlyMorningEvents(0);
#else