mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-23 15:15:37 +00:00
Cleanups
This commit is contained in:
@@ -1402,17 +1402,17 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed)
|
||||
// The new click position is normalised at one unit in the direction of movement, so that we don't gradually drift away if we detect the movement a fraction over
|
||||
// the unit distance each time
|
||||
|
||||
if( fabsf(dX) >= 1.0f )
|
||||
if( std::abs(dX) >= 1.0f )
|
||||
{
|
||||
dX= ( dX < 0.0f ) ? ceilf(dX) : floorf(dX);
|
||||
newClick = true;
|
||||
}
|
||||
else if( fabsf(dY) >= 1.0f )
|
||||
else if( std::abs(dY) >= 1.0f )
|
||||
{
|
||||
dY= ( dY < 0.0f ) ? ceilf(dY) : floorf(dY);
|
||||
newClick = true;
|
||||
}
|
||||
else if( fabsf(dZ) >= 1.0f )
|
||||
else if( std::abs(dZ) >= 1.0f )
|
||||
{
|
||||
dZ= ( dZ < 0.0f ) ? ceilf(dZ) : floorf(dZ);
|
||||
newClick = true;
|
||||
@@ -1422,9 +1422,9 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed)
|
||||
{
|
||||
float fTarget = 1.0f - lastClickTolerance;
|
||||
|
||||
if( fabsf(dX) >= fTarget ) newClick = true;
|
||||
if( fabsf(dY) >= fTarget ) newClick = true;
|
||||
if( fabsf(dZ) >= fTarget ) newClick = true;
|
||||
if( std::abs(dX) >= fTarget ) newClick = true;
|
||||
if( std::abs(dY) >= fTarget ) newClick = true;
|
||||
if( std::abs(dZ) >= fTarget ) newClick = true;
|
||||
}
|
||||
|
||||
if( newClick )
|
||||
|
||||
Reference in New Issue
Block a user