Added more validaiton for sector capture events

This commit is contained in:
Anuken
2020-11-17 10:20:57 -05:00
parent b46676014b
commit 1e2b593152

View File

@@ -123,7 +123,7 @@ public class Logic implements ApplicationListener{
}); });
Events.on(SectorCaptureEvent.class, e -> { Events.on(SectorCaptureEvent.class, e -> {
if(!net.client() && e.sector == state.getSector()){ if(!net.client() && e.sector == state.getSector() && e.sector.isBeingPlayed()){
for(Tile tile : world.tiles){ for(Tile tile : world.tiles){
//convert all blocks to neutral, randomly killing them //convert all blocks to neutral, randomly killing them
if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){ if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){