diff options
Diffstat (limited to 'Minecraft.World/TntTile.cpp')
| -rw-r--r-- | Minecraft.World/TntTile.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.World/TntTile.cpp b/Minecraft.World/TntTile.cpp index 5d47a2ac..b422959c 100644 --- a/Minecraft.World/TntTile.cpp +++ b/Minecraft.World/TntTile.cpp @@ -53,13 +53,13 @@ void TntTile::wasExploded(Level *level, int x, int y, int z) { // 4J - added - don't every create on the client, I think this must be the cause of a bug reported in the java // version where white tnts are created in the network game - if (level->isClientSide) return; + if (level->isClientSide) return; // 4J - added condition to have finite limit of these // 4J-JEV: Fix for #90934 - Customer Encountered: TU11: Content: Gameplay: TNT blocks are triggered by explosions even though "TNT explodes" option is unchecked. if( level->newPrimedTntAllowed() && app.GetGameHostOption(eGameHostOption_TNT) ) { - std::shared_ptr<PrimedTnt> primed = std::shared_ptr<PrimedTnt>( new PrimedTnt(level, x + 0.5f, y + 0.5f, z + 0.5f) ); + shared_ptr<PrimedTnt> primed = shared_ptr<PrimedTnt>( new PrimedTnt(level, x + 0.5f, y + 0.5f, z + 0.5f) ); primed->life = level->random->nextInt(primed->life / 4) + primed->life / 8; level->addEntity(primed); } @@ -74,14 +74,14 @@ void TntTile::destroy(Level *level, int x, int y, int z, int data) // 4J - added condition to have finite limit of these if( level->newPrimedTntAllowed() && app.GetGameHostOption(eGameHostOption_TNT) ) { - std::shared_ptr<PrimedTnt> tnt = std::shared_ptr<PrimedTnt>( new PrimedTnt(level, x + 0.5f, y + 0.5f, z + 0.5f) ); + shared_ptr<PrimedTnt> tnt = shared_ptr<PrimedTnt>( new PrimedTnt(level, x + 0.5f, y + 0.5f, z + 0.5f) ); level->addEntity(tnt); level->playSound(tnt, eSoundType_RANDOM_FUSE, 1, 1.0f); } } } -bool TntTile::use(Level *level, int x, int y, int z, std::shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param +bool TntTile::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param { if (soundOnly) return false; if (player->getSelectedItem() != NULL && player->getSelectedItem()->id == Item::flintAndSteel_Id) @@ -93,12 +93,12 @@ bool TntTile::use(Level *level, int x, int y, int z, std::shared_ptr<Player> pla return Tile::use(level, x, y, z, player, clickedFace, clickX, clickY, clickZ); } -void TntTile::entityInside(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity) +void TntTile::entityInside(Level *level, int x, int y, int z, shared_ptr<Entity> entity) { if (entity->GetType() == eTYPE_ARROW && !level->isClientSide) { // 4J Stu - Don't need to cast this - //std::shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(entity); + //shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(entity); if (entity->isOnFire()) { destroy(level, x, y, z, EXPLODE_BIT); @@ -107,12 +107,12 @@ void TntTile::entityInside(Level *level, int x, int y, int z, std::shared_ptr<En } } -std::shared_ptr<ItemInstance> TntTile::getSilkTouchItemInstance(int data) +shared_ptr<ItemInstance> TntTile::getSilkTouchItemInstance(int data) { return nullptr; } -void TntTile::registerIcons(IconRegister *iconRegister) +void TntTile::registerIcons(IconRegister *iconRegister) { icon = iconRegister->registerIcon(L"tnt_side"); iconTop = iconRegister->registerIcon(L"tnt_top"); |
