tracker can't use bonus

This commit is contained in:
catvayor 2024-09-10 15:11:55 +02:00
parent d93795e03a
commit ebc217ce2a
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -129,10 +129,11 @@ pub async fn activate_invisibility(
if let Conscrit {
ref mut invisible,
ref mut invisibility_codes,
captured,
..
} = tracked.state
{
if *invisibility_codes > 0 {
if *invisibility_codes > 0 && !captured {
*invisibility_codes -= 1;
*invisible = true;
state_update(&tracked, &evt_queues, &admin_queue);
@ -180,10 +181,11 @@ pub async fn activate_blur(
if let Conscrit {
ref mut blurred,
ref mut blur_codes,
captured,
..
} = tracked.state
{
if *blur_codes > 0 {
if *blur_codes > 0 && !captured {
*blur_codes -= 1;
*blurred = true;
state_update(&tracked, &evt_queues, &admin_queue);