This commit is contained in:
GabsPuNs
2026-06-05 16:05:55 -04:00
parent d6e58df26d
commit 8bea50b1e5
29 changed files with 162 additions and 1670 deletions

View File

@@ -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 )