(svn r2994) Another small hack regarding currencies: add a #define to emulate a variable, that holds the current currency; again this should increase readability

This commit is contained in:
tron
2005-09-27 20:55:42 +00:00
parent 324542057d
commit f0e3072b6c
5 changed files with 11 additions and 22 deletions

View File

@@ -83,7 +83,7 @@ void HandleOnEditText(WindowEvent *e)
break;
case 3: { /* Give money, you can only give money in excess of loan */
const Player *p = GetPlayer(_current_player);
int32 money = min(p->money64 - p->current_loan, atoi(e->edittext.str) / GetCurrentCurrencyRate());
int32 money = min(p->money64 - p->current_loan, atoi(e->edittext.str) / _currency->rate);
char msg[20];
money = clamp(money, 0, 20000000); // Clamp between 20 million and 0