The Tiny Planet now has a limit on how far it can orbit entities. Closes #60

This commit is contained in:
Vasco Lavos committed 2014-05-25 22:24:45 +01:00
1 parent 8c4e3da253
commit fd1ec14fee
1 file changed
+1 -1
@@ -59,7 +59,7 @@ public class ItemTinyPlanet extends ItemBauble {
if(orbitTime == 0)
burst.setMinManaLoss(burst.getMinManaLoss() * 3);
float radius = (Math.max(40, orbitTime) - 40) / 40F + 1.5F;
float radius = Math.min(7.5F, (Math.max(40, orbitTime) - 40) / 40F + 1.5F);
int angle = orbitTime % 360;
float xTarget = (float) (x + Math.cos(angle * 10 * Math.PI / 180F) * radius);