From 1e5c6393a6b29eb00dbb8fb137d86647cb0c356b Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Fri, 28 Jul 2023 22:06:03 +0100 Subject: Add TryUnstuck and death overlay --- code/weapon/Weapon.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'code/weapon/Weapon.cs') diff --git a/code/weapon/Weapon.cs b/code/weapon/Weapon.cs index 4519adc..6d6fc20 100644 --- a/code/weapon/Weapon.cs +++ b/code/weapon/Weapon.cs @@ -195,11 +195,13 @@ public partial class Weapon : AnimatedEntity [ClientRpc] public void CreateViewModel() { + DestroyViewModel(); if ( ViewModelPath == null ) return; var vm = new WeaponViewModel( this ); vm.Model = Model.Load( ViewModelPath ); vm.Owner = Owner; + vm.Parent = Game.LocalPawn; ViewModelEntity = vm; if (!string.IsNullOrEmpty(HandsModelPath)) { -- cgit v1.2.3-70-g09d2