Balancing, tweaks and bugfixes
This commit is contained in:
@@ -278,6 +278,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
|
||||
@Override
|
||||
public void removed(){
|
||||
super.removed();
|
||||
Tile tile = world.tile(spawner);
|
||||
if(tile != null){
|
||||
tile.block().unitRemoved(tile, this);
|
||||
|
||||
@@ -142,10 +142,17 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
|
||||
@Override
|
||||
public void removed(){
|
||||
Tile tile = world.tile(lastWeightTile);
|
||||
if(lastWeightTile != Pos.invalid){
|
||||
Tile tile = world.tile(lastWeightTile);
|
||||
|
||||
if(tile != null){
|
||||
tile.weight -= Math.max(lastWeightDelta, tile.weight);
|
||||
if(tile != null){
|
||||
int dec = Math.min(lastWeightDelta, wasFlying ? tile.airWeight : tile.weight);
|
||||
if(!wasFlying){
|
||||
tile.weight -= dec;
|
||||
}else{
|
||||
tile.airWeight -= dec;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user