Changeset 1306


Ignore:
Timestamp:
07/07/13 23:21:07 (6 years ago)
Author:
TheFatController
Message:

Fixed the 'BA Waypoint Dragger' widget causing crashes with some mice (engine bug - widget didn't need to trigger it)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/luaui/widgets/unit_waypoint_dragger_2.lua

    r4 r1306  
    11local sprGetActiveCommand    = Spring.GetActiveCommand 
    2 local sprGetDefaultCommand   = Spring.GetDefaultCommand 
    32local sprGetGameSeconds      = Spring.GetGameSeconds 
    43local sprGetSelectedUnits    = Spring.GetSelectedUnits 
     
    298297        --   2. we have the shift key pressed 
    299298        --   3. we pressed the LEFT mouse button (otherwise shift-move orders would break) 
    300         --   4. our default command is Move (ie. we haven't clicked on a build-icon, etc.) [?] 
    301         --   5. our mouse cursor is within "grabbing" radius of (at least) 
     299        --   4. our mouse cursor is within "grabbing" radius of (at least) 
    302300        --      one waypoint of at least one of the units we have selected 
    303301        -- 
    304302        local _, actCmdID, _, _      = sprGetActiveCommand() 
    305         local _, defCmdID, _, _      = sprGetDefaultCommand() 
    306303        local alt, ctrl, meta, shift = sprGetModKeyState() 
    307304        local numWayPts              = 0 
    308  
    309305        if (not shift)                                     then  return false  end 
    310306        if (mb ~= 1)                                       then  return false  end 
    311 --      if (actCmdID ~= CMD.MOVE and defCmdID ~= CMD.MOVE) then  return false  end 
    312  
    313307        numWayPts = GetWayPointsNearCursor(selWayPtsTbl, mx, my) 
    314308 
Note: See TracChangeset for help on using the changeset viewer.