diff options
author | archshift <admin@archshift.com> | 2014-07-19 10:40:29 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-19 10:40:29 +0200 |
commit | 041bfd5860cd8ef51db42eb6fb4b50b45549feba (patch) | |
tree | 2d93a68b888a5e2b410ec95d124edaad6f67bb92 /src/Defines.h | |
parent | Renamed AllToLua_lua script. (diff) | |
download | cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.gz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.bz2 cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.lz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.xz cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.zst cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Defines.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Defines.h b/src/Defines.h index f57e63c7f..f7c8d0fc5 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -470,18 +470,7 @@ inline void AddFaceDirection(int & a_BlockX, unsigned char & a_BlockY, int & a_B { int Y = a_BlockY; AddFaceDirection(a_BlockX, Y, a_BlockZ, a_BlockFace, a_bInverse); - if (Y < 0) - { - a_BlockY = 0; - } - else if (Y > 255) - { - a_BlockY = 255; - } - else - { - a_BlockY = (unsigned char)Y; - } + a_BlockY = Clamp<unsigned char>(Y, 0, 255); } |