From b4b09a0d16c3d5fdee28b5f42429ece034426142 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 11 Aug 2021 09:36:46 -0500 Subject: [PATCH] Use natives for initial game setup --- scripts/client/event.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/scripts/client/event.js b/scripts/client/event.js index bc5bc75e..eb180e06 100644 --- a/scripts/client/event.js +++ b/scripts/client/event.js @@ -57,13 +57,7 @@ function addAllEventHandlers() { function onResourceStart(event, resource) { sendResourceStartedSignalToServer(); - //closeAllGarages(); - - if(getGame() == GAME_GTA_SA) { - gta.setDefaultInteriors(false); - } - - gta.onMission = true; + setUpInitialGame(); garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60); } @@ -78,16 +72,11 @@ function onResourceStop(event, resource) { function onResourceReady(event, resource) { sendResourceReadySignalToServer(); - //closeAllGarages(); } // =========================================================================== function onProcess(event, deltaTime) { - if(gta.game != GAME_GTA_IV) { - gta.clearMessages(); - } - if(localPlayer == null) { return false; } @@ -97,15 +86,15 @@ function onProcess(event, deltaTime) { } processSync(); - destroyAutoCreatedPickups(); processLocalPlayerControlState(); - clearLocalPlayerWantedLevel(); processLocalPlayerVehicleControlState(); processLocalPlayerSphereEntryExitHandling(); processLocalPlayerVehicleEntryExitHandling(); processJobRouteSphere(); forceLocalPlayerEquippedWeaponItem(); processWantedLevelReset(); + + processGameSpecifics(); } // ===========================================================================