diff options
author | bjarni <bjarni@openttd.org> | 2005-11-18 23:41:03 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-11-18 23:41:03 +0000 |
commit | 16e65960b99b001e5233eabca306fc8a5a8a85ec (patch) | |
tree | 3dd0d12983f0eaa08af460475f1f8b0a2c961d75 /network_server.c | |
parent | 65d9eb07a986f6ba22ab06aa1066008db3bb216b (diff) | |
download | openttd-16e65960b99b001e5233eabca306fc8a5a8a85ec.tar.xz |
(svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
Diffstat (limited to 'network_server.c')
-rw-r--r-- | network_server.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/network_server.c b/network_server.c index cbfa0c19e..2dd20ffc5 100644 --- a/network_server.c +++ b/network_server.c @@ -5,6 +5,7 @@ #include "string.h" #include "strings.h" #include "network_data.h" +#include "train.h" #ifdef ENABLE_NETWORK @@ -1271,7 +1272,7 @@ void NetworkPopulateCompanyInfo(void) if (v->owner < MAX_PLAYERS) switch (v->type) { case VEH_Train: - if (v->subtype == TS_Front_Engine) + if (IsFrontEngine(v)) _network_player_info[v->owner].num_vehicle[0]++; break; case VEH_Road: |