* fix the no fire sound problem (#138) Co-authored-by: Fernando Cortez <fernando.cortez@unity3d.com> * changelog addition --------- Co-authored-by: Zhanyu Feng <42690051+Alexander5421@users.noreply.github.com>
This commit is contained in:
Родитель
a1b536715a
Коммит
1107a208c7
|
@ -193,8 +193,7 @@ public class ShipControl : NetworkBehaviour
|
|||
|
||||
void Fire(Vector3 direction)
|
||||
{
|
||||
fireSound.Play();
|
||||
|
||||
PlayFireSoundClientRpc();
|
||||
var damage = 5;
|
||||
if (QuadDamageTimer.Value > NetworkManager.ServerTime.TimeAsFloat)
|
||||
{
|
||||
|
@ -498,6 +497,13 @@ public class ShipControl : NetworkBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
// --- ClientRPCs ---
|
||||
|
||||
[ClientRpc]
|
||||
void PlayFireSoundClientRpc()
|
||||
{
|
||||
fireSound.Play();
|
||||
}
|
||||
// --- ServerRPCs ---
|
||||
|
||||
[ServerRpc]
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
### Fixed
|
||||
- Corrected the variables used for initialization of Health and Energy (#150)
|
||||
- Converted unnecessary ship thrust NetworkVariable to a float (#149)
|
||||
- Fixed non-host clients not hearing the Fire SFX (#148)
|
||||
|
||||
### Client Driven
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче