diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs index bae4c17..00c5337 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs @@ -99,8 +99,12 @@ var rotate = MathUtils.RandRangeInt(-720, 720); var shell = new ShellCase(); shell.Throw(new Vector2(10, 5), startPos, startHeight, direction, xf, yf, rotate, true); - //创建抖动 - GameCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + + if (Master == GameApplication.Instance.Room.Player) + { + //创建抖动 + GameCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + } //播放射击音效 SoundManager.PlaySoundEffect("ordinaryBullet.ogg", this, 6f); } diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs index c6817c5..f22ec6b 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs @@ -65,8 +65,12 @@ var rotate = MathUtils.RandRangeInt(-720, 720); var shell = new ShellCase(); shell.Throw(new Vector2(5, 10), startPos, startHeight, direction, xf, yf, rotate, true); - //创建抖动 - GameCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + + if (Master == GameApplication.Instance.Room.Player) + { + //创建抖动 + GameCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + } //播放射击音效 SoundManager.PlaySoundEffect("ordinaryBullet.ogg", this, 6f); }