refactor: convert Tile::tlsIdxShape to thread_local

This commit is contained in:
Tropical
2026-03-25 14:20:08 -05:00
parent 625ce97385
commit 4a1fb94600
11 changed files with 30 additions and 80 deletions

View File

@@ -126,7 +126,7 @@ void PistonMovingPiece::updateShape(
progress = 1.0f - progress;
}
int facing = entity->getFacing();
ThreadStorage* tls = (ThreadStorage*)TlsGetValue(Tile::tlsIdxShape);
ThreadStorage* tls = m_threadShape;
tls->xx0 = tile->getShapeX0() - Facing::STEP_X[facing] * progress;
tls->yy0 = tile->getShapeY0() - Facing::STEP_Y[facing] * progress;
tls->zz0 = tile->getShapeZ0() - Facing::STEP_Z[facing] * progress;