Fixed damaged building memory leak
This commit is contained in:
@@ -675,7 +675,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
build.health = health;
|
||||
|
||||
if(build.damaged()){
|
||||
indexer.notifyTileDamaged(build);
|
||||
indexer.notifyBuildDamaged(build);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,11 @@ public class ConstructBlock extends Block{
|
||||
if(builder != null && builder.getControllerName() != null){
|
||||
tile.build.lastAccessed = builder.getControllerName();
|
||||
}
|
||||
|
||||
//make sure block indexer knows it's damaged
|
||||
if(tile.build.damaged()){
|
||||
indexer.notifyBuildDamaged(tile.build);
|
||||
}
|
||||
}
|
||||
|
||||
//last builder was this local client player, call placed()
|
||||
|
||||
Reference in New Issue
Block a user