Removed warning (and potential bug fix): a float was implicitly
converted to an int when using abs. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2216 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -82,7 +82,7 @@ void Bowling::update(float dt)
|
||||
{
|
||||
// limit angle, so that the bowling ball does not turn
|
||||
// around to hit a kart behind
|
||||
if(abs(m_body->getLinearVelocity().angle(direction)) < 1.3)
|
||||
if(fabs(m_body->getLinearVelocity().angle(direction)) < 1.3)
|
||||
{
|
||||
direction*=1/direction.length()*m_st_force_to_target;
|
||||
m_body->applyCentralForce(direction);
|
||||
|
||||
Reference in New Issue
Block a user