ludic/packages/ludic.vehicles/fact_pool.ludic
Orkuncakilkaya c8c230449e fix(character, physics, vehicles, wildlife): fact records made at the start (64) with a free list of room for all, as ludic.npc's
A frame holding a new peak of facts made a record and grew the free list; now nothing is made until
64 are held at once. The two record-count tests hold the 64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 16:02:42 +03:00

14 lines
470 B
Text

# ludic.vehicles/fact_pool.ludic - the facts' records made at the start (VEHICLEFACTS of them) with a free list
# of room for all, so a frame holding a new peak of facts makes nothing until that many are held
const VE_FACTS: int = 64
function ve_fpool_new() -> []VehicleFact {
let l = new []VehicleFact
for i in 0 .. VE_FACTS { push(l, new VehicleFact) }
return l
}
function ve_ffree_new() -> []VehicleFact {
let l = ve_fpool_new()
List.clear(l)
return l
}