Skip to content

Commit

Permalink
perf: remove player unparsed dialog queue
Browse files Browse the repository at this point in the history
  • Loading branch information
dockfries committed Sep 15, 2022
1 parent 92e2deb commit d5290a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controllers/player/playerEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
// WeaponEnum,
} from "@/enums";
import { throttle } from "lodash";
import { BaseDialog } from "../dialog";

// Each instance can be called to callbacks, so you can split the logic.

Expand Down Expand Up @@ -137,6 +138,7 @@ export abstract class BasePlayerEvent<
OnPlayerDisconnect((playerid: number, reason: number): number => {
const p = this.findPlayerById(playerid);
if (!p) return 0;
BaseDialog.close(p);
const result = this.onDisconnect(p, reason);
this.players.delete(playerid);
return result;
Expand Down

0 comments on commit d5290a6

Please sign in to comment.