mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-29 03:46:50 +01:00
World: big maps no longer run out of spatial cull IDs while loading
A spatial transaction queue gives every object it tracks a cull ID from a free list made once, when the queue is, at the game's InitialCullIdListSize (40,000 in its config), and never grown. A custom map with more objects (Cardiff) emptied it while loading and the next insert read entry 0xffffffff of the list (crash at 0x489cfe9). - spatial_cull_ids: as each queue makes its list, its size setting is raised to 262,144, one ID for every entity slot the entity pages hold; a larger configured value is kept. 12 bytes an ID per queue. - The contract checks the list maker and how it reads the setting; it is installed at startup with the other world pools.
This commit is contained in:
1 parent
5e43dc2871
commit
ea3f081367
5 files changed
+136
No files matched your search
@@ -22,6 +22,7 @@
|
||||
#include "Extension/World/native_entity_pages.h"
|
||||
#include "Extension/World/world_pool_usage.h"
|
||||
#include "Extension/World/physics_world_size.h"
|
||||
#include "Extension/World/spatial_cull_ids.h"
|
||||
#include <string>
|
||||
|
||||
namespace dingosdk::runtime {
|
||||
@@ -64,6 +65,8 @@ bool initialize_bootstrap(std::uintptr_t base) {
|
||||
if (!stage(Channel::assets, "Native render-resource pools", ready, error)) return false;
|
||||
error.clear(); ready = start_native_entity_pages(base, error);
|
||||
if (!stage(Channel::world, "Native entity pages (524288 entity/update slots, 1048576 render slots, 16384 spatial blocks/bucket, 128 MiB arena minimum)", ready, error)) return false;
|
||||
error.clear(); ready = start_spatial_cull_ids(base, error);
|
||||
if (!stage(Channel::world, "Spatial cull IDs (262144 a queue)", ready, error)) return false;
|
||||
// (Diagnostics only: how full those pools get. A mismatch leaves the game as it is.)
|
||||
error.clear(); ready = start_world_pool_usage(base, error);
|
||||
(void)stage(Channel::world, "World pool usage watch", ready, error);
|
||||
|
||||
Reference in new issue
Block a user