Disable smoothing network body for local kart
This should improve collision handling and remove into ground kart
This commit is contained in:
@@ -3207,7 +3207,8 @@ void Kart::updateGraphics(float dt)
|
||||
// Disable smoothing network body so it doesn't smooth the animation
|
||||
// for karts in client
|
||||
if (NetworkConfig::get()->isNetworking() &&
|
||||
NetworkConfig::get()->isClient())
|
||||
NetworkConfig::get()->isClient() &&
|
||||
(!getController() || !getController()->isLocalPlayerController()))
|
||||
{
|
||||
if (m_kart_animation && SmoothNetworkBody::isEnabled())
|
||||
{
|
||||
|
||||
@@ -67,9 +67,15 @@ void KartRewinder::reset()
|
||||
{
|
||||
Kart::reset();
|
||||
Rewinder::reset();
|
||||
SmoothNetworkBody::setEnable(true);
|
||||
SmoothNetworkBody::setSmoothRotation(true);
|
||||
SmoothNetworkBody::setAdjustVerticalOffset(true);
|
||||
// Can be null for the first time
|
||||
if (getController() && !getController()->isLocalPlayerController())
|
||||
{
|
||||
SmoothNetworkBody::setEnable(true);
|
||||
SmoothNetworkBody::setSmoothRotation(true);
|
||||
SmoothNetworkBody::setAdjustVerticalOffset(true);
|
||||
}
|
||||
else
|
||||
SmoothNetworkBody::setEnable(false);
|
||||
m_has_server_state = false;
|
||||
} // reset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user