mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Fix for amb421: get_user_weapons omitting a weapon in Day of Defeat.
This commit is contained in:
parent
e23f3747ba
commit
a45d98efea
@ -723,8 +723,15 @@ static cell AMX_NATIVE_CALL get_user_weapons(AMX *amx, cell *params) /* 3 param
|
||||
cell *cpNum = get_amxaddr(amx, params[3]);
|
||||
cell *cpIds = get_amxaddr(amx, params[2]);
|
||||
*cpIds = 0;
|
||||
|
||||
int weapons = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
||||
|
||||
if (g_bmod_dod)
|
||||
{
|
||||
// Don't ignore that last element for dod
|
||||
weapons = pPlayer->pEdict->v.weapons;
|
||||
}
|
||||
|
||||
for (int i = 1; i < MAX_WEAPONS; ++i)
|
||||
{
|
||||
if (weapons & (1<<i))
|
||||
|
Loading…
Reference in New Issue
Block a user