Hopefully fix witch crash

This commit is contained in:
Jackz 2022-08-16 20:21:16 -05:00
parent 8338263ccb
commit ac1897d5fa
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
4 changed files with 3 additions and 4 deletions

View file

@ -352,11 +352,11 @@ void ApplyTroll(int victim, const char[] name, int activator, trollModifier modi
}
}
bool isActive = IsTrollActive(victim, troll.name);
bool isActive = Trolls[trollIndex].activeFlagClients[victim] > -1;
// Toggle on flags for client, if it's not a single run.
if(modifier & TrollMod_Constant) {
Trolls[troll.id].activeFlagClients[victim] = isActive ? -1 : flags;
Trolls[trollIndex].activeFlagClients[victim] = isActive ? -1 : flags;
}
// Applies any custom logic needed for a troll, mostly only used for TrollMod_Instant