mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix for Dynamic Opinions feature not respecting ini setting and not allowing it to be disabled easily (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9002 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -736,7 +736,10 @@ void FinishIncident(INT16 sX, INT16 sY, INT8 sZ)
|
|||||||
gCurrentIncident.usOneTimeEventFlags |= INCIDENT_ONETIMEEVENT_OMERTA;
|
gCurrentIncident.usOneTimeEventFlags |= INCIDENT_ONETIMEEVENT_OMERTA;
|
||||||
|
|
||||||
// dynamic opinions
|
// dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionBattleFinished((gCurrentIncident.usIncidentFlags & INCIDENT_WIN) != 0);
|
HandleDynamicOpinionBattleFinished((gCurrentIncident.usIncidentFlags & INCIDENT_WIN) != 0);
|
||||||
|
}
|
||||||
|
|
||||||
gCampaignStats.AddNewIncident(gCurrentIncident);
|
gCampaignStats.AddNewIncident(gCurrentIncident);
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,10 @@ UINT32 AddTransactionToPlayersBook (UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiD
|
|||||||
// process the actual data
|
// process the actual data
|
||||||
|
|
||||||
// Flugente: dynamic opinion
|
// Flugente: dynamic opinion
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionOnContractExtension(ubCode, ubSecondCode);
|
HandleDynamicOpinionOnContractExtension(ubCode, ubSecondCode);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If this transaction is for the hiring/extending of a mercs contract
|
// If this transaction is for the hiring/extending of a mercs contract
|
||||||
|
|||||||
@@ -5863,9 +5863,12 @@ void FatigueCharacter( SOLDIERTYPE *pSoldier )
|
|||||||
bMaxBreathLoss = (float)min( 127, iBreathLoss );
|
bMaxBreathLoss = (float)min( 127, iBreathLoss );
|
||||||
|
|
||||||
// Flugente: dynamic opinions: other mercs might get annoyed, because we are slowing down the team
|
// Flugente: dynamic opinions: other mercs might get annoyed, because we are slowing down the team
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_SLOWSUSDOWN, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_SLOWSUSDOWN, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if breath max is below the "really tired" threshold
|
// if breath max is below the "really tired" threshold
|
||||||
if( pSoldier->bBreathMax < BREATHMAX_PRETTY_TIRED )
|
if( pSoldier->bBreathMax < BREATHMAX_PRETTY_TIRED )
|
||||||
|
|||||||
@@ -4887,7 +4887,7 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
|||||||
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsOthers++;
|
gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsOthers++;
|
||||||
|
|
||||||
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
||||||
if ( (pTarget->pSoldier->bTeam != OUR_TEAM) && (pTarget->pSoldier->aiData.bNeutral || pTarget->pSoldier->bSide == pAttacker->pSoldier->bSide) )
|
if ((gGameExternalOptions.fDynamicOpinions) && (pTarget->pSoldier->bTeam != OUR_TEAM) && (pTarget->pSoldier->aiData.bNeutral || pTarget->pSoldier->bSide == pAttacker->pSoldier->bSide) )
|
||||||
{
|
{
|
||||||
// not for killing animals though...
|
// not for killing animals though...
|
||||||
if ( pTarget->pSoldier->ubBodyType != CROW && pTarget->pSoldier->ubBodyType != COW )
|
if ( pTarget->pSoldier->ubBodyType != CROW && pTarget->pSoldier->ubBodyType != COW )
|
||||||
|
|||||||
@@ -461,7 +461,10 @@ void HourlyLarryUpdate()
|
|||||||
fTookDrugs = TRUE;
|
fTookDrugs = TRUE;
|
||||||
|
|
||||||
// Flugente: dynamic opinion
|
// Flugente: dynamic opinion
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ADDICT, TRUE, FALSE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ADDICT, TRUE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
if ( fBar )
|
if ( fBar )
|
||||||
{
|
{
|
||||||
@@ -645,7 +648,10 @@ void HourlyDisabilityUpdate( )
|
|||||||
pSoldier->bBleeding = oldbleeding;
|
pSoldier->bBleeding = oldbleeding;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
// say something (which might also alert the player to what we just did)
|
// say something (which might also alert the player to what we just did)
|
||||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||||
@@ -820,10 +826,13 @@ void HourlyStealUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: dynamic opinion
|
// Flugente: dynamic opinion
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_THIEF, TRUE, FALSE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_THIEF, TRUE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN RemoveItemInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem, UINT32 usNumToRemove )
|
BOOLEAN RemoveItemInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usItem, UINT32 usNumToRemove )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -601,7 +601,10 @@ void MercDailyUpdate()
|
|||||||
HandleSnitchCheck();
|
HandleSnitchCheck();
|
||||||
|
|
||||||
// Flugente: dynmaic opinion rollover
|
// Flugente: dynmaic opinion rollover
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionsDailyRefresh();
|
HandleDynamicOpinionsDailyRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
// Flugente: disease
|
// Flugente: disease
|
||||||
HandleDiseaseDailyRefresh();
|
HandleDiseaseDailyRefresh();
|
||||||
|
|||||||
@@ -2178,7 +2178,7 @@ void HandleLoyaltyImplicationsOfMercRetreat( INT8 bRetreatCode, INT16 sSectorX,
|
|||||||
|
|
||||||
// Flugente: dynamic opinion: mercs retreated. Someone has to be blamed for this shameful defeat!
|
// Flugente: dynamic opinion: mercs retreated. Someone has to be blamed for this shameful defeat!
|
||||||
// only do this if the enemy actually noticed us - no need to punish the player for a successful stealth operation
|
// only do this if the enemy actually noticed us - no need to punish the player for a successful stealth operation
|
||||||
if ( gTacticalStatus.Team[ENEMY_TEAM].bAwareOfOpposition )
|
if (gGameExternalOptions.fDynamicOpinions && gTacticalStatus.Team[ENEMY_TEAM].bAwareOfOpposition )
|
||||||
{
|
{
|
||||||
HandleDynamicOpinionRetreat();
|
HandleDynamicOpinionRetreat();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -850,7 +850,7 @@ void ChangeStat( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UINT8 ubSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
if ( FROM_TRAINING == ubReason )
|
if (gGameExternalOptions.fDynamicOpinions && FROM_TRAINING == ubReason )
|
||||||
HandleDynamicOpinionTeaching( pSoldier, ubStat );
|
HandleDynamicOpinionTeaching( pSoldier, ubStat );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ void HandleDisease()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we are infected, this might disgust other people, but only if it's visisble to them (we assume doctors dont mention this to others)
|
// if we are infected, this might disgust other people, but only if it's visisble to them (we assume doctors dont mention this to others)
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
for (int i = 0; i < NUM_DISEASES; ++i)
|
for (int i = 0; i < NUM_DISEASES; ++i)
|
||||||
{
|
{
|
||||||
if ((Disease[i].usDiseaseProperties & DISEASE_PROPERTY_DISGUSTING) &&
|
if ((Disease[i].usDiseaseProperties & DISEASE_PROPERTY_DISGUSTING) &&
|
||||||
@@ -159,6 +161,7 @@ void HandleDisease()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// chance for infection due sector
|
// chance for infection due sector
|
||||||
for ( uiCnt = 0, pSoldier = MercPtrs[uiCnt]; uiCnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; ++uiCnt, ++pSoldier )
|
for ( uiCnt = 0, pSoldier = MercPtrs[uiCnt]; uiCnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; ++uiCnt, ++pSoldier )
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed
|
|||||||
gMercProfiles[LARRY_NORMAL].bNPCData = __max( gMercProfiles[LARRY_NORMAL].bNPCData, LARRY_FALLS_OFF_WAGON );
|
gMercProfiles[LARRY_NORMAL].bNPCData = __max( gMercProfiles[LARRY_NORMAL].bNPCData, LARRY_FALLS_OFF_WAGON );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( NewDrug[drugused].opinionevent )
|
if (gGameExternalOptions.fDynamicOpinions && NewDrug[drugused].opinionevent )
|
||||||
{
|
{
|
||||||
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, TRUE );
|
HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ADDICT, TRUE, TRUE );
|
||||||
}
|
}
|
||||||
@@ -194,8 +194,11 @@ BOOLEAN ApplyDrugs_New( SOLDIERTYPE *pSoldier, UINT16 usItem, UINT16 uStatusUsed
|
|||||||
|
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_DRANK_SOME], pSoldier->GetName( ), ShortItemNames[usItem] );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_DRANK_SOME], pSoldier->GetName( ), ShortItemNames[usItem] );
|
||||||
|
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionTeamDrinking(pSoldier);
|
HandleDynamicOpinionTeamDrinking(pSoldier);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// set flag: we are on non-alcoholic drugs
|
// set flag: we are on non-alcoholic drugs
|
||||||
|
|||||||
@@ -647,10 +647,13 @@ void HourlyFoodAutoDigestion( SOLDIERTYPE *pSoldier )
|
|||||||
EatFromInventory( pSoldier, FALSE );
|
EatFromInventory( pSoldier, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
// dynamic opinions: if we're still really hungry an someone in this sector has food, we get a lwoer opinion of him, as he obviously doesn't share
|
// dynamic opinions: if we're still really hungry an someone in this sector has food, we get a lwoer opinion of him, as he obviously doesn't share
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_NOSHARINGFOOD, FALSE, FALSE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_NOSHARINGFOOD, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// eat stuff from the inventory. if fcanteensonly = TRUE, only drink from canteen items
|
// eat stuff from the inventory. if fcanteensonly = TRUE, only drink from canteen items
|
||||||
void EatFromInventory( SOLDIERTYPE *pSoldier, BOOLEAN fcanteensonly )
|
void EatFromInventory( SOLDIERTYPE *pSoldier, BOOLEAN fcanteensonly )
|
||||||
|
|||||||
@@ -410,7 +410,10 @@ INT8 HireMerc( MERC_HIRE_STRUCT *pHireMerc)
|
|||||||
RemoveNewlyHiredMercFromPersonnelDepartedList( pSoldier->ubProfile );
|
RemoveNewlyHiredMercFromPersonnelDepartedList( pSoldier->ubProfile );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
CheckForFriendsofHated(pSoldier);
|
CheckForFriendsofHated(pSoldier);
|
||||||
|
}
|
||||||
|
|
||||||
gfAtLeastOneMercWasHired = TRUE;
|
gfAtLeastOneMercWasHired = TRUE;
|
||||||
|
|
||||||
|
|||||||
@@ -334,11 +334,14 @@ void DecayTacticalMoraleModifiers( void )
|
|||||||
HandleMoraleEvent(pSoldier, MORALE_NERVOUS_ALONE, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ);
|
HandleMoraleEvent(pSoldier, MORALE_NERVOUS_ALONE, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ);
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DecayTacticalMorale( pSoldier );
|
DecayTacticalMorale( pSoldier );
|
||||||
RefreshSoldierMorale( pSoldier );
|
RefreshSoldierMorale( pSoldier );
|
||||||
@@ -1528,9 +1531,12 @@ void HandleSnitchesReports( std::vector<SnitchEvent>& aVec )
|
|||||||
event2.ubEventType = NUM_SNITCH_EVENTS;
|
event2.ubEventType = NUM_SNITCH_EVENTS;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
AddOpinionEvent(event2.ubTargetProfile, pSnitch->ubProfile, OPINIONEVENT_SNITCHSOLDMEOUT);
|
AddOpinionEvent(event2.ubTargetProfile, pSnitch->ubProfile, OPINIONEVENT_SNITCHSOLDMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( fSleepingSnitch )
|
if ( fSleepingSnitch )
|
||||||
TacticalCharacterDialogueWithSpecialEvent( FindSoldierByProfileID( bSnitchID, TRUE ), 0, DIALOGUE_SPECIAL_EVENT_SLEEP, 1, 0 );
|
TacticalCharacterDialogueWithSpecialEvent( FindSoldierByProfileID( bSnitchID, TRUE ), 0, DIALOGUE_SPECIAL_EVENT_SLEEP, 1, 0 );
|
||||||
|
|||||||
@@ -2558,9 +2558,12 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
|||||||
UnSetUIBusy( pSoldier->ubID );
|
UnSetUIBusy( pSoldier->ubID );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3418,10 +3421,13 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
|||||||
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
pSoldier->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateForContOverPortrait( pSoldier, TRUE );
|
UpdateForContOverPortrait( pSoldier, TRUE );
|
||||||
|
|
||||||
@@ -11008,7 +11014,7 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// dynamic opinion: a merc caused the remaining enemies to give up
|
// dynamic opinion: a merc caused the remaining enemies to give up
|
||||||
if ( gusSelectedSoldier != NOBODY )
|
if (gGameExternalOptions.fDynamicOpinions && gusSelectedSoldier != NOBODY )
|
||||||
HandleDynamicOpinionChange( MercPtrs[gusSelectedSoldier], OPINIONEVENT_BATTLE_TOOK_PRISONER, TRUE, TRUE );
|
HandleDynamicOpinionChange( MercPtrs[gusSelectedSoldier], OPINIONEVENT_BATTLE_TOOK_PRISONER, TRUE, TRUE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -880,8 +880,11 @@ INT32 SkillCheck( SOLDIERTYPE * pSoldier, INT8 bReason, INT8 bChanceMod )
|
|||||||
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// do we realize that we just can't do this?
|
// do we realize that we just can't do this?
|
||||||
if ( (100 - (pSoldier->ubSkillCheckAttempts - 2) * 20) < EffectiveWisdom( pSoldier ) )
|
if ( (100 - (pSoldier->ubSkillCheckAttempts - 2) * 20) < EffectiveWisdom( pSoldier ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4041,7 +4041,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++;
|
||||||
|
|
||||||
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
||||||
if ( pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide) )
|
if (gGameExternalOptions.fDynamicOpinions && pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide) )
|
||||||
{
|
{
|
||||||
// not for killing animals though...
|
// not for killing animals though...
|
||||||
if ( pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW )
|
if ( pSoldier->ubBodyType != CROW && pSoldier->ubBodyType != COW )
|
||||||
@@ -4055,6 +4055,8 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
gStrategicStatus.usPlayerKills++;
|
gStrategicStatus.usPlayerKills++;
|
||||||
|
|
||||||
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
// Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
if (pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide))
|
if (pSoldier->bTeam != OUR_TEAM && (pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide))
|
||||||
{
|
{
|
||||||
// not for killing animals though...
|
// not for killing animals though...
|
||||||
@@ -4075,6 +4077,7 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ( MercPtrs[ ubAttacker ]->bTeam == MILITIA_TEAM )
|
else if ( MercPtrs[ ubAttacker ]->bTeam == MILITIA_TEAM )
|
||||||
{
|
{
|
||||||
// get a kill! 2 points!
|
// get a kill! 2 points!
|
||||||
|
|||||||
@@ -6815,7 +6815,7 @@ void SoldierGotHitGunFire( SOLDIERTYPE *pSoldier, UINT16 usWeaponIndex, INT16 sD
|
|||||||
pSoldier->ChangeToFlybackAnimation( (UINT8)bDirection );
|
pSoldier->ChangeToFlybackAnimation( (UINT8)bDirection );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
if ( ubAttackerID != NOBODY )
|
if (gGameExternalOptions.fDynamicOpinions && ubAttackerID != NOBODY )
|
||||||
HandleDynamicOpinionChange( MercPtrs[ubAttackerID], OPINIONEVENT_BRUTAL_GOOD, TRUE, TRUE );
|
HandleDynamicOpinionChange( MercPtrs[ubAttackerID], OPINIONEVENT_BRUTAL_GOOD, TRUE, TRUE );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -6830,7 +6830,7 @@ void SoldierGotHitGunFire( SOLDIERTYPE *pSoldier, UINT16 usWeaponIndex, INT16 sD
|
|||||||
pSoldier->EVENT_InitNewSoldierAnim( JFK_HITDEATH, 0, FALSE );
|
pSoldier->EVENT_InitNewSoldierAnim( JFK_HITDEATH, 0, FALSE );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
if ( ubAttackerID != NOBODY )
|
if (gGameExternalOptions.fDynamicOpinions && ubAttackerID != NOBODY )
|
||||||
HandleDynamicOpinionChange( MercPtrs[ubAttackerID], OPINIONEVENT_BRUTAL_GOOD, TRUE, TRUE );
|
HandleDynamicOpinionChange( MercPtrs[ubAttackerID], OPINIONEVENT_BRUTAL_GOOD, TRUE, TRUE );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -8077,10 +8077,13 @@ void SOLDIERTYPE::EVENT_BeginMercTurn( BOOLEAN fFromRealTime, INT32 iRealTimeCou
|
|||||||
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( DoesMercHaveDisability( this, FEAR_OF_INSECTS ) )
|
if ( DoesMercHaveDisability( this, FEAR_OF_INSECTS ) )
|
||||||
{
|
{
|
||||||
@@ -8093,10 +8096,13 @@ void SOLDIERTYPE::EVENT_BeginMercTurn( BOOLEAN fFromRealTime, INT32 iRealTimeCou
|
|||||||
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( DoesMercHaveDisability( this, CLAUSTROPHOBIC ) )
|
if ( DoesMercHaveDisability( this, CLAUSTROPHOBIC ) )
|
||||||
{
|
{
|
||||||
@@ -8110,10 +8116,13 @@ void SOLDIERTYPE::EVENT_BeginMercTurn( BOOLEAN fFromRealTime, INT32 iRealTimeCou
|
|||||||
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( DoesMercHaveDisability( this, NERVOUS ) )
|
if ( DoesMercHaveDisability( this, NERVOUS ) )
|
||||||
{
|
{
|
||||||
@@ -8129,10 +8138,13 @@ void SOLDIERTYPE::EVENT_BeginMercTurn( BOOLEAN fFromRealTime, INT32 iRealTimeCou
|
|||||||
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( this->aiData.bMorale > 45 )
|
if ( this->aiData.bMorale > 45 )
|
||||||
@@ -9723,8 +9735,11 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof(void)
|
|||||||
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
this->usQuoteSaidFlags |= SOLDIER_QUOTE_SAID_PERSONALITY;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// otherwise remove flag, so we'll complain every second time we climb roof
|
// otherwise remove flag, so we'll complain every second time we climb roof
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -10202,6 +10217,8 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
|||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
if (ubAttacker != NOBODY && MercPtrs[ubAttacker] )
|
if (ubAttacker != NOBODY && MercPtrs[ubAttacker] )
|
||||||
|
{
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
{
|
{
|
||||||
AddOpinionEvent(this->ubProfile, MercPtrs[ubAttacker]->ubProfile, OPINIONEVENT_FRIENDLYFIRE);
|
AddOpinionEvent(this->ubProfile, MercPtrs[ubAttacker]->ubProfile, OPINIONEVENT_FRIENDLYFIRE);
|
||||||
|
|
||||||
@@ -10213,6 +10230,7 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
|
|||||||
if (this->ubBodyType != CROW && this->ubBodyType != COW)
|
if (this->ubBodyType != CROW && this->ubBodyType != COW)
|
||||||
HandleDynamicOpinionChange(MercPtrs[ubAttacker], OPINIONEVENT_CIV_ATTACKER, TRUE, TRUE);
|
HandleDynamicOpinionChange(MercPtrs[ubAttacker], OPINIONEVENT_CIV_ATTACKER, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if we are a turncoat, lose the flag if we were attacked by player forces
|
// if we are a turncoat, lose the flag if we were attacked by player forces
|
||||||
if ( (this->usSoldierFlagMask2 & SOLDIER_TURNCOAT) && MercPtrs[ubAttacker]->bSide == 0 )
|
if ( (this->usSoldierFlagMask2 & SOLDIER_TURNCOAT) && MercPtrs[ubAttacker]->bSide == 0 )
|
||||||
@@ -13550,7 +13568,10 @@ UINT32 SOLDIERTYPE::SoldierDressWound( SOLDIERTYPE *pVictim, INT16 sKitPts, INT1
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
AddOpinionEvent(pVictim->ubProfile, this->ubProfile, OPINIONEVENT_BANDAGED);
|
AddOpinionEvent(pVictim->ubProfile, this->ubProfile, OPINIONEVENT_BANDAGED);
|
||||||
|
}
|
||||||
|
|
||||||
bInitialBleeding = pVictim->bBleeding;
|
bInitialBleeding = pVictim->bBleeding;
|
||||||
|
|
||||||
@@ -14575,8 +14596,11 @@ BOOLEAN SOLDIERTYPE::CheckForBreathCollapse( void )
|
|||||||
TacticalCharacterDialogue( this, QUOTE_PERSONALITY_TRAIT );
|
TacticalCharacterDialogue( this, QUOTE_PERSONALITY_TRAIT );
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
HandleDynamicOpinionChange(this, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// WARN!
|
// WARN!
|
||||||
@@ -15026,6 +15050,8 @@ BOOLEAN SOLDIERTYPE::IsWeaponMounted( void )
|
|||||||
applybipod = TRUE;
|
applybipod = TRUE;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
AddOpinionEvent(MercPtrs[usPersonID]->ubProfile, this->ubProfile, OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS);
|
AddOpinionEvent(MercPtrs[usPersonID]->ubProfile, this->ubProfile, OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15033,6 +15059,7 @@ BOOLEAN SOLDIERTYPE::IsWeaponMounted( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ( adjacenttileheight == 4 && (gAnimControl[this->usAnimState].ubEndHeight == ANIM_CROUCH || (gAnimControl[this->usAnimState].ubEndHeight == ANIM_STAND && (gAnimControl[this->usAnimState].uiFlags &(ANIM_ALT_WEAPON_HOLDING)))) )
|
else if ( adjacenttileheight == 4 && (gAnimControl[this->usAnimState].ubEndHeight == ANIM_CROUCH || (gAnimControl[this->usAnimState].ubEndHeight == ANIM_STAND && (gAnimControl[this->usAnimState].uiFlags &(ANIM_ALT_WEAPON_HOLDING)))) )
|
||||||
{
|
{
|
||||||
// tile is as high as a building, but there might be a window, we could look through that
|
// tile is as high as a building, but there might be a window, we could look through that
|
||||||
@@ -15093,12 +15120,15 @@ BOOLEAN SOLDIERTYPE::IsWeaponMounted( void )
|
|||||||
applybipod = TRUE;
|
applybipod = TRUE;
|
||||||
|
|
||||||
// Flugente: dynamic opinions
|
// Flugente: dynamic opinions
|
||||||
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
AddOpinionEvent(MercPtrs[usPersonID]->ubProfile, this->ubProfile, OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS);
|
AddOpinionEvent(MercPtrs[usPersonID]->ubProfile, this->ubProfile, OPINIONEVENT_YOUMOUNTEDAGUNONMYBREASTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(applybipod);
|
return(applybipod);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -417,7 +417,10 @@ void GameLoop(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: dynamic opinions: Dialogue Boxes need to be refreshed
|
// Flugente: dynamic opinions: Dialogue Boxes need to be refreshed
|
||||||
RefreshBoxes( );
|
if (gGameExternalOptions.fDynamicOpinions)
|
||||||
|
{
|
||||||
|
RefreshBoxes();//todo shadooow: tohle mozna zpusobuje bug s opakovanim kecu po vitezstvi
|
||||||
|
}
|
||||||
|
|
||||||
// Flugente:disguised mercs can distract enemies by talking to them. In order to display that, we sometimes display excerpts of their 'chats'
|
// Flugente:disguised mercs can distract enemies by talking to them. In order to display that, we sometimes display excerpts of their 'chats'
|
||||||
CheckChatPartners();
|
CheckChatPartners();
|
||||||
|
|||||||
Reference in New Issue
Block a user