Skip to content

Commit

Permalink
CTeam: use HaveResources() in UseResources()
Browse files Browse the repository at this point in the history
No logic change, but ensures that calling the former
can always accurately predict the success of the latter.
  • Loading branch information
sprunk committed Sep 23, 2023
1 parent b2ea43c commit c811228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rts/Sim/Misc/Team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void CTeam::AddResources(SResourcePack amount, bool useIncomeMultiplier)

bool CTeam::UseResources(const SResourcePack& amount)
{
if (!(res >= amount))
if (!HaveResources(amount))
return false;

res -= amount;
Expand Down

0 comments on commit c811228

Please sign in to comment.