From 993fd14ddfc881cf5be951df77da0338124d68cc Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 16:33:09 +0200 Subject: Fixed basic whitespace problems. Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines. --- src/Defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Defines.h') diff --git a/src/Defines.h b/src/Defines.h index ee91ee596..ba2e8f504 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -512,7 +512,7 @@ inline void VectorToEuler(double a_X, double a_Y, double a_Z, double & a_Pan, do } else { - a_Pan = atan2(a_Z, a_X) * 180 / PI - 90; + a_Pan = atan2(a_Z, a_X) * 180 / PI - 90; } a_Pitch = atan2(a_Y, r) * 180 / PI; -- cgit v1.2.3 From 7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 19:13:23 +0200 Subject: Fixed spaces around single-line comments. There should be at least two spaces in front and one space after //-style comments. --- src/Defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Defines.h') diff --git a/src/Defines.h b/src/Defines.h index ba2e8f504..877970ab8 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -22,7 +22,7 @@ typedef std::vector cSlotNums; /// Experience Orb setup enum { - //open to suggestion on naming convention here :) + // Open to suggestion on naming convention here :) MAX_EXPERIENCE_ORB_SIZE = 2000 } ; -- cgit v1.2.3 From ffe44c13d0ce037efb01544b96fe0756d64b8517 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 17 Jul 2014 23:25:14 -0700 Subject: Moved ChatColor.h out of defines where it was not needed --- src/Defines.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Defines.h') diff --git a/src/Defines.h b/src/Defines.h index 877970ab8..f57e63c7f 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -1,7 +1,6 @@ #pragma once -#include "ChatColor.h" #include #include -- cgit v1.2.3 From 041bfd5860cd8ef51db42eb6fb4b50b45549feba Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 19 Jul 2014 01:40:29 -0700 Subject: Fixed clamping issues --- src/Defines.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/Defines.h') 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(Y, 0, 255); } -- cgit v1.2.3