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>
This commit is contained in:
parent
7f973f9a4f
commit
c8c230449e
14 changed files with 72 additions and 12 deletions
|
|
@ -84,13 +84,13 @@ program WildCrowdTest {
|
|||
expect(not wildlife_listed(wildlife_st, a))
|
||||
}
|
||||
|
||||
test "a fact a frame, drained each frame, makes a few records and then reuses them" (wildlife_st: mut WildlifeState, wildlife_tests_fake_st: mut WildlifeTestsFakeState) {
|
||||
test "a fact a frame, drained each frame, makes no record past the ones made at the start" (wildlife_st: mut WildlifeState, wildlife_tests_fake_st: mut WildlifeTestsFakeState) {
|
||||
let a = walker(wildlife_st, wildlife_tests_fake_st)
|
||||
for k in 1 .. 3001 {
|
||||
wildlife_moved(wildlife_st, a, 0.0, -3.0 * float(k), 0.0, -1.2)
|
||||
let fs = q_drain(wildlife_facts(wildlife_st))
|
||||
for i in 0 .. len(fs) { expect_eq(fs[i].what, WILD_PRINT) }
|
||||
}
|
||||
expect(wildlife_fact_records(wildlife_st) <= 4)
|
||||
expect_eq(wildlife_fact_records(wildlife_st), 64)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue