mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Replaced every C-style cast with C++ ones
This commit is contained in:
parent
2d9768a1b8
commit
d965a71464
|
|
@ -224,8 +224,8 @@ void Boat::tick()
|
|||
|
||||
double yrd = Mth::wrapDegrees(lyr - yRot);
|
||||
|
||||
yRot += (float) ( (yrd) / lSteps );
|
||||
xRot += (float) ( (lxr - xRot) / lSteps );
|
||||
yRot += static_cast<float>((yrd) / lSteps);
|
||||
xRot += static_cast<float>((lxr - xRot) / lSteps);
|
||||
|
||||
lSteps--;
|
||||
setPos(xt, yt, zt);
|
||||
|
|
@ -342,7 +342,7 @@ void Boat::tick()
|
|||
double zDiff = zo - z;
|
||||
if (xDiff * xDiff + zDiff * zDiff > 0.001)
|
||||
{
|
||||
yRotT = (float) (atan2(zDiff, xDiff) * 180 / PI);
|
||||
yRotT = static_cast<float>(atan2(zDiff, xDiff) * 180 / PI);
|
||||
}
|
||||
|
||||
double rotDiff = Mth::wrapDegrees(yRotT - yRot);
|
||||
|
|
@ -350,7 +350,7 @@ void Boat::tick()
|
|||
if (rotDiff > 20) rotDiff = 20;
|
||||
if (rotDiff < -20) rotDiff = -20;
|
||||
|
||||
yRot += (float) rotDiff;
|
||||
yRot += static_cast<float>(rotDiff);
|
||||
setRot(yRot, xRot);
|
||||
|
||||
// Server only code below
|
||||
|
|
|
|||
Loading…
Reference in a new issue