Skip to content

Commit

Permalink
Merge branch 'master' of i:/scorched3d-git
Browse files Browse the repository at this point in the history
  • Loading branch information
scara committed Jul 30, 2014
2 parents ce4ca18 + 23b41c4 commit 6140b2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scorched/src/common/actions/ShotProjectile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,14 @@ void ShotProjectile::simulate(fixed frameTime, bool &remove)
}
}

if (wobbleSpin_ > 0)
if (wobbleSpin_ > 0)
{
FixedVector up(0, 0, 1);
FixedVector velocityPerp = (velocity_.Normalize() * up).Normalize();
if (velocityPerp == FixedVector::getNullVector())
{
velocityPerp = FixedVector(1, 0, 0);
}
FixedVector forceDir = ((velocityPerp * physicsSpin_.cos()) * wobbleAmount_ * velocity_.Magnitude() / 50);
getPhysics().applyOffset(forceDir);

Expand Down

0 comments on commit 6140b2f

Please sign in to comment.