diff -r 43884d655281 -r 9ea52370a093 settings_gui.c --- a/settings_gui.c Tue Sep 27 19:16:37 2005 +0000 +++ b/settings_gui.c Tue Sep 27 20:55:42 2005 +0000 @@ -785,7 +785,7 @@ case PE_INT16: return *(int16*)pe->variable; case PE_UINT16: return *(uint16*)pe->variable; case PE_INT32: return *(int32*)pe->variable; - case PE_CURRENCY: return (*(int32*)pe->variable) * GetCurrentCurrencyRate(); + case PE_CURRENCY: return (*(int32*)pe->variable) * _currency->rate; default: NOT_REACHED(); } @@ -878,8 +878,7 @@ DrawStringCentered(x+20, y+1, STR_681A, 0); val = ReadPE(pe); - if (pe->type == PE_CURRENCY) - val /= GetCurrentCurrencyRate(); + if (pe->type == PE_CURRENCY) val /= _currency->rate; disabled = ((val == 0) && (pe->flags & PF_0ISDIS)); if (disabled) { SetDParam(0, STR_CONFIG_PATCHES_DISABLED); @@ -970,9 +969,7 @@ } if (val != oval) { // To make patch-changes network-safe - if (pe->type == PE_CURRENCY) { - val /= GetCurrentCurrencyRate(); - } + if (pe->type == PE_CURRENCY) val /= _currency->rate; // If an item is playerbased, we do not send it over the network (if any) if (pe->flags & PF_PLAYERBASED) { WritePE(pe, val); @@ -1014,9 +1011,7 @@ const PatchEntry *pe = &page->entries[WP(w,def_d).data_3]; int32 val; val = atoi(e->edittext.str); - if (pe->type == PE_CURRENCY) { - val /= GetCurrentCurrencyRate(); - } + if (pe->type == PE_CURRENCY) val /= _currency->rate; // If an item is playerbased, we do not send it over the network (if any) if (pe->flags & PF_PLAYERBASED) { WritePE(pe, val); @@ -1099,7 +1094,7 @@ sscanf(value, "%d", &val); if (pe->type == PE_CURRENCY) // currency can be different on each client - val /= GetCurrentCurrencyRate(); + val /= _currency->rate; // If an item is playerbased, we do not send it over the network (if any) if (pe->flags & PF_PLAYERBASED) {