Fix a bcompat issue with cs_s/get_user_backpackammo() by not relying on m_rgpPlayerItems to get ammo index
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
#include "CstrikeHacks.h"
|
||||
|
||||
CsItemInfo ItemsManager;
|
||||
char WeaponNameList[MAX_WEAPONS][64];
|
||||
ItemInfo WeaponsList[MAX_WEAPONS];
|
||||
|
||||
#define PSTATE_ALIASES_TYPE 0
|
||||
#define PSTATE_ALIASES_ALIAS 1
|
||||
@ -202,7 +202,7 @@ bool CsItemInfo::GetAliasInfosFromName(const char *name, AliasInfo *info)
|
||||
|
||||
for (size_t id = 0; id < ARRAYSIZE(WeaponNameList); ++id)
|
||||
{
|
||||
const char *weapon = WeaponNameList[id];
|
||||
const char *weapon = WeaponsList[id].name.chars();
|
||||
|
||||
if (weapon[prefix_weapon_length] == '_' && !strncmp(weapon, prefix_weapon, prefix_weapon_length))
|
||||
{
|
||||
|
Reference in New Issue
Block a user