Multiplayer fixes

This commit is contained in:
Anuken
2022-04-26 15:23:38 -04:00
parent b03fe2c86c
commit b3ec8745d2
2 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 463 B

View File

@@ -55,7 +55,7 @@ public class ConstructBlock extends Block{
@Remote(called = Loc.server) @Remote(called = Loc.server)
public static void deconstructFinish(Tile tile, Block block, Unit builder){ public static void deconstructFinish(Tile tile, Block block, Unit builder){
Team team = tile.team(); Team team = tile.team();
if(fogControl.isVisibleTile(player.team(), tile.x, tile.y)){ if(fogControl.isVisibleTile(team, tile.x, tile.y)){
block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor); block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor);
if(shouldPlay()) block.breakSound.at(tile, block.breakPitchChange ? calcPitch(false) : 1f); if(shouldPlay()) block.breakSound.at(tile, block.breakPitchChange ? calcPitch(false) : 1f);
} }
@@ -98,7 +98,7 @@ public class ConstructBlock extends Block{
tile.build.playerPlaced(config); tile.build.playerPlaced(config);
} }
if(fogControl.isVisibleTile(player.team(), tile.x, tile.y)){ if(fogControl.isVisibleTile(team, tile.x, tile.y)){
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size); Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f); if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
} }