mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r9879) -Fix (r9874): global autoreplace was little broken ;)
This commit is contained in:
parent
4570a8954a
commit
1434c7746d
@ -695,11 +695,10 @@ int32 CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
case 3: {
|
case 3: {
|
||||||
EngineID old_engine_type = GB(p2, 0, 16);
|
EngineID old_engine_type = GB(p2, 0, 16);
|
||||||
EngineID new_engine_type = GB(p2, 16, 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;
|
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) {
|
if (new_engine_type != INVALID_ENGINE) {
|
||||||
/* First we make sure that it's a valid type the user requested
|
/* 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 */
|
* check that it's an engine that is in the engine array */
|
||||||
|
Loading…
Reference in New Issue
Block a user