mirror of
https://github.com/veden/Rampant.git
synced 2024-12-26 20:54:12 +02:00
FACTO-288: Added squad creation pathing check
This commit is contained in:
parent
3f7d47814c
commit
d6d3811952
@ -9,6 +9,7 @@ Version: 3.3.0
|
||||
- Fixed squad compression could take place when attacking
|
||||
- Fixed squad command timeout duration to account for 4 chunk pathing finding
|
||||
- Fixed death pheromone could zero out a chunk for squad movement planning
|
||||
- Fixed squad creation didn't take into account chunk pathing from nest to squad
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 3.2.2
|
||||
|
@ -1080,8 +1080,7 @@ local function scoreUnitGroupLocation(neighborChunk)
|
||||
end
|
||||
|
||||
local function validUnitGroupLocation(neighborChunk)
|
||||
return (getPassable(neighborChunk) == CHUNK_ALL_DIRECTIONS) and
|
||||
(not neighborChunk.nestCount)
|
||||
return (not neighborChunk.nestCount)
|
||||
end
|
||||
|
||||
local function visitPattern(o, cX, cY, distance)
|
||||
@ -1133,7 +1132,10 @@ local function scoreNeighborsForFormation(chunk, validFunction, scoreFunction)
|
||||
local neighborChunks = getNeighborChunks(chunk.map, chunk.x, chunk.y)
|
||||
for x=1,8 do
|
||||
local neighborChunk = neighborChunks[x]
|
||||
if (neighborChunk ~= -1) and validFunction(neighborChunk) then
|
||||
if (neighborChunk ~= -1)
|
||||
and canMoveChunkDirection(x, chunk, neighborChunk)
|
||||
and validFunction(neighborChunk)
|
||||
then
|
||||
local score = scoreFunction(neighborChunk)
|
||||
if (score > highestScore) then
|
||||
highestScore = score
|
||||
|
Loading…
Reference in New Issue
Block a user