aboutsummaryrefslogtreecommitdiffstats
path: root/code/weapon/Weapon.cs
diff options
context:
space:
mode:
Diffstat (limited to 'code/weapon/Weapon.cs')
-rw-r--r--code/weapon/Weapon.cs2
1 files changed, 2 insertions, 0 deletions
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))
{