From 1434c7746d05b88f2d3cacfd7c9797d248009f4a Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 19 May 2007 12:46:48 +0000 Subject: (svn r9879) -Fix (r9874): global autoreplace was little broken ;) --- src/players.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3-54-g00ecf