Refactor life stuff
This commit is contained in:
parent
419436f968
commit
39ba611af4
@ -385,6 +385,13 @@ public class LoadingThread extends Thread {
|
||||
static void initCommonWorldData(boolean FLAG_INIT_SERVER){
|
||||
if(FLAG_INIT_SERVER){
|
||||
Globals.commonWorldData = new CommonWorldData(Globals.serverWorldData, Globals.serverTerrainManager);
|
||||
if(Globals.macroSimulation != null){
|
||||
Town startTown = Globals.macroData.getTowns().get(0);
|
||||
Vector2i firstPos = startTown.getPositions().get(0);
|
||||
double startX = firstPos.x * Globals.serverTerrainManager.getChunkWidth();
|
||||
double startZ = firstPos.y * Globals.serverTerrainManager.getChunkWidth();
|
||||
Globals.spawnPoint.set((float)startX,(float)Globals.commonWorldData.getElevationAtPoint(new Vector3d(startX,0,startZ)),(float)startZ);
|
||||
}
|
||||
} else {
|
||||
Globals.commonWorldData = new CommonWorldData(Globals.clientWorldData, Globals.clientTerrainManager);
|
||||
}
|
||||
@ -508,12 +515,12 @@ public class LoadingThread extends Thread {
|
||||
// Globals.macroData.describeWorld();
|
||||
Globals.macroSimulation = new MacroSimulation();
|
||||
Globals.macroSimulation.simulate();
|
||||
Town startTown = Globals.macroData.getTowns().get(0);
|
||||
Vector2i firstPos = startTown.getPositions().get(0);
|
||||
double startX = firstPos.x * Globals.serverTerrainManager.getChunkWidth();
|
||||
double startZ = firstPos.y * Globals.serverTerrainManager.getChunkWidth();
|
||||
Globals.spawnPoint.set((float)startX,(float)Globals.commonWorldData.getElevationAtPoint(new Vector3d(startX,0,startZ)),(float)startZ);
|
||||
Globals.macroSimulation.setReady(true);
|
||||
// Town startTown = Globals.macroData.getTowns().get(0);
|
||||
// Vector2i firstPos = startTown.getPositions().get(0);
|
||||
// double startX = firstPos.x * Globals.serverTerrainManager.getChunkWidth();
|
||||
// double startZ = firstPos.y * Globals.serverTerrainManager.getChunkWidth();
|
||||
// Globals.spawnPoint.set((float)startX,(float)Globals.commonWorldData.getElevationAtPoint(new Vector3d(startX,0,startZ)),(float)startZ);
|
||||
// Globals.macroSimulation.setReady(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package electrosphere.entity.types.life;
|
||||
package electrosphere.entity.state.life;
|
||||
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.game.data.creature.type.HealthSystem;
|
||||
@ -1,4 +1,4 @@
|
||||
package electrosphere.entity.types.life;
|
||||
package electrosphere.entity.state.life;
|
||||
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityDataStrings;
|
||||
@ -15,7 +15,7 @@ import electrosphere.entity.state.GravityTree;
|
||||
import electrosphere.entity.state.IdleTree;
|
||||
import electrosphere.entity.state.collidable.CollidableTree;
|
||||
import electrosphere.entity.types.collision.CollisionObjUtils;
|
||||
import electrosphere.entity.types.life.LifeState;
|
||||
import electrosphere.entity.state.life.LifeState;
|
||||
import electrosphere.game.collision.PhysicsUtils;
|
||||
import electrosphere.game.collision.collidable.Collidable;
|
||||
import electrosphere.game.data.creature.type.AttackMove;
|
||||
|
||||
@ -5,8 +5,8 @@ import electrosphere.entity.EntityDataStrings;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.types.attach.AttachUtils;
|
||||
import electrosphere.entity.types.item.ItemUtils;
|
||||
import electrosphere.entity.types.life.LifeState;
|
||||
import electrosphere.entity.types.life.LifeUtils;
|
||||
import electrosphere.entity.state.life.LifeState;
|
||||
import electrosphere.entity.state.life.LifeUtils;
|
||||
import electrosphere.game.server.effects.ParticleEffects;
|
||||
import electrosphere.main.Globals;
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
@ -13,8 +13,8 @@ import electrosphere.entity.state.collidable.CollidableTree;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.entity.types.hitbox.HitboxUtils;
|
||||
import electrosphere.entity.types.item.ItemUtils;
|
||||
import electrosphere.entity.types.life.LifeState;
|
||||
import electrosphere.entity.types.life.LifeUtils;
|
||||
import electrosphere.entity.state.life.LifeState;
|
||||
import electrosphere.entity.state.life.LifeUtils;
|
||||
import electrosphere.entity.types.particle.ParticleUtils;
|
||||
import electrosphere.game.client.targeting.crosshair.Crosshair;
|
||||
import electrosphere.main.Globals;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user