Only send initial state for things that are controlled and in sockets

This commit is contained in:
xen-42 2025-03-01 21:30:03 -05:00
parent d906d9f8ac
commit 46dc36fa4b

View File

@ -37,10 +37,13 @@ public class QSBSocketedQuantumObject : QSBQuantumObject<SocketedQuantumObject>
{ {
base.SendInitialState(to); base.SendInitialState(to);
this.SendMessage(new SocketStateChangeMessage( if (this.ControllingPlayer != 0 && AttachedObject._occupiedSocket != null)
AttachedObject._occupiedSocket.GetWorldObject<QSBQuantumSocket>().ObjectId, {
AttachedObject.transform.localRotation) this.SendMessage(new SocketStateChangeMessage(
{ To = to }); AttachedObject._occupiedSocket.GetWorldObject<QSBQuantumSocket>().ObjectId,
AttachedObject.transform.localRotation)
{ To = to });
}
} }
public void MoveToSocket(uint playerId, int socketId, Quaternion localRotation) public void MoveToSocket(uint playerId, int socketId, Quaternion localRotation)