(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.

This commit is contained in:
rubidium
2007-10-20 14:51:09 +00:00
parent 54369cba0f
commit 8212088c03
12 changed files with 164 additions and 39 deletions

View File

@@ -95,7 +95,7 @@ Money CalculateCompanyValue(const Player* p)
value.AddCost(-p->current_loan);
value.AddCost(p->player_money);
return max(value.GetCost(), 1LL);
return max(value.GetCost(), (Money)1);
}
/** if update is set to true, the economy is updated with this score