1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-28 03:29:34 +02:00

FACTO-3: Fixed base alignment potentially being an empty array

This commit is contained in:
Aaron Veden 2022-01-14 11:36:42 -08:00
parent 28b40203e6
commit 9fb8705999
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Date: 29. 12. 2021
- Fixed random generator seed overflow (Thanks NeveHanter for the report)
- Fixed removing chunks could index outside processQueueLength (Thanks thecheat789 for the report)
- Fixed processMap and processStaticMap could index outside processQueueLength
- Fixed base alignments could be blank when removing factions (Thanks kind_killer for the report)
Optimizations:
- Added early stopping to removeProcessQueueChunk

View File

@ -274,6 +274,7 @@ function baseUtils.upgradeEntity(entity, base, map, disPos, evolve, register)
else
pickedBaseAlignment = baseAlignment[1]
end
local spawnerName = findEntityUpgrade(pickedBaseAlignment,
currentEvo,
evoIndex,
@ -675,6 +676,9 @@ function baseUtils.rebuildNativeTables(universe, rg)
if alignment and not universe.buildingEvolveLookup[alignment] then
base.alignment = findBaseInitialAlignment(map, evoIndex)
break
elseif not alignment and (x == 1) then
base.alignment = findBaseInitialAlignment(map, evoIndex)
break
end
end
end