summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-16 20:57:49 +0000
committersmatz <smatz@openttd.org>2008-09-16 20:57:49 +0000
commit7ae255a553aa6c970bc2b68abbe395c42638aaca (patch)
tree9ebff093300fc9e6d80ace96bf9b70e7f6227c8e /src/economy.cpp
parentc9983422064228ef404cb7a3b5b149a1c4a82c0b (diff)
downloadopenttd-7ae255a553aa6c970bc2b68abbe395c42638aaca.tar.xz
(svn r14348) -Fix (r1667): signs were not updated on company bankrupcy/sell, they have colour of invalid player
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index a80ea602d..8629fc270 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -45,6 +45,7 @@
#include "gfx_func.h"
#include "autoreplace_func.h"
#include "player_gui.h"
+#include "signs_base.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -467,6 +468,11 @@ void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player)
}
}
+ Sign *si;
+ FOR_ALL_SIGNS(si) {
+ if (si->owner == old_player) si->owner = new_player == PLAYER_SPECTATOR ? OWNER_NONE : new_player;
+ }
+
/* Change color of existing windows */
if (new_player != PLAYER_SPECTATOR) ChangeWindowOwner(old_player, new_player);