summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/players.cpp b/src/players.cpp
index f886e287a..3945b2424 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -811,10 +811,12 @@ CommandCost CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (_local_player != _network_playas && _network_playas == p->index) {
assert(_local_player == PLAYER_SPECTATOR);
SetLocalPlayer(p->index);
+#ifdef ENABLE_NETWORK
if (!StrEmpty(_network_default_company_pass)) {
char *password = _network_default_company_pass;
NetworkChangeCompanyPassword(1, &password);
}
+#endif /* ENABLE_NETWORK */
MarkWholeScreenDirty();
}