mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Added check for if the new flags are different
This commit is contained in:
parent
6edebc9584
commit
9b26923b4e
@ -2868,7 +2868,8 @@ static cell AMX_NATIVE_CALL set_user_flags(AMX *amx, cell *params) /* 4 param */
|
||||
else
|
||||
pPlayer->flags[id] |= flag;
|
||||
|
||||
executeForwards(FF_ClientFlagsUpdated, static_cast<cell>(pPlayer->index), oldflags, pPlayer->flags[id], id);
|
||||
if(oldflags != pPlayer->flags[id])
|
||||
executeForwards(FF_ClientFlagsUpdated, static_cast<cell>(pPlayer->index), oldflags, pPlayer->flags[id], id);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -2896,7 +2897,9 @@ static cell AMX_NATIVE_CALL remove_user_flags(AMX *amx, cell *params) /* 3 param
|
||||
int oldflags = pPlayer->flags[id];
|
||||
|
||||
pPlayer->flags[id] &= ~flag;
|
||||
executeForwards(FF_ClientFlagsUpdated, static_cast<cell>(pPlayer->index), oldflags, pPlayer->flags[id], id);
|
||||
|
||||
if(oldflags != pPlayer->flags[id])
|
||||
executeForwards(FF_ClientFlagsUpdated, static_cast<cell>(pPlayer->index), oldflags, pPlayer->flags[id], id);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user