mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Mercs won't attack teammates or neutrals (profile-based) if their opinion of them is > 20. For good guys, that value is -20.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8365 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -77,6 +77,7 @@
|
|||||||
#include "LaptopSave.h" // added by Flugente
|
#include "LaptopSave.h" // added by Flugente
|
||||||
#include "Game Clock.h" // added by Flugente
|
#include "Game Clock.h" // added by Flugente
|
||||||
#include <vfs/Core/vfs_file_raii.h> // added by Flugente for vfs-stuff
|
#include <vfs/Core/vfs_file_raii.h> // added by Flugente for vfs-stuff
|
||||||
|
#include "DynamicDialogue.h" // added by Flugente for SoldierRelation()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
@@ -311,13 +312,17 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
|
|||||||
TacticalCharacterDialogue( pSoldier, QUOTE_REFUSING_ORDER );
|
TacticalCharacterDialogue( pSoldier, QUOTE_REFUSING_ORDER );
|
||||||
return( ITEM_HANDLE_REFUSAL );
|
return( ITEM_HANDLE_REFUSAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pTargetSoldier->ubProfile != NO_PROFILE )
|
if ( pTargetSoldier->ubProfile != NO_PROFILE )
|
||||||
{
|
{
|
||||||
|
// Flugente: as relations are now dynamic, check that instead
|
||||||
// buddies won't shoot each other
|
// buddies won't shoot each other
|
||||||
if ( WhichBuddy( pSoldier->ubProfile, pTargetSoldier->ubProfile ) != -1 )
|
INT8 bOpinion = SoldierRelation( pSoldier, pTargetSoldier );
|
||||||
|
|
||||||
|
if ( bOpinion > BUDDY_OPINION - 5 || ((gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) && bOpinion > HATED_OPINION + 5) )
|
||||||
{
|
{
|
||||||
TacticalCharacterDialogue( pSoldier, QUOTE_REFUSING_ORDER );
|
TacticalCharacterDialogue( pSoldier, QUOTE_REFUSING_ORDER );
|
||||||
return( ITEM_HANDLE_REFUSAL );
|
return(ITEM_HANDLE_REFUSAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user