From 61c47b6b45dbe7783fe31abbd94d7ff2c7ac4ede Mon Sep 17 00:00:00 2001 From: Oscar Date: Wed, 30 Oct 2024 19:59:34 +0300 Subject: [PATCH] upd --- Code/Kal.cs | 4 ++-- Code/swb_base/Weapon.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/Kal.cs b/Code/Kal.cs index 5ee9ac5..461fd46 100644 --- a/Code/Kal.cs +++ b/Code/Kal.cs @@ -105,12 +105,12 @@ public sealed class Kal : Component, IPlayerBase if ( Input.Pressed( "Slot1" ) ) { - Inventory.SetActive("Pistol"); + Inventory?.SetActive("Pistol"); } if ( Input.Pressed( "Slot2" ) ) { - Inventory.Disarm(); + Inventory?.Disarm(); } CharacterController.WishVelocity = wishDirection * wishSpeed; diff --git a/Code/swb_base/Weapon.cs b/Code/swb_base/Weapon.cs index 9274fe6..e15b21c 100644 --- a/Code/swb_base/Weapon.cs +++ b/Code/swb_base/Weapon.cs @@ -183,7 +183,7 @@ public partial class Weapon : Component, IInventoryItem } void CreateModels() - { + { WorldModelRenderer = Components.Create(); WorldModelRenderer.Model = WorldModel; WorldModelRenderer.AnimationGraph = WorldModel.AnimGraph;