diff options
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c index acf0173de..fef339163 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -235,11 +235,13 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e) case WE_PAINT: { Vehicle *v = GetVehicle(w->window_number); StringID str; + bool is_localplayer = v->owner == _local_player; - SetWindowWidgetDisabledState(w, 7, v->owner != _local_player); - SetWindowWidgetDisabledState(w, 8, v->owner != _local_player); + SetWindowWidgetDisabledState(w, 7, !is_localplayer); + SetWindowWidgetDisabledState(w, 8, !is_localplayer); + SetWindowWidgetDisabledState(w, 11, !is_localplayer); /* Disable refit button if vehicle not refittable */ - SetWindowWidgetDisabledState(w, 12, v->owner != _local_player || + SetWindowWidgetDisabledState(w, 12, !is_localplayer || _engine_info[v->engine_type].refit_mask == 0); /* draw widgets & caption */ |