Functionality fixes
This commit is contained in:
@@ -112,6 +112,8 @@ public class BlockIndexer{
|
|||||||
|
|
||||||
/** Updates all the structure quadrants for a newly activated team. */
|
/** Updates all the structure quadrants for a newly activated team. */
|
||||||
public void updateTeamIndex(Team team){
|
public void updateTeamIndex(Team team){
|
||||||
|
if(structQuadrants == null) return;
|
||||||
|
|
||||||
//go through every tile... ouch
|
//go through every tile... ouch
|
||||||
for(int x = 0; x < world.width(); x++){
|
for(int x = 0; x < world.width(); x++){
|
||||||
for(int y = 0; y < world.height(); y++){
|
for(int y = 0; y < world.height(); y++){
|
||||||
|
|||||||
@@ -125,6 +125,10 @@ public class Teams{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateEnemies(){
|
private void updateEnemies(){
|
||||||
|
if(!active.contains(get(state.rules.waveTeam))){
|
||||||
|
active.add(get(state.rules.waveTeam));
|
||||||
|
}
|
||||||
|
|
||||||
for(TeamData data : active){
|
for(TeamData data : active){
|
||||||
data.enemies.clear();
|
data.enemies.clear();
|
||||||
for(TeamData other : active){
|
for(TeamData other : active){
|
||||||
|
|||||||
@@ -337,6 +337,7 @@ public class BuildBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDeconstruct(Block previous){
|
public void setDeconstruct(Block previous){
|
||||||
|
if(previous == null) return;
|
||||||
this.previous = previous;
|
this.previous = previous;
|
||||||
this.progress = 1f;
|
this.progress = 1f;
|
||||||
if(previous.buildCost >= 0.01f){
|
if(previous.buildCost >= 0.01f){
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ public class StaticWall extends Rock{
|
|||||||
|
|
||||||
boolean eq(int rx, int ry){
|
boolean eq(int rx, int ry){
|
||||||
return rx < world.width() - 1 && ry < world.height() - 1
|
return rx < world.width() - 1 && ry < world.height() - 1
|
||||||
&& world.tile(rx + 1, ry).block() == this
|
&& world.tile(rx + 1, ry).block() == this
|
||||||
&& world.tile(rx, ry + 1).block() == this
|
&& world.tile(rx, ry + 1).block() == this
|
||||||
&& world.tile(rx, ry).block() == this
|
&& world.tile(rx, ry).block() == this
|
||||||
&& world.tile(rx + 1, ry + 1).block() == this;
|
&& world.tile(rx + 1, ry + 1).block() == this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user