public virtual void ShootEffects(int clipInfoIndex) { Host.AssertClient(); if (clipInfoIndex < 0 || clipInfoIndex >= ClipInfos.Length) { return; } ClipInfo clipInfo = ClipInfos[clipInfoIndex]; if (clipInfo == null) { return; } if (CarriableInfo.Category != CarriableCategories.Melee) { foreach (KeyValuePair <string, string> keyValuePair in clipInfo.ShootEffectList) { Particles.Create(keyValuePair.Key, EffectEntity, keyValuePair.Value); } } if (IsLocalPawn && clipInfo.ShakeEffect != null) { _ = new Perlin(clipInfo.ShakeEffect.Length, clipInfo.ShakeEffect.Speed, clipInfo.ShakeEffect.Size, clipInfo.ShakeEffect.Rotation); } ViewModelEntity?.SetAnimParameter("fire", true); CrosshairPanel?.CreateEvent("fire"); }
protected override void ShootEffects() { Host.AssertClient(); if (Owner == Player.Local) { new Sandbox.ScreenShake.Perlin(0.5f, 4.0f, 1.0f, 0.5f); } ViewModelEntity?.SetAnimParam("fire", true); CrosshairPanel?.OnEvent("fire"); }
protected override void ShootEffects() { Host.AssertClient(); if (Owner == Local.Pawn) { new Perlin(0.5f, 4.0f, 1.0f, 0.5f); } ViewModelEntity?.SetAnimBool("fire", true); CrosshairPanel?.CreateEvent("fire"); }
protected virtual void ShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); if (IsLocalPawn) { _ = new Sandbox.ScreenShake.Perlin(); } ViewModelEntity?.SetAnimParameter("fire", true); CrosshairPanel?.CreateEvent("fire"); }
protected virtual void DoubleShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); ViewModelEntity?.SetAnimParam("fire_double", true); CrosshairPanel?.OnEvent("fire"); if (Owner == Player.Local) { new Sandbox.ScreenShake.Perlin(3.0f, 3.0f, 3.0f); } }
protected virtual void DoubleShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); ViewModelEntity?.SetAnimBool("fire_double", true); CrosshairPanel?.CreateEvent("fire"); if (IsLocalPawn) { new Perlin(3.0f, 3.0f, 3.0f); } }
protected override void ShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); Particles.Create("particles/pistol_ejectbrass.vpcf", EffectEntity, "ejection_point"); if (Owner == Local.Pawn) { new Sandbox.ScreenShake.Perlin(0.5f, 4.0f, 1.0f, 0.5f); } ViewModelEntity?.SetAnimParameter("fire", true); CrosshairPanel?.CreateEvent("fire"); }
protected virtual void ShootEffects() { Host.AssertClient(); Log.Info($"{EffectEntity} {ViewModelEntity} {IsFirstPersonMode} {CurrentView.Viewer} parent:{Parent}"); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); if (IsLocalPawn) { new Sandbox.ScreenShake.Perlin(); } ViewModelEntity?.SetAnimBool("fire", true); CrosshairPanel?.OnEvent("fire"); }
protected override void ShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); Particles.Create("particles/pistol_ejectbrass.vpcf", EffectEntity, "ejection_point"); ViewModelEntity?.SetAnimParam("fire", true); if (Owner == Player.Local) { _ = new Sandbox.ScreenShake.Perlin(1.0f, 1.5f, 2.0f); } CrosshairPanel?.OnEvent("fire"); }
protected override void ShootEffects() { Host.AssertClient(); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); Particles.Create("particles/pistol_ejectbrass.vpcf", EffectEntity, "ejection_point"); ViewModelEntity?.SetAnimBool("fire", true); if (IsLocalPawn) { new Perlin(1.0f, 1.5f, 2.0f); } CrosshairPanel?.CreateEvent("fire"); }
public virtual void ShootEffects() { Host.AssertClient(); var muzzle = EffectEntity.GetAttachment("muzzle"); bool InWater = Physics.TestPointContents(muzzle.Pos, CollisionLayer.Water); Sound.FromEntity("rust_pistol.shoot", this); Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); ViewModelEntity?.SetAnimParam("fire", true); CrosshairPanel?.OnEvent("onattack"); if (Owner == Player.Local) { new Sandbox.ScreenShake.Perlin(0.5f, 2.0f, 0.5f); } }
protected override void ShootEffects() { Host.AssertClient(); var muzzle = EffectEntity.GetAttachment("muzzle"); //bool InWater = Physics.TestPointContents( muzzle.Pos, CollisionLayer.Water ); Sound.FromEntity(AttackSound.Name, this); Particles.Create("particles/balloon_grenade_launcher_muzzle.vpcf", EffectEntity, "muzzle"); ViewModelEntity?.SetAnimParam("fire", true); CrosshairPanel?.OnEvent("onattack"); if (Owner == Local.Client) { new Sandbox.ScreenShake.Perlin(0.5f, 2.0f, 0.5f); } }
protected virtual void ShootEffects() { Host.AssertClient(); var particle = Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle"); var Light = new Light(EffectEntity.Position, 1000, Color.Yellow * 100); //EffectEntity.AddChild(Light); if (IsLocalPawn) { new Perlin(); } ViewModelEntity?.SetAnimBool("fire", true); CrosshairPanel?.CreateEvent("fire"); HandleLight(Light); }