mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Spawn on core doesnt ignore "possessionAllowed" rule (#12183)
* Make player cannot control building when possession disabled * check is core best
This commit is contained in:
@@ -743,7 +743,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(player == null || build == null || player.dead()) return;
|
||||
|
||||
//make sure player is allowed to control the building
|
||||
if(net.server() && !netServer.admins.allowAction(player, ActionType.buildSelect, action -> action.tile = build.tile)){
|
||||
if(net.server() && (!state.rules.possessionAllowed && player.bestCore() != build || !netServer.admins.allowAction(player, ActionType.buildSelect, action -> action.tile = build.tile))){
|
||||
throw new ValidateException(player, "Player cannot control a building.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user