Skip to content

Commit

Permalink
fix: camera interval clear bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Jun 4, 2024
1 parent 72d1fec commit 4543f8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/client/player/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ function tick() {
}

function destroy() {
alt.clearInterval(interval);
interval = undefined;
try {
alt.clearInterval(interval);
} catch(err) {}

interval = undefined;
native.destroyAllCams(true);
native.setCamActive(camera, false);
native.renderScriptCams(false, false, 0, false, false, 0);
Expand Down

0 comments on commit 4543f8e

Please sign in to comment.