Use natives for initial game setup
This commit is contained in:
@@ -57,13 +57,7 @@ function addAllEventHandlers() {
|
|||||||
|
|
||||||
function onResourceStart(event, resource) {
|
function onResourceStart(event, resource) {
|
||||||
sendResourceStartedSignalToServer();
|
sendResourceStartedSignalToServer();
|
||||||
//closeAllGarages();
|
setUpInitialGame();
|
||||||
|
|
||||||
if(getGame() == GAME_GTA_SA) {
|
|
||||||
gta.setDefaultInteriors(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
gta.onMission = true;
|
|
||||||
|
|
||||||
garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60);
|
garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60);
|
||||||
}
|
}
|
||||||
@@ -78,16 +72,11 @@ function onResourceStop(event, resource) {
|
|||||||
|
|
||||||
function onResourceReady(event, resource) {
|
function onResourceReady(event, resource) {
|
||||||
sendResourceReadySignalToServer();
|
sendResourceReadySignalToServer();
|
||||||
//closeAllGarages();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function onProcess(event, deltaTime) {
|
function onProcess(event, deltaTime) {
|
||||||
if(gta.game != GAME_GTA_IV) {
|
|
||||||
gta.clearMessages();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(localPlayer == null) {
|
if(localPlayer == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -97,15 +86,15 @@ function onProcess(event, deltaTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processSync();
|
processSync();
|
||||||
destroyAutoCreatedPickups();
|
|
||||||
processLocalPlayerControlState();
|
processLocalPlayerControlState();
|
||||||
clearLocalPlayerWantedLevel();
|
|
||||||
processLocalPlayerVehicleControlState();
|
processLocalPlayerVehicleControlState();
|
||||||
processLocalPlayerSphereEntryExitHandling();
|
processLocalPlayerSphereEntryExitHandling();
|
||||||
processLocalPlayerVehicleEntryExitHandling();
|
processLocalPlayerVehicleEntryExitHandling();
|
||||||
processJobRouteSphere();
|
processJobRouteSphere();
|
||||||
forceLocalPlayerEquippedWeaponItem();
|
forceLocalPlayerEquippedWeaponItem();
|
||||||
processWantedLevelReset();
|
processWantedLevelReset();
|
||||||
|
|
||||||
|
processGameSpecifics();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user