mirror of
https://github.com/veden/Rampant.git
synced 2025-01-24 03:16:25 +02:00
needs changelog
This commit is contained in:
parent
ec14f37ace
commit
fb74caabf4
15
control.lua
15
control.lua
@ -504,16 +504,16 @@ local function onDeath(event)
|
|||||||
local cause = event.cause
|
local cause = event.cause
|
||||||
local tick = event.tick
|
local tick = event.tick
|
||||||
if (entity.force.name == "enemy") then
|
if (entity.force.name == "enemy") then
|
||||||
if (entity.type == "unit") then
|
|
||||||
|
|
||||||
|
local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret")))
|
||||||
|
|
||||||
|
if (entity.type == "unit") then
|
||||||
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
|
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
|
||||||
-- drop death pheromone where unit died
|
-- drop death pheromone where unit died
|
||||||
deathScent(map, chunk)
|
deathScent(map, chunk)
|
||||||
|
|
||||||
if event.force and (event.force.name ~= "enemy") and (chunk[MOVEMENT_PHEROMONE] < -natives.retreatThreshold) then
|
if event.force and (event.force.name ~= "enemy") and (chunk[MOVEMENT_PHEROMONE] < -natives.retreatThreshold) then
|
||||||
|
|
||||||
local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret")))
|
|
||||||
|
|
||||||
retreatUnits(chunk,
|
retreatUnits(chunk,
|
||||||
entityPosition,
|
entityPosition,
|
||||||
convertUnitGroupToSquad(natives, entity.unit_group),
|
convertUnitGroupToSquad(natives, entity.unit_group),
|
||||||
@ -556,6 +556,15 @@ local function onDeath(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- if (cause and not artilleryBlast) then
|
||||||
|
-- local causeChunk = getChunkByPosition(map, cause.position)
|
||||||
|
-- if (causeChunk ~= SENTINEL_IMPASSABLE_CHUNK) and
|
||||||
|
-- (causeChunk ~= chunk)
|
||||||
|
-- then
|
||||||
|
-- deathScent(map, causeChunk)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
local pair = natives.drainPylons[entity.unit_number]
|
local pair = natives.drainPylons[entity.unit_number]
|
||||||
if pair then
|
if pair then
|
||||||
local target = pair[1]
|
local target = pair[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user