diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-06 02:11:18 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:11:18 +0700 |
| commit | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch) | |
| tree | 953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.World/TripWireTile.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.World/TripWireTile.cpp')
| -rw-r--r-- | Minecraft.World/TripWireTile.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Minecraft.World/TripWireTile.cpp b/Minecraft.World/TripWireTile.cpp index 2fd7da6c..b8ae9f33 100644 --- a/Minecraft.World/TripWireTile.cpp +++ b/Minecraft.World/TripWireTile.cpp @@ -13,7 +13,7 @@ TripWireTile::TripWireTile(int id) : Tile(id, Material::decoration, isSolidRende int TripWireTile::getTickDelay(Level *level) { - // 4J: Increased (x2); quick update caused problems with shared + // 4J: Increased (x2); quick update caused problems with shared // data between client and server. return 20; // 10; } @@ -164,15 +164,14 @@ void TripWireTile::checkPressed(Level *level, int x, int y, int z) int data = level->getData(x, y, z); bool wasPressed = (data & MASK_POWERED) == MASK_POWERED; bool shouldBePressed = false; - + ThreadStorage *tls = (ThreadStorage *)TlsGetValue(Tile::tlsIdxShape); vector<shared_ptr<Entity> > *entities = level->getEntities(nullptr, AABB::newTemp(x + tls->xx0, y + tls->yy0, z + tls->zz0, x + tls->xx1, y + tls->yy1, z + tls->zz1)); if (!entities->empty()) { - for (AUTO_VAR(it, entities->begin()); it != entities->end(); ++it) + for (auto& e : *entities) { - shared_ptr<Entity> e = *it; - if (!e->isIgnoringTileTriggers()) + if ( e && !e->isIgnoringTileTriggers()) { shouldBePressed = true; break; |
