ground move refactor
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
742231a5de
commit
ba5537bcf7
@ -39,6 +39,8 @@
|
||||
- Overgrown Mountain
|
||||
- Magnetic Mountain
|
||||
|
||||
## Hot Springs
|
||||
|
||||
## Ruins
|
||||
|
||||
## Light Valley
|
||||
@ -306,3 +308,9 @@ Full of kelp dangling from island, lots of sea-themed flying creatures
|
||||
## Ghost Water in the Sky
|
||||
Idk what this means but I just came up with it and it sounds cool
|
||||
|
||||
## Resort Island
|
||||
Extremely pretty and serene nature island perfect for building a resort
|
||||
|
||||
## Fleshy Horror Island
|
||||
A living sky island full of demons
|
||||
|
||||
|
||||
@ -88,11 +88,11 @@ import electrosphere.entity.state.equip.EquipState;
|
||||
import electrosphere.entity.state.inventory.InventoryUtils;
|
||||
import electrosphere.entity.state.inventory.UnrelationalInventoryState;
|
||||
import electrosphere.entity.state.ironsight.IronSightTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.JumpTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.state.movement.SprintTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.types.camera.CameraEntityUtils;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
package electrosphere.entity;
|
||||
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.types.collision.CollisionObjUtils;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.entity.types.item.ItemUtils;
|
||||
|
||||
@ -10,7 +10,7 @@ import electrosphere.entity.ServerEntityUtils;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.collidable.Impulse;
|
||||
import electrosphere.entity.state.equip.EquipState;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.rotator.RotatorTree;
|
||||
import electrosphere.entity.types.attach.AttachUtils;
|
||||
import electrosphere.entity.types.collision.CollisionObjUtils;
|
||||
|
||||
@ -10,8 +10,8 @@ import electrosphere.entity.ServerEntityUtils;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.collidable.Impulse;
|
||||
import electrosphere.entity.state.equip.EquipState;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.rotator.RotatorTree;
|
||||
import electrosphere.entity.state.rotator.ServerRotatorTree;
|
||||
import electrosphere.entity.types.attach.AttachUtils;
|
||||
|
||||
@ -6,12 +6,12 @@ import electrosphere.net.synchronization.BehaviorTreeIdEnums;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.attack.AttackTree;
|
||||
import electrosphere.entity.state.movement.AirplaneMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementTreeState;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityDataStrings;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.net.synchronization.annotation.SyncedField;
|
||||
import electrosphere.net.synchronization.annotation.SynchronizableEnum;
|
||||
|
||||
@ -5,12 +5,12 @@ import electrosphere.entity.state.attack.ServerAttackTree;
|
||||
import electrosphere.entity.state.attack.ServerAttackTree.AttackTreeState;
|
||||
import electrosphere.entity.state.idle.IdleTree.IdleTreeState;
|
||||
import electrosphere.entity.state.movement.AirplaneMovementTree;
|
||||
import electrosphere.entity.state.movement.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree.MovementTreeState;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityDataStrings;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.movement.ServerGroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.net.parser.net.message.EntityMessage;
|
||||
import electrosphere.net.parser.net.message.SynchronizationMessage;
|
||||
|
||||
@ -3,7 +3,8 @@ package electrosphere.entity.state.movement;
|
||||
import electrosphere.engine.Main;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.movement.ServerGroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree.MovementTreeState;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -72,5 +73,12 @@ public class ServerSprintTree implements BehaviorTree {
|
||||
public void setServerGroundMovementTree(ServerGroundMovementTree groundMovementTree){
|
||||
this.groundMovementTree = groundMovementTree;
|
||||
}
|
||||
|
||||
//get max velocity
|
||||
public float getMaxVelocity() {
|
||||
return maxVelocity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,8 @@ package electrosphere.entity.state.movement;
|
||||
import electrosphere.engine.Main;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementTreeState;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementTreeState;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -72,5 +73,12 @@ public class SprintTree implements BehaviorTree {
|
||||
public void setGroundMovementTree(GroundMovementTree groundMovementTree){
|
||||
this.groundMovementTree = groundMovementTree;
|
||||
}
|
||||
|
||||
//get max velocity
|
||||
public float getMaxVelocity() {
|
||||
return maxVelocity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package electrosphere.entity.state.movement;
|
||||
package electrosphere.entity.state.movement.groundmove;
|
||||
|
||||
import electrosphere.entity.state.collidable.Impulse;
|
||||
import electrosphere.entity.state.gravity.ClientGravityTree;
|
||||
@ -16,6 +16,9 @@ import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.attack.AttackTree;
|
||||
import electrosphere.entity.state.attack.AttackTree.AttackTreeState;
|
||||
import electrosphere.entity.state.movement.FallTree;
|
||||
import electrosphere.entity.state.movement.JumpTree;
|
||||
import electrosphere.entity.state.movement.SprintTree;
|
||||
import electrosphere.entity.state.movement.SprintTree.SprintTreeState;
|
||||
import electrosphere.net.NetUtils;
|
||||
import electrosphere.net.parser.net.message.EntityMessage;
|
||||
@ -153,7 +156,7 @@ public class GroundMovementTree implements BehaviorTree {
|
||||
public void simulate(float deltaTime){
|
||||
float velocity = CreatureUtils.getVelocity(parent);
|
||||
float acceleration = CreatureUtils.getAcceleration(parent);
|
||||
float maxNaturalVelocity = sprintTree != null && sprintTree.state == SprintTreeState.SPRINTING ? sprintTree.maxVelocity : CreatureUtils.getMaxNaturalVelocity(parent);
|
||||
float maxNaturalVelocity = sprintTree != null && sprintTree.getState() == SprintTreeState.SPRINTING ? sprintTree.getMaxVelocity() : CreatureUtils.getMaxNaturalVelocity(parent);
|
||||
Actor entityActor = EntityUtils.getActor(parent);
|
||||
// Model entityModel = Globals.assetManager.fetchModel(EntityUtils.getEntityModelPath(parent));
|
||||
Vector3d position = EntityUtils.getPosition(parent);
|
||||
@ -396,7 +399,7 @@ public class GroundMovementTree implements BehaviorTree {
|
||||
public String determineCorrectAnimation(){
|
||||
String rVal = "";
|
||||
if(sprintTree != null){
|
||||
switch(sprintTree.state){
|
||||
switch(sprintTree.getState()){
|
||||
case SPRINTING:
|
||||
switch(state){
|
||||
case IDLE:
|
||||
@ -1,4 +1,4 @@
|
||||
package electrosphere.entity.state.movement;
|
||||
package electrosphere.entity.state.movement.groundmove;
|
||||
|
||||
import electrosphere.entity.state.collidable.Impulse;
|
||||
import electrosphere.entity.state.gravity.GravityUtils;
|
||||
@ -15,6 +15,9 @@ import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.attack.ServerAttackTree;
|
||||
import electrosphere.entity.state.attack.ServerAttackTree.AttackTreeState;
|
||||
import electrosphere.entity.state.movement.ServerFallTree;
|
||||
import electrosphere.entity.state.movement.ServerJumpTree;
|
||||
import electrosphere.entity.state.movement.ServerSprintTree;
|
||||
import electrosphere.entity.state.movement.ServerSprintTree.SprintTreeState;
|
||||
import electrosphere.net.NetUtils;
|
||||
import electrosphere.net.parser.net.message.EntityMessage;
|
||||
@ -153,7 +156,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
||||
public void simulate(float deltaTime){
|
||||
float velocity = CreatureUtils.getVelocity(parent);
|
||||
float acceleration = CreatureUtils.getAcceleration(parent);
|
||||
float maxNaturalVelocity = sprintTree != null && sprintTree.state == SprintTreeState.SPRINTING ? sprintTree.maxVelocity : CreatureUtils.getMaxNaturalVelocity(parent);
|
||||
float maxNaturalVelocity = sprintTree != null && sprintTree.getState() == SprintTreeState.SPRINTING ? sprintTree.getMaxVelocity() : CreatureUtils.getMaxNaturalVelocity(parent);
|
||||
PoseActor entityPoseActor = EntityUtils.getPoseActor(parent);
|
||||
// Model entityModel = Globals.assetManager.fetchModel(EntityUtils.getEntityModelPath(parent));
|
||||
Vector3d position = EntityUtils.getPosition(parent);
|
||||
@ -432,7 +435,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
||||
public String determineCorrectAnimation(){
|
||||
String rVal = "";
|
||||
if(sprintTree != null){
|
||||
switch(sprintTree.state){
|
||||
switch(sprintTree.getState()){
|
||||
case SPRINTING:
|
||||
switch(state){
|
||||
case IDLE:
|
||||
@ -37,13 +37,13 @@ import electrosphere.entity.state.inventory.UnrelationalInventoryState;
|
||||
import electrosphere.entity.state.life.LifeState;
|
||||
import electrosphere.entity.state.movement.AirplaneMovementTree;
|
||||
import electrosphere.entity.state.movement.FallTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.JumpTree;
|
||||
import electrosphere.entity.state.movement.ServerFallTree;
|
||||
import electrosphere.entity.state.movement.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.movement.ServerJumpTree;
|
||||
import electrosphere.entity.state.movement.ServerSprintTree;
|
||||
import electrosphere.entity.state.movement.SprintTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
|
||||
import electrosphere.entity.state.rotator.RotatorHierarchyNode;
|
||||
import electrosphere.entity.state.rotator.RotatorTree;
|
||||
import electrosphere.entity.state.rotator.ServerRotatorTree;
|
||||
|
||||
@ -3,8 +3,8 @@ package electrosphere.server.ai.creature;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.server.ai.AI;
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@ import electrosphere.entity.EntityTags;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.attack.AttackTree;
|
||||
import electrosphere.entity.state.attack.ServerAttackTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.server.ai.AI;
|
||||
import electrosphere.server.datacell.Realm;
|
||||
|
||||
@ -8,8 +8,8 @@ import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.attack.AttackTree;
|
||||
import electrosphere.entity.state.attack.ServerAttackTree;
|
||||
import electrosphere.entity.state.equip.EquipState;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.entity.types.item.ItemUtils;
|
||||
import electrosphere.server.ai.AI;
|
||||
|
||||
@ -5,8 +5,8 @@ import org.joml.Vector3d;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.game.server.town.Town;
|
||||
import electrosphere.server.ai.AI;
|
||||
|
||||
@ -5,8 +5,8 @@ import org.joml.Vector3d;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree.MovementRelativeFacing;
|
||||
import electrosphere.entity.types.creature.CreatureUtils;
|
||||
import electrosphere.server.ai.AI;
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import electrosphere.entity.EntityTags;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.scene.EntityDescriptor;
|
||||
import electrosphere.entity.state.BehaviorTree;
|
||||
import electrosphere.entity.state.movement.GroundMovementTree;
|
||||
import electrosphere.entity.state.ParticleTree;
|
||||
import electrosphere.entity.state.attack.AttackTree;
|
||||
import electrosphere.entity.state.collidable.ClientCollidableTree;
|
||||
@ -23,6 +22,7 @@ import electrosphere.entity.types.item.ItemUtils;
|
||||
import electrosphere.entity.state.life.LifeState;
|
||||
import electrosphere.entity.state.life.LifeUtils;
|
||||
import electrosphere.entity.state.movement.SprintTree;
|
||||
import electrosphere.entity.state.movement.groundmove.GroundMovementTree;
|
||||
import electrosphere.entity.types.particle.ParticleUtils;
|
||||
import electrosphere.net.parser.net.message.EntityMessage;
|
||||
import electrosphere.renderer.actor.Actor;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user