1
0

convert old style casts to fix warnings

This commit is contained in:
Steven Riehl
2014-10-11 20:39:55 -06:00
parent b4170e3184
commit 856764dee8
17 changed files with 486 additions and 549 deletions

View File

@@ -227,9 +227,9 @@ void cBeaconEntity::GiveEffects(void)
virtual bool Item(cPlayer * a_Player)
{
Vector3d PlayerPosition = Vector3d(a_Player->GetPosition());
if (PlayerPosition.y > (double)m_PosY)
if (PlayerPosition.y > static_cast<double>(m_PosY))
{
PlayerPosition.y = (double)m_PosY;
PlayerPosition.y = static_cast<double>(m_PosY);
}
// TODO: Vanilla minecraft uses an AABB check instead of a radius one
@@ -255,7 +255,7 @@ void cBeaconEntity::GiveEffects(void)
, m_PrimaryEffect(a_PrimaryEffect)
, m_SecondaryEffect(a_SecondaryEffect)
, m_EffectLevel(a_EffectLevel)
{};
{}
} PlayerCallback(Radius, m_PosX, m_PosY, m_PosZ, m_PrimaryEffect, SecondaryEffect, EffectLevel);
GetWorld()->ForEachPlayer(PlayerCallback);
@@ -288,7 +288,7 @@ void cBeaconEntity::UsedBy(cPlayer * a_Player)
OpenWindow(new cBeaconWindow(m_PosX, m_PosY, m_PosZ, this));
Window = GetWindow();
}
if (Window != NULL)
{
// if (a_Player->GetWindow() != Window)
@@ -307,7 +307,3 @@ void cBeaconEntity::SendTo(cClientHandle & a_Client)
{
a_Client.SendUpdateBlockEntity(*this);
}