diff options
author | rubidium <rubidium@openttd.org> | 2007-05-19 12:46:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-19 12:46:48 +0000 |
commit | a7edb4e9142c676dd3e0d354512a9644c1ec396c (patch) | |
tree | 64cffe4a44d43069e15b7f3b1f8f87646a8f8bc6 /src | |
parent | 86bb5cc2a68c68737d01cd5878e96856eba1950f (diff) | |
download | openttd-a7edb4e9142c676dd3e0d354512a9644c1ec396c.tar.xz |
(svn r9879) -Fix (r9874): global autoreplace was little broken ;)
Diffstat (limited to 'src')
-rw-r--r-- | src/players.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/players.cpp b/src/players.cpp index b142f669b..b172f89b1 100644 --- a/src/players.cpp +++ b/src/players.cpp @@ -695,11 +695,10 @@ int32 CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) case 3: { EngineID old_engine_type = GB(p2, 0, 16); EngineID new_engine_type = GB(p2, 16, 16); - GroupID id_g = GB(p1, 16, 8); + GroupID id_g = GB(p1, 16, 16); int32 cost; - if (!IsValidGroupID(id_g)) return CMD_ERROR; - + if (!IsValidGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR; if (new_engine_type != INVALID_ENGINE) { /* First we make sure that it's a valid type the user requested * check that it's an engine that is in the engine array */ |