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:
parent
c8c230449e
commit
082fd26bf1
10 changed files with 40 additions and 15 deletions
|
|
@ -12,3 +12,10 @@ function wl_ffree_new() -> []WildFact {
|
|||
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 wl_fact_more(wildlife_st: mut WildlifeState) -> WildFact {
|
||||
let f = new WildFact
|
||||
push(wildlife_st.wl_fpool, f)
|
||||
return f
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ function wl_fact_record(wildlife_st: mut WildlifeState) -> WildFact {
|
|||
f.diet = 0
|
||||
return f
|
||||
}
|
||||
let f = new WildFact
|
||||
push(wildlife_st.wl_fpool, f)
|
||||
return f
|
||||
return wl_fact_more(wildlife_st)
|
||||
}
|
||||
# how many fact records have ever been made: the peak held at once, not the facts pushed
|
||||
export function wildlife_fact_records(wildlife_st: WildlifeState) -> int { return len(wildlife_st.wl_fpool) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue