equal
deleted
inserted
replaced
592 local crateSprite = nil-- this is a visual gear aid for crate placement |
592 local crateSprite = nil-- this is a visual gear aid for crate placement |
593 local crateSpriteBorer = nil |
593 local crateSpriteBorer = nil |
594 local waypointPreviewSprite = nil |
594 local waypointPreviewSprite = nil |
595 |
595 |
596 local cGear = nil -- detects placement of girders and objects (using airattack) |
596 local cGear = nil -- detects placement of girders and objects (using airattack) |
|
597 local cGearPlacementDone = false |
597 local curWep = amNothing |
598 local curWep = amNothing |
598 local leftHeld = false |
599 local leftHeld = false |
599 local rightHeld = false |
600 local rightHeld = false |
600 local preciseOn = false |
601 local preciseOn = false |
601 |
602 |
3090 if cGear ~= nil then |
3091 if cGear ~= nil then |
3091 |
3092 |
3092 x,y = GetGearTarget(cGear) |
3093 x,y = GetGearTarget(cGear) |
3093 |
3094 |
3094 if GetGearType(cGear) == gtAirAttack and GetCurAmmoType() == amCMGearPlacementTool then |
3095 if GetGearType(cGear) == gtAirAttack and GetCurAmmoType() == amCMGearPlacementTool then |
3095 DeleteGear(cGear) |
3096 SetGearMessage(cGear, bor(GetGearMessage(cGear), gmDestroy)) |
|
3097 if not cGearPlacementDone then |
|
3098 PlaceObject(x, y) |
|
3099 cGearPlacementDone = true |
|
3100 end |
|
3101 elseif GetGearType(cGear) == gtGirder and not cGearPlacementDone then |
|
3102 CGR = GetState(cGear) |
3096 PlaceObject(x, y) |
3103 PlaceObject(x, y) |
3097 elseif GetGearType(cGear) == gtGirder then |
3104 cGearPlacementDone = true |
3098 |
|
3099 CGR = GetState(cGear) |
|
3100 |
|
3101 -- improve rectangle test based on CGR when you can be bothered |
|
3102 PlaceObject(x, y) |
|
3103 end |
3105 end |
3104 |
3106 |
3105 end |
3107 end |
3106 |
3108 |
3107 -- Show cursor coords |
3109 -- Show cursor coords |
3835 end |
3837 end |
3836 end |
3838 end |
3837 |
3839 |
3838 if (GetGearType(gear) == gtAirAttack and GetCurAmmoType() == amCMGearPlacementTool) or (GetGearType(gear) == gtGirder) then |
3840 if (GetGearType(gear) == gtAirAttack and GetCurAmmoType() == amCMGearPlacementTool) or (GetGearType(gear) == gtGirder) then |
3839 cGear = gear |
3841 cGear = gear |
|
3842 cGearPlacementDone = false |
3840 end |
3843 end |
3841 |
3844 |
3842 local tagTint |
3845 local tagTint |
3843 if showGearTags then |
3846 if showGearTags then |
3844 tagTint = 0xFFFFFFFF |
3847 tagTint = 0xFFFFFFFF |