Untested support for JSON planets
This commit is contained in:
@@ -428,7 +428,7 @@ public class Damage{
|
||||
float amount = calculateDamage(scaled ? Math.max(0, entity.dst(x, y) - entity.type.hitSize/2) : entity.dst(x, y), radius, damage);
|
||||
entity.damage(amount);
|
||||
//TODO better velocity displacement
|
||||
float dst = tr.set(entity.getX() - x, entity.getY() - y).len();
|
||||
float dst = tr.set(entity.x - x, entity.y - y).len();
|
||||
entity.vel.add(tr.setLength((1f - dst / radius) * 2f / entity.mass()));
|
||||
|
||||
if(complete && damage >= 9999999f && entity.isPlayer()){
|
||||
|
||||
Reference in New Issue
Block a user