mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
New Feature: Militia Volunteer Pool limits the number of militia we can train. Turned off by default.
GameDir >= r2210 is recommended. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7746 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -191,6 +191,9 @@ void GenerateMilitiaSquad(INT16 sMapX, INT16 sMapY, INT16 sTMapX, INT16 sTMapY,
|
||||
ubMilitiaToTrain = CalcNumMilitiaTrained(ubBestLeadership, TRUE);
|
||||
}
|
||||
|
||||
// Flugente: our pool of volunteers limits how many militia can be created
|
||||
ubMilitiaToTrain = min( ubMilitiaToTrain, GetVolunteerPool( ) );
|
||||
|
||||
// HEADROCK HAM 3.4: Composition of new Mobile Militia groups is now dictated by two INI settings controlling
|
||||
// the percentage of Elites and Regulars within the group. If the percentage for either is above 0, at least
|
||||
// one militia of that type will be created every time. Green militia are created based on whatever remains.
|
||||
@@ -302,6 +305,9 @@ void GenerateMilitiaSquad(INT16 sMapX, INT16 sMapY, INT16 sTMapX, INT16 sTMapY,
|
||||
ubTargetGreen--;
|
||||
}
|
||||
|
||||
// Flugente: substract volunteers
|
||||
AddVolunteers( -ubMilitiaToTrain );
|
||||
|
||||
while (ubMilitiaToTrain > 0)
|
||||
{
|
||||
|
||||
@@ -447,7 +453,7 @@ void GenerateMilitiaSquad(INT16 sMapX, INT16 sMapY, INT16 sTMapX, INT16 sTMapY,
|
||||
--pTargetSector->ubNumberOfCivsAtLevel[ELITE_MILITIA];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update the militia if the current sector is affected
|
||||
if (gfStrategicMilitiaChangesMade)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user