1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

Fix a non-recoverable error by supplying map

When NEW_ENEMIES is enabled, the game (or server) crashes after some time due to a non-recoverable error caused by line 750 because `getChunkByPosition` gets called without the `map` parameter.
This commit is contained in:
Sebastian Erik Bauer 2021-12-15 03:09:40 +01:00 committed by GitHub
parent 3ba01b1e81
commit 32b8767d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -747,7 +747,7 @@ local function onUnitGroupCreated(event)
universe.groupNumberToSquad[group.group_number] = squad
if universe.NEW_ENEMIES then
local chunk = getChunkByPosition(group.position)
local chunk = getChunkByPosition(map, group.position)
if (chunk ~= -1) then
squad.base = findNearbyBase(map, chunk)
end