New feature: individual militia creates small militia profiles that track a militia's history and allow it to be recreated, thereby maintaining the illusion of persistent militia.

Requires GameDir >= r2316.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23044&goto=345324&#msg_345324

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8202 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-05-06 14:51:24 +00:00
parent 67927ed723
commit 9f52c940a8
75 changed files with 6740 additions and 703 deletions
+10
View File
@@ -98,6 +98,7 @@
#include "Auto Bandage.h" // added by Flugente
#include "Facilities.h" // added by Flugente
#include "Cheats.h" // added by Flugente
#include "MilitiaIndividual.h" // added by Flugente
#endif
#include "ub_config.h"
@@ -1022,6 +1023,8 @@ SOLDIERTYPE& SOLDIERTYPE::operator=(const OLDSOLDIERTYPE_101& src)
this->wornSnowCamo = __min( (100 - gGameExternalOptions.bCamoKitArea), src.wornSnowCamo );
this->bScopeMode = USE_BEST_SCOPE;
this->ubMilitiaAssists = 0;
this->bFoodLevel = 0;
this->bDrinkLevel = 0;
@@ -1029,6 +1032,7 @@ SOLDIERTYPE& SOLDIERTYPE::operator=(const OLDSOLDIERTYPE_101& src)
this->usStarveDamageStrength = 0;
this->bAIIndex = 0;
this->usSoldierProfile = 0;
this->usIndividualMilitiaID = 0;
this->usAISkillUse = 0;
for ( UINT8 i = 0; i < SOLDIER_COUNTER_MAX; ++i ) this->usSkillCounter[i] = 0;
@@ -16633,6 +16637,12 @@ STR16 SOLDIERTYPE::GetName( )
tmpname[tmpuser][0] = '\0';
wcscat( tmpname[tmpuser], this->name );
MILITIA militia;
if ( GetMilitia( this->usIndividualMilitiaID, &militia ) )
{
return militia.GetName( );
}
if ( this->usSoldierProfile )
{
INT8 type = this->GetSoldierProfileType( this->bTeam );