diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-07-28 22:06:03 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-07-28 22:06:03 +0100 |
| commit | 1e5c6393a6b29eb00dbb8fb137d86647cb0c356b (patch) | |
| tree | 95cbba0e7ade6bd97675480c2559c8e01f74a635 /code/weapon | |
| parent | f137095304f456b06229e4d17ee8249e974fceaf (diff) | |
Add TryUnstuck and death overlay
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))
{
|
