소스 검색

Fixed App Fuse Desync

BennAbbot 3 달 전
부모
커밋
2943a08daf
1개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 11 2
      Assets/Scripts/Script/SelectCardEffect.cs

+ 11 - 2
Assets/Scripts/Script/SelectCardEffect.cs

@@ -573,7 +573,16 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                         _slectedInexesInList.Add(selectedIndex);
                         _slectedInexesInList.Add(selectedIndex);
                     }
                     }
 
 
-                    photonView.RPC("SetTargetCardAndIndicies", RpcTarget.All, _selectPlayer.PlayerID, targetCardIDs.ToArray(), _slectedInexesInList.ToArray());
+                    if (_isLocal)
+                    {
+                        SetTargetCardAndIndicies(_selectPlayer.PlayerID, targetCardIDs.ToArray(), _slectedInexesInList.ToArray());
+                    }
+                    else
+                    {
+                        photonView.RPC("SetTargetCardAndIndicies", RpcTarget.All, _selectPlayer.PlayerID, targetCardIDs.ToArray(), _slectedInexesInList.ToArray());
+                    }
+
+                   
                 }
                 }
             }
             }
             else
             else
@@ -639,7 +648,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                             CardIDs.Add(cardSource.CardIndex);
                             CardIDs.Add(cardSource.CardIndex);
                         }
                         }
 
 
-                        if (GManager.instance.IsAI)
+                        if (GManager.instance.IsAI || _isLocal)
                         {
                         {
                             SetTargetCardAndIndicies(_selectPlayer.PlayerID, CardIDs.ToArray(), null);
                             SetTargetCardAndIndicies(_selectPlayer.PlayerID, CardIDs.ToArray(), null);
                         }
                         }