Skip to content

Commit

Permalink
Fixed problem where ids would become incorrect when read from a resou…
Browse files Browse the repository at this point in the history
…rce 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.
  • Loading branch information
fLindahl committed Nov 6, 2024
1 parent 787522d commit 8c8bdce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/foundation/ids/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;\
};\
Expand All @@ -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;\
};\
Expand Down
2 changes: 1 addition & 1 deletion code/physics/physics/streamactorpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ StreamActorPool::InitializeResource(const ResourceLoadJob& job, const Ptr<IO::St
AggregateInfo aggInfo;
aggInfo.instanceCount = 0;
const PhysicsResource::AggregateT* aggSetup = actor.data.AsAggregate();
aggInfo.bodies.Reserve(aggSetup->bodies.size());
aggInfo.bodies.Reserve((SizeT)aggSetup->bodies.size());
for (auto const& bodySetup : aggSetup->bodies)
{
Ids::Id32 actorId = this->actorAllocator.Alloc();
Expand Down

0 comments on commit 8c8bdce

Please sign in to comment.