diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-10 19:59:11 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-10 19:59:11 +0100 |
commit | e672988577e2c894d3bb59ed7f2d5459bca8ef86 (patch) | |
tree | 2cd9c62c1217a41b7f75e911f6a6cc42c7b3d858 /src/Items | |
parent | Merge branch 'master' into awesometnt (diff) | |
parent | Merge pull request #788 from worktycho/warnings (diff) | |
download | cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.gz cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.bz2 cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.lz cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.xz cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.zst cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.zip |
Diffstat (limited to 'src/Items')
-rw-r--r-- | src/Items/ItemLighter.h | 4 | ||||
-rw-r--r-- | src/Items/ItemThrowable.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h index a828cd4fa..2d3d72bc6 100644 --- a/src/Items/ItemLighter.h +++ b/src/Items/ItemLighter.h @@ -33,9 +33,9 @@ public: case E_BLOCK_TNT: { // Activate the TNT: - a_World->BroadcastSoundEffect("game.tnt.primed", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, 0.6f); + a_World->BroadcastSoundEffect("game.tnt.primed", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 1.0f, 1.0f); a_World->SetBlock(a_BlockX,a_BlockY,a_BlockZ, E_BLOCK_AIR, 0); - a_World->SpawnPrimedTNT(a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, 4); // 4 seconds to boom + a_World->SpawnPrimedTNT(a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5); // 80 ticks to boom break; } default: diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h index 46049f961..c6a4e714e 100644 --- a/src/Items/ItemThrowable.h +++ b/src/Items/ItemThrowable.h @@ -35,7 +35,7 @@ public: Vector3d Pos = a_Player->GetThrowStartPos(); Vector3d Speed = a_Player->GetLookVector() * m_SpeedCoeff; - a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &Speed); + a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, a_Player->GetEquippedItem(), &Speed); return true; } @@ -127,13 +127,13 @@ public: return false; } + a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, a_Player->GetEquippedItem()); + if (!a_Player->IsGameModeCreative()) { a_Player->GetInventory().RemoveOneEquippedItem(); } - a_World->CreateProjectile(a_BlockX + 0.5, a_BlockY + 1, a_BlockZ + 0.5, m_ProjectileKind, a_Player, 0); - return true; } |