Use implemented function to get weapon name.
This commit is contained in:
parent
d8f0484327
commit
a341a0e85c
@ -53,15 +53,7 @@ DETOUR_DECL_MEMBER3(DetourHandleBuy, int, int, iLoadoutSlot, void *, pWpnDataRef
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *underscore = strstr(szClassname, "_");
|
||||
if (underscore)
|
||||
{
|
||||
Q_strncpy(weaponName, (const char *)((intptr_t)underscore + 1), sizeof(weaponName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_strncpy(weaponName, szClassname, sizeof(weaponName));
|
||||
}
|
||||
Q_strncpy(weaponName, GetWeaponNameFromClassname(szClassname), sizeof(weaponName));
|
||||
}
|
||||
|
||||
cell_t result = Pl_Continue;
|
||||
|
Loading…
Reference in New Issue
Block a user