diff options
author | darkvater <darkvater@openttd.org> | 2004-09-01 21:54:12 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-09-01 21:54:12 +0000 |
commit | 3b96ad994c43581918c3a5fa060f184d2c730f71 (patch) | |
tree | 70c7281080f4c25e80d32f9e7c77816a506ca463 /economy.c | |
parent | 6f3c862a242bb69cbad434dea4f8b1123728f04f (diff) | |
download | openttd-3b96ad994c43581918c3a5fa060f184d2c730f71.tar.xz |
(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
-Some layout fixes for command.c
-Tileinfo debug window in console now shows Tile in decimal numbers
Diffstat (limited to 'economy.c')
-rw-r--r-- | economy.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -12,7 +12,7 @@ #include "industry.h" #include "town.h" -static void UpdatePlayerHouse(Player *p, uint score) +void UpdatePlayerHouse(Player *p, uint score) { byte val; uint tile = p->location_of_house; @@ -82,7 +82,7 @@ uint32 CalculateCompanyValue(Player *p) { // if update is set to true, the economy is updated with this score // (also the house is updated, should only be true in the on-tick event) -void UpdateCompanyRatingAndValue(Player *p, bool update) +int UpdateCompanyRatingAndValue(Player *p, bool update) { byte owner = p->index; int score = 0; @@ -225,6 +225,7 @@ void UpdateCompanyRatingAndValue(Player *p, bool update) } InvalidateWindow(WC_PERFORMANCE_DETAIL, 0); + return score; } // use 255 as new_player to delete the player. @@ -385,7 +386,7 @@ year_4: p->bankrupt_timeout = 0x456; } else { p->money64 = p->player_money = 100000000; - ChangeOwnershipOfPlayerItems(owner, 0xFF); + ChangeOwnershipOfPlayerItems(owner, 0xFF); // 255 is no owner p->is_active = false; } } |