Skip to content

Commit

Permalink
Tiny cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Dec 4, 2024
1 parent 44ff4e1 commit 6949fdd
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
Original file line number Diff line number Diff line change
@@ -41862,9 +41862,7 @@ CoopWarStates CvDiplomacyAI::RespondToCoopWarRequest(PlayerTypes eAskingPlayer,
{
// Update approach to WAR
SetCivApproach(eTargetPlayer, CIV_APPROACH_WAR);

if (!GET_PLAYER(eAskingPlayer).isHuman())
GET_PLAYER(eAskingPlayer).GetDiplomacyAI()->SetCivApproach(eTargetPlayer, CIV_APPROACH_WAR);
GET_PLAYER(eAskingPlayer).GetDiplomacyAI()->SetCivApproach(eTargetPlayer, CIV_APPROACH_WAR);
}

return eResponse;
10 changes: 5 additions & 5 deletions CvGameCoreDLL_Expansion2/CvTacticalAI.cpp
Original file line number Diff line number Diff line change
@@ -7646,7 +7646,7 @@ int TacticalAIHelpers::SentryScore(const CvPlot * pPlot, PlayerTypes ePlayer)

STacticalAssignment ScorePlotForPillageMove(const SUnitStats& unit, const CvTacticalPlot& testPlot, const SMovePlot& movePlot, const CvTacticalPosition& assumedPosition)
{
//default action is do nothing and invalid score (not -INT_MAX to to prevent overflows!)
//default action is do nothing and invalid score (not -INT_MAX, to prevent overflows!)
STacticalAssignment result(unit.iPlotIndex,movePlot.iPlotIndex,unit.iUnitID,movePlot.iMovesLeft,unit.eMoveStrategy,TACTICAL_COMBAT_IMPOSSIBLE_SCORE,A_MOVE);

//the plot we're checking right now
@@ -7900,7 +7900,7 @@ int ScoreTurnEnd(const CvUnit* pUnit, eUnitAssignmentType eLastAssignment, const
STacticalAssignment ScorePlotForCombatUnitOffensiveMove(const SUnitStats& unit, const CvTacticalPlot& testPlot, const SMovePlot& movePlot,
const CvTacticalPosition& assumedPosition, eUnitMoveEvalMode evalMode)
{
//default action is do nothing and invalid score (not -INT_MAX to to prevent overflows!)
//default action is do nothing and invalid score (not -INT_MAX, to prevent overflows!)
STacticalAssignment result(unit.iPlotIndex,movePlot.iPlotIndex,unit.iUnitID,movePlot.iMovesLeft,unit.eMoveStrategy,TACTICAL_COMBAT_IMPOSSIBLE_SCORE,A_MOVE);

//the plot we're checking right now
@@ -8032,7 +8032,7 @@ STacticalAssignment ScorePlotForCombatUnitOffensiveMove(const SUnitStats& unit,
STacticalAssignment ScorePlotForCombatUnitDefensiveMove(const SUnitStats& unit, const CvTacticalPlot& testPlot, const SMovePlot& movePlot,
const CvTacticalPosition& assumedPosition, eUnitMoveEvalMode evalMode)
{
//default action is do nothing and invalid score (not -INT_MAX to to prevent overflows!)
//default action is do nothing and invalid score (not -INT_MAX, to prevent overflows!)
STacticalAssignment result(unit.iPlotIndex,movePlot.iPlotIndex,unit.iUnitID,movePlot.iMovesLeft,unit.eMoveStrategy,TACTICAL_COMBAT_IMPOSSIBLE_SCORE,A_MOVE);

//the plot we're checking right now
@@ -8146,7 +8146,7 @@ STacticalAssignment ScorePlotForCombatUnitDefensiveMove(const SUnitStats& unit,
STacticalAssignment ScorePlotForNonFightingUnitMove(const SUnitStats& unit, const CvTacticalPlot& testPlot, const SMovePlot& movePlot,
const CvTacticalPosition& assumedPosition, eUnitMoveEvalMode evalMode)
{
//default action is do nothing and invalid score (not -INT_MAX to to prevent overflows!)
//default action is do nothing and invalid score (not -INT_MAX, to prevent overflows!)
STacticalAssignment result(unit.iPlotIndex,movePlot.iPlotIndex,unit.iUnitID,movePlot.iMovesLeft,unit.eMoveStrategy,TACTICAL_COMBAT_IMPOSSIBLE_SCORE,A_MOVE);
int iScore = 0;

@@ -10692,7 +10692,7 @@ float CvTacticalPosition::getAggressionBias() const
}

//this is intended to filter out the no-chance-in-hell moves
//it's not intended to to be final check, the situation can still change as the sim progresses
//it's not intended to be the final check, the situation can still change as the sim progresses
bool CvTacticalPosition::couldEndTurnAfterThisAssignment(const STacticalAssignment& assignment) const
{
int iEndPlotIndex = -1;

0 comments on commit 6949fdd

Please sign in to comment.