Fixed items attached mid-round by other clients or the host being impossible to interact with and occasionally being attached to an incorrect position. Closes #296
This commit is contained in:
@@ -23,12 +23,6 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
get
|
||||
{
|
||||
if (powerConnections == null)
|
||||
{
|
||||
var connections = Item.Connections;
|
||||
powerConnections = connections == null ? new List<Connection>() : connections.FindAll(c => c.IsPower);
|
||||
|
||||
}
|
||||
return powerConnections;
|
||||
}
|
||||
}
|
||||
@@ -338,18 +332,18 @@ namespace Barotrauma.Items.Components
|
||||
connectionDirty[connection] = true;
|
||||
}
|
||||
|
||||
public override void OnMapLoaded()
|
||||
public override void OnItemLoaded()
|
||||
{
|
||||
var connections = item.Connections;
|
||||
var connections = Item.Connections;
|
||||
powerConnections = connections == null ? new List<Connection>() : connections.FindAll(c => c.IsPower);
|
||||
if (connections == null)
|
||||
{
|
||||
IsActive = false;
|
||||
return;
|
||||
}
|
||||
|
||||
SetAllConnectionsDirty();
|
||||
}
|
||||
|
||||
|
||||
public override void ReceiveSignal(int stepsTaken, string signal, Connection connection, Item source, Character sender, float power)
|
||||
{
|
||||
base.ReceiveSignal(stepsTaken, signal, connection, source, sender, power);
|
||||
|
||||
Reference in New Issue
Block a user