클라이언트에게 시야 정보가 공유되지 않는 문제 수정
This commit is contained in:
@@ -355,7 +355,7 @@ namespace Northbound
|
||||
|
||||
Vector3 position = provider.GetTransform().position;
|
||||
float visionRange = provider.GetVisionRange();
|
||||
|
||||
|
||||
RevealArea(ownerId, position, visionRange);
|
||||
}
|
||||
|
||||
@@ -365,11 +365,18 @@ namespace Northbound
|
||||
ulong clientId = kvp.Key;
|
||||
FogOfWarData fogData = kvp.Value;
|
||||
|
||||
// 해당 클라이언트가 여전히 연결되어 있는지 확인
|
||||
if (NetworkManager.Singleton == null ||
|
||||
!NetworkManager.Singleton.ConnectedClients.ContainsKey(clientId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 압축된 데이터로 전송
|
||||
byte[] visibleData = fogData.GetVisibleData();
|
||||
byte[] exploredData = fogData.GetExploredData();
|
||||
|
||||
SendFogDataToClientRpc(visibleData, exploredData,
|
||||
SendFogDataToClientRpc(visibleData, exploredData,
|
||||
new ClientRpcParams
|
||||
{
|
||||
Send = new ClientRpcSendParams
|
||||
|
||||
Reference in New Issue
Block a user