diff --git a/src/robots/default_robot.cpp b/src/robots/default_robot.cpp index 381ac4d41..d42b6cf87 100755 --- a/src/robots/default_robot.cpp +++ b/src/robots/default_robot.cpp @@ -449,6 +449,12 @@ void DefaultRobot::handleAcceleration( const float DELTA ) } } + if(hasViewBlockedByPlunger()) + { + m_controls.m_accel = 0.2f; + return; + } + m_controls.m_accel = 1.0f; } // handleAcceleration @@ -493,6 +499,10 @@ void DefaultRobot::handleRescue(const float DELTA) void DefaultRobot::handleNitro() { m_controls.m_nitro = false; + + // don't use nitro when has a plunger in the face! + if(hasViewBlockedByPlunger()) return; + // Don't use nitro if the kart doesn't have any, is not on ground, if(getEnergy()==0 || !isOnGround() || m_nitro_level==NITRO_NONE || hasFinishedRace() ) return;