Use util to properly clear arrays
This commit is contained in:
@@ -1450,7 +1450,7 @@ function reloadAllBusinessesCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//forceAllPlayersToStopWorking();
|
//forceAllPlayersToStopWorking();
|
||||||
getServerData().businesses = null;
|
clearArray(getServerData().businesses);
|
||||||
getServerData().businesses = loadBusinessesFromDatabase();
|
getServerData().businesses = loadBusinessesFromDatabase();
|
||||||
createAllBusinessPickups();
|
createAllBusinessPickups();
|
||||||
createAllBusinessBlips();
|
createAllBusinessBlips();
|
||||||
|
|||||||
@@ -1184,7 +1184,7 @@ function reloadAllHousesCommand(command, params, client) {
|
|||||||
deleteHouseEntrancePickup(i);
|
deleteHouseEntrancePickup(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
getServerData().houses = null;
|
clearArray(getServerData().houses);
|
||||||
getServerData().houses = loadHousesFromDatabase();
|
getServerData().houses = loadHousesFromDatabase();
|
||||||
createAllHousePickups();
|
createAllHousePickups();
|
||||||
createAllHouseBlips();
|
createAllHouseBlips();
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ function getRadioStationData(radioStationId) {
|
|||||||
|
|
||||||
function reloadAllRadioStationsCommand(command, params, client) {
|
function reloadAllRadioStationsCommand(command, params, client) {
|
||||||
stopRadioStreamForPlayer(null);
|
stopRadioStreamForPlayer(null);
|
||||||
getServerData().radioStations.splice(0, getServerData().radioStations.length-1);
|
clearArray(getServerData().radioStations);
|
||||||
getServerData().radioStations = loadRadioStationsFromDatabase();
|
getServerData().radioStations = loadRadioStationsFromDatabase();
|
||||||
setRadioStationIndexes();
|
setRadioStationIndexes();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user