(svn r9879) -Fix (r9874): global autoreplace was little broken ;)
authorrubidium
Sat, 19 May 2007 12:46:48 +0000
changeset 7144 f058df019ea2
parent 7143 59366b8e133b
child 7145 07c1f0c9e645
(svn r9879) -Fix (r9874): global autoreplace was little broken ;)
src/players.cpp
--- a/src/players.cpp	Sat May 19 12:29:09 2007 +0000
+++ b/src/players.cpp	Sat May 19 12:46:48 2007 +0000
@@ -695,11 +695,10 @@
 		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 */