fix ship spawning

This commit is contained in:
Kistaro Windrider 2025-05-31 21:54:02 -07:00
parent 45b70d3aca
commit 36f7c6572f
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -1533,7 +1533,7 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
-- and we allow alternates
-- for this type of ship
ship_t+=(uv>>ship_t&0x1)&(f&0x10>>4)
add(row, self.ship_bases[ship_t]:new{col=cx-ulc_cx})
add(row, self.ship_bases[ship_t].new{col=cx-ulc_cx})
end
end
cx += 1
@ -1544,6 +1544,7 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
-- keep the row; count it
for s in all(row) do
counts[s.ship_t] += 1
s.x,s.y=rnd_spawn_loc()
eships:push_back(s)
end
add(rows, row)