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

This commit is contained in:
rubidium 2007-05-19 12:46:48 +00:00
parent 4570a8954a
commit 1434c7746d
1 changed files with 2 additions and 3 deletions

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