From 8c8bdce3159754dbc54798706f36e909a7e3561c Mon Sep 17 00:00:00 2001 From: Fredrik Lindahl Date: Wed, 6 Nov 2024 13:24:24 +0100 Subject: [PATCH] Fixed problem where ids would become incorrect when read from a resource id. This was due to the resource id consisting of a union of a ui32 and ui8, which is not correct. Changed the ui8 to a 32 bit type instead, which solves the problem. --- code/foundation/ids/id.h | 4 ++-- code/physics/physics/streamactorpool.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/foundation/ids/id.h b/code/foundation/ids/id.h index 6f5779071..2b58d690a 100644 --- a/code/foundation/ids/id.h +++ b/code/foundation/ids/id.h @@ -76,7 +76,7 @@ struct\ {\ Ids::Id32 id24_0_name : 24;\ - Ids::Id8 id8_0_name : 8;\ + Ids::Id32 id8_0_name : 8;\ };\ Ids::Id32 combined0_name;\ };\ @@ -85,7 +85,7 @@ struct\ {\ Ids::Id32 id24_1_name : 24;\ - Ids::Id8 id8_1_name : 8;\ + Ids::Id32 id8_1_name : 8;\ };\ Ids::Id32 combined1_name;\ };\ diff --git a/code/physics/physics/streamactorpool.cc b/code/physics/physics/streamactorpool.cc index ea2c89e7d..4b7a0d2d8 100644 --- a/code/physics/physics/streamactorpool.cc +++ b/code/physics/physics/streamactorpool.cc @@ -586,7 +586,7 @@ StreamActorPool::InitializeResource(const ResourceLoadJob& job, const Ptrbodies.size()); + aggInfo.bodies.Reserve((SizeT)aggSetup->bodies.size()); for (auto const& bodySetup : aggSetup->bodies) { Ids::Id32 actorId = this->actorAllocator.Alloc();