Skip to content

Commit

Permalink
Fix another coop war assert hit
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Dec 10, 2024
1 parent 0f909da commit 99db854
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42032,6 +42032,7 @@ void CvDiplomacyAI::CancelAllCoopWars()
for (int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)
{
PlayerTypes eLoopPlayer = (PlayerTypes) iPlayerLoop;
TeamTypes eLoopTeam = GET_PLAYER(eLoopPlayer).getTeam();
if (!GET_PLAYER(eLoopPlayer).isAlive() || eLoopPlayer == GetID())
continue;

Expand All @@ -42041,7 +42042,8 @@ void CvDiplomacyAI::CancelAllCoopWars()
for (int iThirdPartyLoop = 0; iThirdPartyLoop < MAX_MAJOR_CIVS; iThirdPartyLoop++)
{
PlayerTypes eThirdParty = (PlayerTypes) iThirdPartyLoop;
if (GET_PLAYER(eThirdParty).getTeam() == GetTeam())
TeamTypes eThirdPartyTeam = GET_PLAYER(eThirdParty).getTeam();
if (eThirdPartyTeam == GetTeam() || eThirdPartyTeam == eLoopTeam)
continue;

if (pNotify && !bNotified && GetCoopWarState(eLoopPlayer, eThirdParty) == COOP_WAR_STATE_PREPARING)
Expand Down

0 comments on commit 99db854

Please sign in to comment.