1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

disallow peep pickup if group does not have permission

This commit is contained in:
zsilencer
2016-01-23 16:36:16 -07:00
parent 5a72cb02f1
commit 845c7ad067

View File

@@ -618,6 +618,15 @@ void window_guest_overview_mouse_up(rct_window *w, int widgetIndex)
window_guest_set_page(w, widgetIndex - WIDX_TAB_1);
break;
case WIDX_PICKUP:
{ // remove this block when peep pick up is finally converted to a game command
int player = network_get_player_index(network_get_current_player_id());
if (player != -1) {
if (!network_can_perform_action(network_get_group_index(network_get_player_group(player)), 11/*Guest action*/)) {
window_error_open(STR_CANT_DO_THIS, STR_PERMISSION_DENIED);
return;
}
}
} //
if (!peep_can_be_picked_up(peep)) {
return;
}