Example #1
0
    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);
        }
    }
Example #2
0
    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);
        }
    }