mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- New Feature: enemies roles allows the AI to use medics and officers, and the player can now identify high-value targets among the enemy.
Requires GameDir >= r1987. - If an enemy is spawned with a radio set, he is more likely to become a radio operator. - It is now possible to mount a gun on prone allies if you are facing them on the right angle. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7072 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+14
-5
@@ -129,21 +129,27 @@ INT8 GetMoraleModifier( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
INT8 morale = 0;
|
||||
|
||||
// use AI morale
|
||||
switch( pSoldier->aiData.bAIMorale )
|
||||
{
|
||||
case MORALE_HOPELESS:
|
||||
return( -15 );
|
||||
morale = -15;
|
||||
case MORALE_WORRIED:
|
||||
return( -7 );
|
||||
morale = -7;
|
||||
case MORALE_CONFIDENT:
|
||||
return( 2 );
|
||||
morale = -2;
|
||||
case MORALE_FEARLESS:
|
||||
return( 5 );
|
||||
morale = -5;
|
||||
default:
|
||||
return( 0 );
|
||||
morale = 0;
|
||||
}
|
||||
|
||||
// Flugente: morale modifiers
|
||||
morale = max(morale, morale * pSoldier->GetMoraleModifier());
|
||||
|
||||
return morale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,6 +372,9 @@ void RefreshSoldierMorale( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: morale modifiers
|
||||
iActualMorale = iActualMorale * pSoldier->GetMoraleModifier();
|
||||
|
||||
// Flugente: ubMaxMorale can now be influenced by our food situation
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
FoodMaxMoraleModifiy(pSoldier, &ubMaxMorale);
|
||||
|
||||
Reference in New Issue
Block a user