frame allocs (25.2): a fact record past the 64 made at the start is @alloc_ok, in its own function, in npc, character, physics, vehicles and wildlife

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 15:58:10 +03:00
parent c8c230449e
commit 082fd26bf1
10 changed files with 40 additions and 15 deletions

View file

@ -12,3 +12,10 @@ function ph_ffree_new() -> []PhysFact {
List.clear(l)
return l
}
# past them: a record for the new peak, kept in the pool for good
@alloc_ok("a new peak of facts held at once, past the 64 made at the start; kept and reused")
function ph_fact_more(physics_st: mut PhysicsState) -> PhysFact {
let f = new PhysFact
push(physics_st.ph_fpool, f)
return f
}

View file

@ -45,9 +45,7 @@ function ph_fact_record(physics_st: mut PhysicsState) -> PhysFact {
physics_st.ph_fnext += 1
return f
}
let f = new PhysFact
push(physics_st.ph_fpool, f)
return f
return ph_fact_more(physics_st)
}
function ph_contacts(physics_st: mut PhysicsState) -> void {
let n = jph_contacts_drain(physics_st.ph_world, physics_st.ph_ids, physics_st.ph_vals, PH_CAP)