Skip to content

Commit

Permalink
Fix hud text not being removed properly
Browse files Browse the repository at this point in the history
  • Loading branch information
garryspins authored Sep 17, 2022
1 parent 53fc13f commit 78bd437
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mafk.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ check_afk_player(endtime) {
// only runs if mafk_hud is 1
// draws the hud!
afk_player_hud(endtime, time) {
if (isDefined(self.mafk_hud)) {
return;
}

level endon("game_ended");
self endon("disconnect");

Expand All @@ -401,7 +405,7 @@ afk_player_hud(endtime, time) {
self.mafk_hud.hideWhenInMenu = 1;

for(;;) {
if (getTime() >= endtime) {
if ((getTime() >= endtime) || !self.afk) {
self.mafk_hud destroy();
break;
}
Expand Down

0 comments on commit 78bd437

Please sign in to comment.