summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorr.ramazanov <r.ramazanov@servplus.ru>2014-04-25 10:06:22 +0200
committerr.ramazanov <r.ramazanov@servplus.ru>2014-04-25 10:06:22 +0200
commit4cd2d57c643ec2c7dab7a664248dbf65254c1b1d (patch)
treedcbf326441fb23105d51fa6b443e0b9741257320 /src
parentFix for clang (diff)
downloadcuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar.gz
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar.bz2
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar.lz
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar.xz
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.tar.zst
cuberite-4cd2d57c643ec2c7dab7a664248dbf65254c1b1d.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 402f94d08..d0dd6fb50 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -341,15 +341,21 @@ void cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
Vector3d additionalSpeed(0, 0, 0);
switch (KnockbackLevel)
{
- case 1:
- additionalSpeed.Set(5, .3, 5);
- break;
- case 2:
- additionalSpeed.Set(8, .3, 8);
- break;
- default:
- additionalSpeed.Set(2, .3, 2);
- break;
+ case 1:
+ {
+ additionalSpeed.Set(5, .3, 5);
+ break;
+ }
+ case 2:
+ {
+ additionalSpeed.Set(8, .3, 8);
+ break;
+ }
+ default:
+ {
+ additionalSpeed.Set(2, .3, 2);
+ break;
+ }
}
AddSpeed(a_TDI.Knockback * additionalSpeed);
}