Make players assume ownership of networks when they place security stations onto unsecured ones (#4714)
* Fixes #4712: When a security station is placed onto an unsecured network, the placer assumes ownership of the entire network. Otherwise the contiguous network would not necessarily reconnect in the same way when the chunk is reloaded due to differing player-ids throughout the network. In addition, changes to the node's owner were not being persisted due to the host never being marked as dirty. * Fix formatting
This commit is contained in:
@@ -327,8 +327,9 @@ public class GridNode implements IGridNode, IPathItem {
|
||||
|
||||
@Override
|
||||
public void setPlayerID(final int playerID) {
|
||||
if (playerID >= 0) {
|
||||
if (playerID >= 0 && this.playerID != playerID) {
|
||||
this.playerID = playerID;
|
||||
gridProxy.onGridNotification(GridNotification.OWNER_CHANGED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user