Fixed crash occurring with editing collision tag file #338

Merged
direnbharwani merged 2 commits from SP3-2-Physics into main 2023-02-03 23:54:43 +08:00
1 changed files with 1 additions and 2 deletions

View File

@ -245,10 +245,9 @@ namespace SHADE
} }
else else
{ {
mask = static_cast<uint16_t>(std::stoi(maskString));
for (int i = 0; i < SHCollisionTag::NUM_LAYERS; ++i) for (int i = 0; i < SHCollisionTag::NUM_LAYERS; ++i)
{ {
const bool LAYER_STATE = mask & 1U << i; const bool LAYER_STATE = maskString[i] == '1';
collisionTags[tagIndex].SetLayerState(i, LAYER_STATE); collisionTags[tagIndex].SetLayerState(i, LAYER_STATE);
} }
} }