Remove unneeded static_cast

This commit is contained in:
Benau 2019-03-26 00:25:06 +08:00
parent 220f5e6e4c
commit 420ac45ba1

View File

@ -3233,16 +3233,15 @@ void Kart::updateGraphics(float dt)
if (NetworkConfig::get()->isNetworking() &&
NetworkConfig::get()->isClient())
{
SmoothNetworkBody* snb = static_cast<SmoothNetworkBody*>(this);
if (m_kart_animation && snb->isEnabled())
if (m_kart_animation && SmoothNetworkBody::isEnabled())
{
snb->setEnable(false);
SmoothNetworkBody::setEnable(false);
}
else if (!m_kart_animation && !snb->isEnabled())
else if (!m_kart_animation && !SmoothNetworkBody::isEnabled())
{
snb->setEnable(true);
snb->reset();
snb->setSmoothedTransform(getTrans());
SmoothNetworkBody::setEnable(true);
SmoothNetworkBody::reset();
SmoothNetworkBody::setSmoothedTransform(getTrans());
}
}