character loading on save init
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
64b10e5837
commit
1412b2ed07
@ -1,3 +1,3 @@
|
||||
#maven.buildNumber.plugin properties file
|
||||
#Sun May 25 10:30:51 EDT 2025
|
||||
buildNumber=635
|
||||
#Tue May 27 21:03:34 EDT 2025
|
||||
buildNumber=638
|
||||
|
||||
@ -2010,6 +2010,7 @@ More profiling
|
||||
|
||||
(05/27/2025)
|
||||
QuadMesh memory pooling
|
||||
Load characters from save db when re-loading valid save
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
package electrosphere.net.parser.net.raw;
|
||||
|
||||
import electrosphere.net.parser.net.message.MessagePool;
|
||||
import electrosphere.net.parser.net.message.NetworkMessage;
|
||||
|
||||
package electrosphere.net.parser.net.raw;
|
||||
|
||||
import electrosphere.net.parser.net.message.MessagePool;
|
||||
import electrosphere.net.parser.net.message.NetworkMessage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@ -3,6 +3,7 @@ package electrosphere.server.macro;
|
||||
import java.io.File;
|
||||
|
||||
import electrosphere.data.block.fab.BlockFab;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.server.macro.structure.VirtualStructure;
|
||||
import electrosphere.util.FileUtils;
|
||||
|
||||
@ -39,4 +40,13 @@ public class MacroDataLoader {
|
||||
return rVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all alive characters
|
||||
*/
|
||||
public static void loadAllAliveCharacters(){
|
||||
Globals.profiler.beginCpuSample("MacroDataLoader.loadAllAliveCharacters");
|
||||
Globals.serverState.characterService.getAllCharacters();
|
||||
Globals.profiler.endCpuSample();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import electrosphere.server.datacell.ServerWorldData;
|
||||
import electrosphere.server.db.DatabaseController;
|
||||
import electrosphere.server.db.DatabaseUtils;
|
||||
import electrosphere.server.macro.MacroData;
|
||||
import electrosphere.server.macro.MacroDataLoader;
|
||||
import electrosphere.server.physics.fluid.generation.DefaultFluidGenerator;
|
||||
import electrosphere.server.physics.fluid.manager.ServerFluidManager;
|
||||
import electrosphere.server.physics.terrain.generation.DefaultChunkGenerator;
|
||||
@ -228,6 +229,9 @@ public class SaveUtils {
|
||||
String dbFilePath = FileUtils.sanitizeFilePath(dirPath) + "/central" + DatabaseController.FILE_EXT;
|
||||
Globals.serverState.dbController.connect(dbFilePath);
|
||||
|
||||
//Load data stored in db
|
||||
MacroDataLoader.loadAllAliveCharacters();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user