Fixed #8587
This commit is contained in:
@@ -477,11 +477,15 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
if(build == null) return;
|
if(build == null) return;
|
||||||
if(net.server() && (!Units.canInteract(player, build) ||
|
if(net.server() && (!Units.canInteract(player, build) ||
|
||||||
!netServer.admins.allowAction(player, ActionType.configure, build.tile, action -> action.config = value))){
|
!netServer.admins.allowAction(player, ActionType.configure, build.tile, action -> action.config = value))){
|
||||||
var packet = new TileConfigCallPacket(); //undo the config on the client
|
|
||||||
packet.player = player;
|
if(player.con != null){
|
||||||
packet.build = build;
|
var packet = new TileConfigCallPacket(); //undo the config on the client
|
||||||
packet.value = build.config();
|
packet.player = player;
|
||||||
player.con.send(packet, true);
|
packet.build = build;
|
||||||
|
packet.value = build.config();
|
||||||
|
player.con.send(packet, true);
|
||||||
|
}
|
||||||
|
|
||||||
throw new ValidateException(player, "Player cannot configure a tile.");
|
throw new ValidateException(player, "Player cannot configure a tile.");
|
||||||
}
|
}
|
||||||
build.configured(player == null || player.dead() ? null : player.unit(), value);
|
build.configured(player == null || player.dead() ? null : player.unit(), value);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import mindustry.world.*;
|
|||||||
import mindustry.world.blocks.defense.*;
|
import mindustry.world.blocks.defense.*;
|
||||||
import mindustry.world.blocks.payloads.*;
|
import mindustry.world.blocks.payloads.*;
|
||||||
import mindustry.world.blocks.power.*;
|
import mindustry.world.blocks.power.*;
|
||||||
import mindustry.world.blocks.power.PowerNode.*;
|
|
||||||
import mindustry.world.blocks.production.*;
|
import mindustry.world.blocks.production.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
@@ -173,7 +172,7 @@ public class BaseGenerator{
|
|||||||
|
|
||||||
for(Tile tile : tiles){
|
for(Tile tile : tiles){
|
||||||
if(tile.isCenter() && tile.block() instanceof PowerNode && tile.team() == state.rules.waveTeam){
|
if(tile.isCenter() && tile.block() instanceof PowerNode && tile.team() == state.rules.waveTeam){
|
||||||
tile.build.configure(new Point2[0]);
|
tile.build.configureAny(new Point2[0]);
|
||||||
tile.build.placed();
|
tile.build.placed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user