@@ -245,7 +245,7 @@ public void OnBridgeAction(BridgeActionModel message)
245
245
// switch to handle actions
246
246
switch ( message . action ) {
247
247
case actionType . CREATE_EDGE :
248
- edgeProxy = new BridgeEdgeProxy ( message . content , ref offset ) ;
248
+ edgeProxy = new BridgeEdgeProxy ( 10 , message . content , ref offset ) ;
249
249
//BridgeEdges.CreateEdgeFromProxy(edgeProxy);
250
250
251
251
edge = BridgeEdges . FindDisabledEdgeByJointGuids (
@@ -306,7 +306,7 @@ public void OnBridgeAction(BridgeActionModel message)
306
306
instance . ClientRecieving [ actionType . CREATE_JOINT ] = false ;
307
307
break ;
308
308
case actionType . DELETE_EDGE :
309
- edgeProxy = new BridgeEdgeProxy ( message . content , ref offset ) ;
309
+ edgeProxy = new BridgeEdgeProxy ( 10 , message . content , ref offset ) ;
310
310
edge = BridgeEdges . FindEnabledEdgeByJointGuids ( edgeProxy . m_NodeA_Guid , edgeProxy . m_NodeB_Guid , edgeProxy . m_Material ) ;
311
311
if ( edge ) {
312
312
edge . ForceDisable ( ) ;
@@ -380,7 +380,7 @@ public void OnBridgeAction(BridgeActionModel message)
380
380
}
381
381
break ;
382
382
case actionType . SPLIT_MODIFY :
383
- edgeProxy = new BridgeEdgeProxy ( message . content , ref offset ) ;
383
+ edgeProxy = new BridgeEdgeProxy ( 10 , message . content , ref offset ) ;
384
384
edge = BridgeEdges . FindEnabledEdgeByJointGuids ( edgeProxy . m_NodeA_Guid , edgeProxy . m_NodeB_Guid , edgeProxy . m_Material ) ;
385
385
if ( edge ) {
386
386
edge . m_JointAPart = edgeProxy . m_JointAPart ;
@@ -1007,7 +1007,7 @@ public static void Postfix(
1007
1007
var edge = new BridgeEdgeProxy ( __result ) ;
1008
1008
var message = new BridgeActionModel {
1009
1009
action = actionType . CREATE_EDGE ,
1010
- content = edge . SerializeBinary ( ) ,
1010
+ content = edge . SerializeBinary ( true ) ,
1011
1011
playSound = true
1012
1012
} ;
1013
1013
instance . Logger . LogInfo ( "<CLIENT> sending CREATE_EDGE" ) ;
@@ -1094,7 +1094,7 @@ public static void Prefix() {
1094
1094
var joint = new BridgeEdgeProxy ( e ) ;
1095
1095
var message = new BridgeActionModel {
1096
1096
action = actionType . DELETE_EDGE ,
1097
- content = joint . SerializeBinary ( ) ,
1097
+ content = joint . SerializeBinary ( true ) ,
1098
1098
playSound = playSound
1099
1099
} ;
1100
1100
playSound = false ;
@@ -1203,7 +1203,7 @@ public static void Postfix(bool forward, ref BridgeJointSelector __instance){
1203
1203
var edge = new BridgeEdgeProxy ( __instance . m_Edge ) ;
1204
1204
var message = new BridgeActionModel {
1205
1205
action = actionType . SPLIT_MODIFY ,
1206
- content = edge . SerializeBinary ( )
1206
+ content = edge . SerializeBinary ( true )
1207
1207
} ;
1208
1208
1209
1209
instance . communication . Lobby . SendBridgeAction ( message ) ;
@@ -1755,7 +1755,7 @@ BridgeActionPacket packet
1755
1755
switch ( action ) {
1756
1756
case actionType . CREATE_EDGE :
1757
1757
message . action = actionType . DELETE_EDGE ;
1758
- message . content = packet . m_Edge . SerializeBinary ( ) ;
1758
+ message . content = packet . m_Edge . SerializeBinary ( true ) ;
1759
1759
break ;
1760
1760
1761
1761
case actionType . CREATE_JOINT :
@@ -1765,7 +1765,7 @@ BridgeActionPacket packet
1765
1765
1766
1766
case actionType . DELETE_EDGE :
1767
1767
message . action = actionType . CREATE_EDGE ;
1768
- message . content = packet . m_Edge . SerializeBinary ( ) ;
1768
+ message . content = packet . m_Edge . SerializeBinary ( true ) ;
1769
1769
break ;
1770
1770
1771
1771
case actionType . DELETE_JOINT :
@@ -1856,15 +1856,15 @@ public static bool Prefix(){
1856
1856
}
1857
1857
}
1858
1858
1859
- [ HarmonyPatch ( ) ]
1859
+ [ HarmonyPatch ]
1860
1860
public static class LoadLayoutOrSlotPatch {
1861
1861
static IEnumerable < MethodBase > TargetMethods ( )
1862
1862
{
1863
1863
yield return AccessTools . Method ( typeof ( BridgeSave ) , "Deserialize" ) ;
1864
1864
yield return AccessTools . Method ( typeof ( SandboxLayout ) , "DeserializeFromProxies" ) ;
1865
1865
}
1866
1866
public static void Postfix ( ) {
1867
- // if (GameStateManager.GetState() == GameState.BUILD || GameStateManager.GetState() == GameState.SANDBOX) syncLayout();
1867
+ if ( GameStateManager . GetState ( ) == GameState . BUILD || GameStateManager . GetState ( ) == GameState . SANDBOX ) syncLayout ( ) ;
1868
1868
}
1869
1869
}
1870
1870
0 commit comments