Ticket #4302: disable_observer_rightclick_v1.patch

File disable_observer_rightclick_v1.patch, 947 bytes (added by elexis, 7 years ago)
  • binaries/data/mods/public/gui/session/input.js

    function handleInputAfterGui(ev)  
    11581158    return false;
    11591159}
    11601160
    11611161function doAction(action, ev)
    11621162{
     1163    if (Engine.GetPlayerID() != g_ViewedPlayer)
     1164        return false;
     1165
    11631166    var selection = g_Selection.toList();
    11641167
    11651168    // If shift is down, add the order to the unit's order queue instead
    11661169    // of running it immediately
    11671170    var queued = Engine.HotkeyIsPressed("session.queue");
    11681171    var target = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
    11691172
    11701173    if (unitActions[action.type] && unitActions[action.type].execute)
    11711174        return unitActions[action.type].execute(target, action, selection, queued);
     1175
    11721176    error("Invalid action.type "+action.type);
    11731177    return false;
    11741178}
    11751179
    11761180function handleMinimapEvent(target)