mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- external feeding checks for invalid gridno
- reordered xmls - new feature: class specific gun and item choices allows finetuning of a soldier's equipment WARNING! This exe needs GameDir revision >= 1584, as xmls have been reordered! More info under http://www.bears-pit.com/board/ubbthreads.php/topics/313782/Re_New_feature_Class_specific_.html#Post313782 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5764 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3015,7 +3015,7 @@ SOLDIERTYPE* TacticalCreateCreature( INT8 bCreatureBodyType )
|
||||
return TacticalCreateSoldier( &pp, &ubID );
|
||||
}
|
||||
|
||||
// Flugente: assassins are elite soldiers of the civ team that go hostile on a certain event, otherwsie they jsut blend in
|
||||
// Flugente: assassins are elite soldiers of the civ team that go hostile on a certain event, otherwsie they just blend in
|
||||
SOLDIERTYPE* TacticalCreateEnemyAssassin(UINT8 disguisetype)
|
||||
{
|
||||
BASIC_SOLDIERCREATE_STRUCT bp;
|
||||
@@ -3033,9 +3033,18 @@ SOLDIERTYPE* TacticalCreateEnemyAssassin(UINT8 disguisetype)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
UINT8 assassinclass = SOLDIER_CLASS_GREEN_MILITIA;
|
||||
if ( disguisetype == REGULAR_MILITIA )
|
||||
assassinclass = SOLDIER_CLASS_REG_MILITIA;
|
||||
else if ( disguisetype == ELITE_MILITIA )
|
||||
assassinclass = SOLDIER_CLASS_ELITE_MILITIA;
|
||||
else if ( disguisetype > ELITE_MILITIA )
|
||||
// invalid class, abort
|
||||
return NULL;
|
||||
|
||||
memset( &bp, 0, sizeof( BASIC_SOLDIERCREATE_STRUCT ) );
|
||||
RandomizeRelativeLevel( &( bp.bRelativeAttributeLevel ), SOLDIER_CLASS_ELITE );
|
||||
RandomizeRelativeLevel( &( bp.bRelativeEquipmentLevel ), SOLDIER_CLASS_ELITE );
|
||||
RandomizeRelativeLevel( &( bp.bRelativeAttributeLevel ), assassinclass );
|
||||
RandomizeRelativeLevel( &( bp.bRelativeEquipmentLevel ), assassinclass );
|
||||
bp.bTeam = CIV_TEAM;
|
||||
bp.bOrders = SEEKENEMY;
|
||||
bp.bAttitude = (INT8) Random( MAXATTITUDES );
|
||||
|
||||
Reference in New Issue
Block a user