fixed bug at20181 ( why was an #if 0 in the function :o )
This commit is contained in:
parent
2931247559
commit
be1475b732
@ -353,7 +353,7 @@ static cell AMX_NATIVE_CALL cs_set_weapon_burstmode(AMX *amx, cell *params) // c
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_get_user_armor(AMX *amx, cell *params) // cs_get_user_armor(index, CsArmorType:&armortype); = 2 params
|
static cell AMX_NATIVE_CALL cs_get_user_armor(AMX *amx, cell *params) // cs_get_user_armor(index, &CsArmorType:armortype); = 2 params
|
||||||
{
|
{
|
||||||
// Return how much armor and set reference of what type...
|
// Return how much armor and set reference of what type...
|
||||||
// params[1] = user index
|
// params[1] = user index
|
||||||
@ -364,10 +364,10 @@ static cell AMX_NATIVE_CALL cs_get_user_armor(AMX *amx, cell *params) // cs_get_
|
|||||||
// Make into edict pointer
|
// Make into edict pointer
|
||||||
edict_t *pPlayer = MF_GetPlayerEdict(params[1]);
|
edict_t *pPlayer = MF_GetPlayerEdict(params[1]);
|
||||||
|
|
||||||
#if 0
|
// #if 0 (Removed this to make the function work)
|
||||||
cell *armorTypeByRef = MF_GetAmxAddr(amx, params[2]);
|
cell *armorTypeByRef = MF_GetAmxAddr(amx, params[2]);
|
||||||
*armorTypeByRef = *((int *)pPlayer->pvPrivateData + OFFSET_ARMORTYPE);
|
*armorTypeByRef = *((int *)pPlayer->pvPrivateData + OFFSET_ARMORTYPE);
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
return (cell)pPlayer->v.armorvalue;
|
return (cell)pPlayer->v.armorvalue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user