From b393d1abacc880b9d94d4ce5d48ae39fbe417ad5 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Tue, 1 Aug 2023 18:21:08 +0100 Subject: Add animations to knife --- code/weapon/Weapon.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'code/weapon/Weapon.cs') diff --git a/code/weapon/Weapon.cs b/code/weapon/Weapon.cs index 6d6fc20..8eafbc3 100644 --- a/code/weapon/Weapon.cs +++ b/code/weapon/Weapon.cs @@ -171,7 +171,7 @@ public partial class Weapon : AnimatedEntity var pos = ray.Position; bool hit = false; - foreach (var tr in TraceBullet(pos, pos + forward * 50, 20)) + foreach (var tr in TraceBullet(pos, pos + forward * 80, 20)) { tr.Surface.DoBulletImpact(tr); hit = true; @@ -202,6 +202,7 @@ public partial class Weapon : AnimatedEntity vm.Model = Model.Load( ViewModelPath ); vm.Owner = Owner; vm.Parent = Game.LocalPawn; + vm.SetAnimParameter( "deploy", true ); ViewModelEntity = vm; if (!string.IsNullOrEmpty(HandsModelPath)) { -- cgit v1.2.3-70-g09d2