This commit is contained in:
Jackz 2023-08-15 18:52:38 -05:00
parent 46444c8693
commit c14b20b07a
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
4 changed files with 26 additions and 12 deletions

View file

@ -357,8 +357,13 @@ void ApplyTroll(int victim, const char[] name, int activator, trollModifier modi
return;
}
if(flags > -1 && Trolls[trollIndex].timerInterval > 0.0) {
CreateTimer(Trolls[trollIndex].timerInterval, Trolls[trollIndex].timerFunction, victim, TIMER_REPEAT);
// Clear troll specific timer:
if(Trolls[trollIndex].timerInterval > 0.0) {
if(flags > -1)
Trolls[trollIndex].timerHandles[victim] = CreateTimer(Trolls[trollIndex].timerInterval, Trolls[trollIndex].timerFunction, victim, TIMER_REPEAT);
else if(Trolls[trollIndex].timerHandles[victim] != null) {
delete Trolls[trollIndex].timerHandles[victim];
}
}
if(!silent && SilentMenuSelected[activator]) silent = true;