From 4376ba16a240d20723ca442ee108272dc065f38e Mon Sep 17 00:00:00 2001 From: JWS Date: Sat, 5 Feb 2022 18:58:20 -0600 Subject: [PATCH] fix spawning glitch --- Assets/RocketSphere.cs | 9 +++++---- ProjectSettings/GraphicsSettings.asset | Bin 5528 -> 5540 bytes ProjectSettings/ProjectSettings.asset | Bin 74040 -> 74132 bytes 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/RocketSphere.cs b/Assets/RocketSphere.cs index cb5dee9..ff9d635 100644 --- a/Assets/RocketSphere.cs +++ b/Assets/RocketSphere.cs @@ -39,8 +39,6 @@ public class RocketSphere : NetworkBehaviour AudioSource hyperspaceSound; AudioSource engineSound; - AudioSource [] musicLoops; - public GameObject explosionPrefab; Rigidbody rb; [SyncVar] Color RocketColor = Color.white; @@ -460,8 +458,11 @@ void Update() if (!rocket) return; - // make sure the state matches the server state - if (visible != rocket.activeSelf) + // make sure the state matches the server state, + // don't do this on the server as you may enable the ship + // while it is spawning in, this is only for clients + // to catch up the other rocket enable states in the game + if ((visible != rocket.activeSelf) && isClient) { rocket.SetActive(visible); } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 4794c37a03dbac71db4a0fafa0a9d2f81291930e..9861984a752be30a740c2c5d7e930ae86ef0d8cd 100644 GIT binary patch delta 40 wcmbQCy+oUXfk8xrfkAZ1Mvgbaj46}93ZG}>o_tiKnvIcxfuY%MvXy8Y0O2zW5&!@I delta 33 pcmZ3YJwuy=fk8xrfkAY}Mvgbaj1iN+3ZG}>ntW8Gda{pb1OS`p3OxV- diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1a056c95deef23ebee0154e77e32a5298378e3c6..13d1f3bed989d14baf1feca43a8420760736991e 100644 GIT binary patch delta 133 zcmdmSh-J!Q76ArEmYEEUic=UE7({{W4UGa@1sG#kES|^!MWBEQL@#E}WanO3?%bV! zT*#w$4mVhkVTn|ZI~QZQ?+(}ho4BX{ddsxEg@sXoi7{mRLN>rWG>N53(_;E#Jbz$i(Qs9mw9# LynO=~;}bCehuIFn