mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
xxx
This commit is contained in:
parent
7229439d84
commit
897a0d4f40
@ -2301,12 +2301,12 @@ function ARTY:OnEventShot(EventData)
|
|||||||
self.Nukes=self.Nukes-1
|
self.Nukes=self.Nukes-1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Decrease available illuminatin shells because we just fired one.
|
-- Decrease available illumination shells because we just fired one.
|
||||||
if self.currentTarget.weapontype==ARTY.WeaponType.IlluminationShells then
|
if self.currentTarget.weapontype==ARTY.WeaponType.IlluminationShells then
|
||||||
self.Nillu=self.Nillu-1
|
self.Nillu=self.Nillu-1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Decrease available illuminatin shells because we just fired one.
|
-- Decrease available smoke shells because we just fired one.
|
||||||
if self.currentTarget.weapontype==ARTY.WeaponType.SmokeShells then
|
if self.currentTarget.weapontype==ARTY.WeaponType.SmokeShells then
|
||||||
self.Nsmoke=self.Nsmoke-1
|
self.Nsmoke=self.Nsmoke-1
|
||||||
end
|
end
|
||||||
@ -3717,51 +3717,6 @@ function ARTY:_NuclearBlast(_coord)
|
|||||||
ignite(_fires)
|
ignite(_fires)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
|
||||||
local ZoneNuke=ZONE_RADIUS:New("Nukezone", _coord:GetVec2(), 2000)
|
|
||||||
|
|
||||||
-- Scan for Scenery objects.
|
|
||||||
ZoneNuke:Scan(Object.Category.SCENERY)
|
|
||||||
|
|
||||||
-- Array with all possible hideouts, i.e. scenery objects in the vicinity of the group.
|
|
||||||
local scenery={}
|
|
||||||
|
|
||||||
for SceneryTypeName, SceneryData in pairs(ZoneNuke:GetScannedScenery()) do
|
|
||||||
for SceneryName, SceneryObject in pairs(SceneryData) do
|
|
||||||
|
|
||||||
local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY
|
|
||||||
|
|
||||||
-- Position of the scenery object.
|
|
||||||
local spos=SceneryObject:GetCoordinate()
|
|
||||||
|
|
||||||
-- Distance from group to impact point.
|
|
||||||
local distance= spos:Get2DDistance(_coord)
|
|
||||||
|
|
||||||
-- Place markers on every possible scenery object.
|
|
||||||
if self.Debug then
|
|
||||||
local MarkerID=spos:MarkToAll(string.format("%s scenery object %s", self.Controllable:GetName(), SceneryObject:GetTypeName()))
|
|
||||||
local text=string.format("%s scenery: %s, Coord %s", self.Controllable:GetName(), SceneryObject:GetTypeName(), SceneryObject:GetCoordinate():ToStringLLDMS())
|
|
||||||
self:T2(SUPPRESSION.id..text)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Add to table.
|
|
||||||
table.insert(scenery, {object=SceneryObject, distance=distance})
|
|
||||||
|
|
||||||
--SceneryObject:Destroy()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Sort scenery wrt to distance from impact point.
|
|
||||||
-- local _sort = function(a,b) return a.distance < b.distance end
|
|
||||||
-- table.sort(scenery,_sort)
|
|
||||||
|
|
||||||
-- for _,object in pairs(scenery) do
|
|
||||||
-- local sobject=object -- Wrapper.Scenery#SCENERY
|
|
||||||
-- sobject:Destroy()
|
|
||||||
-- end
|
|
||||||
|
|
||||||
]]
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Route group to a certain point.
|
--- Route group to a certain point.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user