From 73bdc7cdb15a5184f1f4eb6dedcdaad725c4beb1 Mon Sep 17 00:00:00 2001 From: Hedgehog Fog Date: Thu, 29 Dec 2022 14:18:29 +0200 Subject: [PATCH] update custom weapons api --- src/scripts/api/api_custom_weapons.sma | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scripts/api/api_custom_weapons.sma b/src/scripts/api/api_custom_weapons.sma index 0097263..82130e6 100644 --- a/src/scripts/api/api_custom_weapons.sma +++ b/src/scripts/api/api_custom_weapons.sma @@ -10,7 +10,7 @@ #include #define PLUGIN "[API] Custom Weapons" -#define VERSION "0.7.5" +#define VERSION "0.7.6" #define AUTHOR "Hedgehog Fog" #define WALL_PUFF_SPRITE "sprites/wall_puff1.spr" @@ -738,9 +738,11 @@ public OnSetModel_Post(this, const szModel[]) { ExecuteBindedFunction(CWB_WeaponBoxModelUpdate, pItem, this); g_pNewWeaponboxEnt = 0; - if (!ExecuteHamB(Ham_CS_Item_CanDrop, pItem)) { - set_pev(this, pev_flags, pev(this, pev_flags) | FL_KILLME); - dllfunc(DLLFunc_Think, this); + if (!g_bPrecache) { + if (!ExecuteHamB(Ham_CS_Item_CanDrop, pItem)) { + set_pev(this, pev_flags, pev(this, pev_flags) | FL_KILLME); + dllfunc(DLLFunc_Think, this); + } } return FMRES_HANDLED;