mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-28 06:28:04 +03:00
Don't call HasRestrictItem with type touch when that item is buying
This commit is contained in:
parent
c56f00f7ed
commit
0cd233dc06
@ -134,6 +134,7 @@ static entity_field_alias_t custom_entity_field_alias[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool g_bServerActive = false;
|
bool g_bServerActive = false;
|
||||||
|
bool g_bItemCreatedByBuying = false;
|
||||||
PLAYERPVSSTATUS g_PVSStatus[MAX_CLIENTS];
|
PLAYERPVSSTATUS g_PVSStatus[MAX_CLIENTS];
|
||||||
unsigned short m_usResetDecals;
|
unsigned short m_usResetDecals;
|
||||||
unsigned short g_iShadowSprite;
|
unsigned short g_iShadowSprite;
|
||||||
@ -1493,7 +1494,10 @@ void BuyItem(CBasePlayer *pPlayer, int iSlot)
|
|||||||
|
|
||||||
if (pszItem)
|
if (pszItem)
|
||||||
{
|
{
|
||||||
|
g_bItemCreatedByBuying = true;
|
||||||
pPlayer->GiveNamedItem(pszItem);
|
pPlayer->GiveNamedItem(pszItem);
|
||||||
|
g_bItemCreatedByBuying = false;
|
||||||
|
|
||||||
pPlayer->AddAccount(-iItemPrice, RT_PLAYER_BOUGHT_SOMETHING);
|
pPlayer->AddAccount(-iItemPrice, RT_PLAYER_BOUGHT_SOMETHING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ C_DLLEXPORT int CountTeams();
|
|||||||
C_DLLEXPORT int CountTeamPlayers(int iTeam);
|
C_DLLEXPORT int CountTeamPlayers(int iTeam);
|
||||||
|
|
||||||
extern bool g_bServerActive;
|
extern bool g_bServerActive;
|
||||||
|
extern bool g_bItemCreatedByBuying;
|
||||||
extern bool g_skipCareerInitialSpawn;
|
extern bool g_skipCareerInitialSpawn;
|
||||||
|
|
||||||
extern unsigned short m_usResetDecals;
|
extern unsigned short m_usResetDecals;
|
||||||
|
@ -371,8 +371,10 @@ void CItemKevlar::Precache()
|
|||||||
BOOL CItemKevlar::MyTouch(CBasePlayer *pPlayer)
|
BOOL CItemKevlar::MyTouch(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
#ifdef REGAMEDLL_ADD
|
#ifdef REGAMEDLL_ADD
|
||||||
if (pPlayer->HasRestrictItem(ITEM_KEVLAR, ITEM_TYPE_TOUCHED))
|
if (!g_bItemCreatedByBuying && pPlayer->HasRestrictItem(ITEM_KEVLAR, ITEM_TYPE_TOUCHED))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
g_bItemCreatedByBuying = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
@ -423,8 +425,10 @@ void CItemAssaultSuit::Precache()
|
|||||||
BOOL CItemAssaultSuit::MyTouch(CBasePlayer *pPlayer)
|
BOOL CItemAssaultSuit::MyTouch(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
#ifdef REGAMEDLL_ADD
|
#ifdef REGAMEDLL_ADD
|
||||||
if (pPlayer->HasRestrictItem(ITEM_ASSAULT, ITEM_TYPE_TOUCHED))
|
if (!g_bItemCreatedByBuying && pPlayer->HasRestrictItem(ITEM_ASSAULT, ITEM_TYPE_TOUCHED))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
g_bItemCreatedByBuying = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user