Don't delay resource start/ready signals
This commit is contained in:
@@ -63,13 +63,10 @@ function onResourceStart(event, resource) {
|
|||||||
addEventHandler("OnPedExitedSphereEx", onPedExitedSphere);
|
addEventHandler("OnPedExitedSphereEx", onPedExitedSphere);
|
||||||
}
|
}
|
||||||
|
|
||||||
garbageCollectorInterval = setInterval(collectAllGarbage, 1000 * 60);
|
|
||||||
localPlayerMoneyInterval = setInterval(updateLocalPlayerMoney, 1000 * 5);
|
|
||||||
|
|
||||||
if (resource == thisResource) {
|
if (resource == thisResource) {
|
||||||
setTimeout(function () {
|
garbageCollectorInterval = setInterval(collectAllGarbage, 1000 * 60);
|
||||||
sendResourceStartedSignalToServer();
|
localPlayerMoneyInterval = setInterval(updateLocalPlayerMoney, 1000 * 5);
|
||||||
}, 500);
|
sendResourceStartedSignalToServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,11 +81,10 @@ function onResourceStop(event, resource) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function onResourceReady(event, resource) {
|
function onResourceReady(event, resource) {
|
||||||
loadLocaleConfig();
|
if (resource == thisResource) {
|
||||||
|
loadLocaleConfig();
|
||||||
setTimeout(function () {
|
|
||||||
sendResourceReadySignalToServer();
|
sendResourceReadySignalToServer();
|
||||||
}, 500);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user