(svn r9879) -Fix (r9874): global autoreplace was little broken ;)

This commit is contained in:
rubidium
2007-05-19 12:46:48 +00:00
parent 86bb5cc2a6
commit a7edb4e914

View File

@@ -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 */