diff options
author | madmaxoft <github@xoft.cz> | 2014-07-17 23:15:53 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-07-17 23:16:55 +0200 |
commit | c03161f75d22a7965aea20fb9843ae580a07079a (patch) | |
tree | abb301835bb65031bee9e040bde43dd078164692 /src/Protocol/Protocol17x.cpp | |
parent | More trailing whitespace fixes. (diff) | |
download | cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar.gz cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar.bz2 cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar.lz cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar.xz cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.tar.zst cuberite-c03161f75d22a7965aea20fb9843ae580a07079a.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 45cda944b..37a9fdf47 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -2707,9 +2707,10 @@ void cProtocol172::cPacketizer::WriteEntityMetadata(const cEntity & a_Entity) // The following expression makes Minecarts shake more with less health or higher damage taken // It gets half the maximum health, and takes it away from the current health minus the half health: - /* Health: 5 | 3 - (5 - 3) = 1 (shake power) - Health: 3 | 3 - (3 - 3) = 3 - Health: 1 | 3 - (1 - 3) = 5 + /* + Health: 5 | 3 - (5 - 3) = 1 (shake power) + Health: 3 | 3 - (3 - 3) = 3 + Health: 1 | 3 - (1 - 3) = 5 */ WriteInt((((a_Entity.GetMaxHealth() / 2) - (a_Entity.GetHealth() - (a_Entity.GetMaxHealth() / 2))) * ((const cMinecart &)a_Entity).LastDamage()) * 4); WriteByte(0x52); |