diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-05 23:12:48 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-05 23:12:48 +0100 |
commit | 53231bebd650b9398060cee1434ad4c44152d36e (patch) | |
tree | 018e79175daa3664668512ad01b6d7f55d639d34 /src/World.cpp | |
parent | Fixed MSVC warnings in DeprecatedBindings. (diff) | |
download | cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar.gz cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar.bz2 cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar.lz cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar.xz cuberite-53231bebd650b9398060cee1434ad4c44152d36e.tar.zst cuberite-53231bebd650b9398060cee1434ad4c44152d36e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp index ffdae2a37..d6b88f187 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1696,7 +1696,11 @@ void cWorld::SpawnPrimedTNT(double a_X, double a_Y, double a_Z, double a_FuseTim UNUSED(a_InitialVelocityCoeff); cTNTEntity * TNT = new cTNTEntity(a_X, a_Y, a_Z, a_FuseTimeInSec); TNT->Initialize(this); - // TODO: Add a bit of speed in horiz and vert axes, based on the a_InitialVelocityCoeff + TNT->SetSpeed( + a_InitialVelocityCoeff * (GetTickRandomNumber(2) - 1), /** -1, 0, 1 */ + a_InitialVelocityCoeff * 2, + a_InitialVelocityCoeff * (GetTickRandomNumber(2) - 1) + ); } |