mirror of https://github.com/OpenTTD/OpenTTD
(svn r3415) - Fix: Disable the clone and refit buttons in the train view when viewing another player's vehicles, or as a spectator. (thanks to UnderBuilder for pointing this out)
parent
d13763a9c4
commit
a1342c9d52
|
@ -905,7 +905,10 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
|
||||||
|
|
||||||
v = GetVehicle(w->window_number);
|
v = GetVehicle(w->window_number);
|
||||||
|
|
||||||
w->disabled_state = (v->owner == _local_player) ? 0 : 0x380;
|
if (v->owner != _local_player) {
|
||||||
|
w->disabled_state = 0x3380;
|
||||||
|
} else {
|
||||||
|
w->disabled_state = 0;
|
||||||
|
|
||||||
SETBIT(w->disabled_state, 12);
|
SETBIT(w->disabled_state, 12);
|
||||||
|
|
||||||
|
@ -918,6 +921,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* draw widgets & caption */
|
/* draw widgets & caption */
|
||||||
SetDParam(0, v->string_id);
|
SetDParam(0, v->string_id);
|
||||||
|
|
Loading…
Reference in New Issue