proper variation on the datablock file list erasure

clear is a nonfuncitonal command for arrayobjects, so a) needed to use erase, and b) needed to fill in a couple more spots
This commit is contained in:
AzaezelX 2020-07-29 15:27:34 -05:00
parent 45f45ca974
commit 69f154e0b9
2 changed files with 9 additions and 1 deletions

View file

@ -163,6 +163,10 @@ function endMission()
getScene(0).delete(); getScene(0).delete();
MissionCleanup.delete(); MissionCleanup.delete();
if ($Pref::Server::EnableDatablockCache)
resetDatablockCache();
DatablockFilesList.empty();
clearServerPaths(); clearServerPaths();
} }
@ -176,6 +180,10 @@ function resetMission()
new SimGroup( MissionCleanup ); new SimGroup( MissionCleanup );
$instantGroup = MissionCleanup; $instantGroup = MissionCleanup;
if ($Pref::Server::EnableDatablockCache)
resetDatablockCache();
DatablockFilesList.empty();
clearServerPaths(); clearServerPaths();
// Inform the game code we're resetting. // Inform the game code we're resetting.

View file

@ -201,7 +201,6 @@ function onServerCreated()
physicsInitWorld( "server" ); physicsInitWorld( "server" );
physicsStartSimulation("server"); physicsStartSimulation("server");
DatablockFilesList.clear();
loadDatablockFiles( DatablockFilesList, true ); loadDatablockFiles( DatablockFilesList, true );
callOnModules("onServerScriptExec", "Core"); callOnModules("onServerScriptExec", "Core");
@ -287,6 +286,7 @@ function onServerDestroyed()
if ($Pref::Server::EnableDatablockCache) if ($Pref::Server::EnableDatablockCache)
resetDatablockCache(); resetDatablockCache();
DatablockFilesList.empty();
} }
/// Guid list maintenance functions /// Guid list maintenance functions