Multiplayer bugfixing on new spells/mechanics

This commit is contained in:
Pedro Gomes 2024-07-04 21:48:47 +01:00
parent 972cbda382
commit 8d61802e51
10 changed files with 39 additions and 221 deletions

View File

@ -48,6 +48,7 @@ MonoBehaviour:
- RPC_DisableVisuals
- RPC_SetTriggerBasedOnAbility
- RPC_ScaleForBoss
- RPC_EnableProjectilesOnRemote
DisableAutoOpenWizard: 1
ShowSettings: 0
DevRegionSetOnce: 1

View File

@ -251,6 +251,7 @@ MonoBehaviour:
ObservedComponents:
- {fileID: 7535207197812752297}
- {fileID: 7535207197812752311}
- {fileID: 7116996883530437291}
sceneViewId: 0
InstantiationId: 0
isRuntimeInstantiated: 0

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.06330306, g: 0.12662919, b: 0.13223198, a: 1}
m_IndirectSpecularColor: {r: 0.06227582, g: 0.124590114, b: 0.13008425, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:

View File

@ -3,7 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkMultipleProjectileChainReaction : NetworkAbilityChainReaction
public class NetworkMultipleProjectileChainReaction : NetworkAbilityChainReaction, IPunObservable
{
public List<NetworkedProjectile> projectiles = new List<NetworkedProjectile>();
@ -28,4 +28,22 @@ public class NetworkMultipleProjectileChainReaction : NetworkAbilityChainReactio
projectile.Init();
}
}
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
for (int i = 0; i < projectiles.Count; i++)
{
stream.SendNext(projectiles[i].gameObject.activeSelf);
}
}
if (stream.IsReading)
{
for (int i = 0; i < projectiles.Count; i++)
{
projectiles[i].gameObject.SetActive((bool)stream.ReceiveNext());
}
}
}
}

View File

@ -140,12 +140,12 @@ public class NetworkedAreaOfEffect : MonoBehaviour, IPunObservable
{
if (stream.IsWriting)
{
stream.SendNext(telegraph.activeSelf);
//stream.SendNext(telegraph.activeSelf);
stream.SendNext(effectVisual.activeSelf);
}
if (stream.IsReading)
{
telegraph.SetActive((bool)stream.ReceiveNext());
//telegraph.SetActive((bool)stream.ReceiveNext());
effectVisual.SetActive((bool)stream.ReceiveNext());
}
}

View File

@ -42,6 +42,7 @@ public class NetworkedAreaOfEffectOverTime : NetworkedAreaOfEffect
effectVisual.SetActive(false);
}
[PunRPC]
protected override void RPC_RemoteInit(int abilityIndex)
{
ability = (AreaOfEffectOverTimeAbility)AbilityIndexer.Instance.Abilities[abilityIndex]; // TODO: change casting to areaofeffectovertimeability

View File

@ -20,6 +20,7 @@ public class NetworkedAreaOfEffectWithImpactEvent : NetworkedAreaOfEffect
}
}
[PunRPC]
protected override void RPC_RemoteInit(int abilityIndex)
{
ability = (AreaOfEffectWithImpactEventAbility)AbilityIndexer.Instance.Abilities[abilityIndex];

View File

@ -94,7 +94,7 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Rotation: 6.6193213
- _Rotation: 5.336708
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1

File diff suppressed because one or more lines are too long

View File

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.7.3
bundleVersion: 0.7.6
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0