Bugfixes
This commit is contained in:
@@ -86,7 +86,7 @@ public class BlockIndexer{
|
||||
|
||||
process(tile);
|
||||
|
||||
if(tile.entity != null && tile.entity.healthf() < 0.9999f){
|
||||
if(tile.entity != null && tile.entity.damaged()){
|
||||
notifyTileDamaged(tile.entity);
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class BlockIndexer{
|
||||
|
||||
ObjectSet<Tile> set = damagedTiles[team.ordinal()];
|
||||
for(Tile tile : set){
|
||||
if(tile.entity == null || tile.entity.getTeam() != team || tile.entity.healthf() >= 0.9999f){
|
||||
if(tile.entity == null || tile.entity.getTeam() != team || !tile.entity.damaged()){
|
||||
returnArray.add(tile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ public class NetServer extends Module{
|
||||
return;
|
||||
}
|
||||
|
||||
if(other == null || (other.isAdmin && other != player)){ //fun fact: this means you can ban yourself
|
||||
if(other == null || ((other.isAdmin && !player.isLocal) && other != player)){
|
||||
Log.err("{0} attempted to perform admin action on nonexistant or admin player.", player.name);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,10 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
}
|
||||
}
|
||||
|
||||
public boolean damaged(){
|
||||
return health < maxHealth() - 0.00001f;
|
||||
}
|
||||
|
||||
public Tile getTile(){
|
||||
return tile;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,13 @@ public abstract class MissionWithStartingCore extends Mission{
|
||||
startingCoreTile.setBlock(StorageBlocks.core);
|
||||
startingCoreTile.setTeam(team);
|
||||
state.teams.get(team).cores.add(startingCoreTile);
|
||||
|
||||
//makes sure there's a flat area around core
|
||||
for(int dx = -2; dx <= 2; dx++){
|
||||
for(int dy = -2; dy <= 2; dy++){
|
||||
gen.tiles[startingCoreTile.x + dx][startingCoreTile.y + dy].setElevation(startingCoreTile.getElevation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -268,6 +268,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
if(totalHosts == 0){
|
||||
local.clear();
|
||||
}
|
||||
local.background((Drawable) null);
|
||||
totalHosts ++;
|
||||
float w = targetWidth();
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public class PlayerListFragment extends Fragment{
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageButton("icon-admin", "clear-toggle", 14 * 2, () -> {
|
||||
t.addImageButton("icon-admin", "clear-toggle-partial", 14 * 2, () -> {
|
||||
if(Net.client()) return;
|
||||
|
||||
String id = player.uuid;
|
||||
|
||||
Reference in New Issue
Block a user