diff options
Diffstat (limited to 'code/weapon')
| -rw-r--r-- | code/weapon/Weapon.cs | 2 |
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))
{
|
