mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: killing Doreen after having already convinced her to leave peacefully does not fully remove the loyalty gain for the peaceful solution, despite that being intended
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8835 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3811,9 +3811,16 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
// Doreen's dead
|
||||
if ( CheckFact( FACT_DOREEN_HAD_CHANGE_OF_HEART, 0 ) )
|
||||
{
|
||||
// Flugente: if we want to remove the previous bonus, we have to take the town sentiment into account, which is accounted differently when decrementing or incrementing
|
||||
UINT32 loyaltychange = LOYALTY_BONUS_CHILDREN_FREED_DOREEN_SPARED;
|
||||
loyaltychange *= ( 5 * gubTownRebelSentiment[DRASSEN] ) * ( 5 * gubTownRebelSentiment[DRASSEN] );
|
||||
loyaltychange /= 100 * 100;
|
||||
|
||||
// tsk tsk, player killed her after getting her to reconsider, lose the bonus for sparing her
|
||||
DecrementTownLoyalty( DRASSEN, LOYALTY_BONUS_CHILDREN_FREED_DOREEN_SPARED );
|
||||
} // then get the points for freeing the kids though killing her
|
||||
DecrementTownLoyalty( DRASSEN, loyaltychange );
|
||||
}
|
||||
|
||||
// then get the points for freeing the kids though killing her
|
||||
IncrementTownLoyalty( DRASSEN, LOYALTY_BONUS_CHILDREN_FREED_DOREEN_KILLED );
|
||||
// set the fact true so we have a universal check for whether the kids can go
|
||||
SetFactTrue( FACT_DOREEN_HAD_CHANGE_OF_HEART );
|
||||
|
||||
Reference in New Issue
Block a user