mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 06:48:04 +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
|
else
|
||||||
pPlayer->flags[id] |= flag;
|
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;
|
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];
|
int oldflags = pPlayer->flags[id];
|
||||||
|
|
||||||
pPlayer->flags[id] &= ~flag;
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user