diff --git a/docs/src/architecture/architectureindex.md b/docs/src/architecture/architectureindex.md index 92afab5d..dc28fc1a 100644 --- a/docs/src/architecture/architectureindex.md +++ b/docs/src/architecture/architectureindex.md @@ -9,6 +9,7 @@ - @subpage timekeeper - @subpage archimprovementtargets - @subpage savesindex +- @subpage hitboxesindex # What is this section diff --git a/docs/src/architecture/hitboxes/hitboxesindex.md b/docs/src/architecture/hitboxes/hitboxesindex.md new file mode 100644 index 00000000..b6de6a02 --- /dev/null +++ b/docs/src/architecture/hitboxes/hitboxesindex.md @@ -0,0 +1,29 @@ +@page hitboxesindex Hitboxes + + + + + + +# Architecture Highest Level +New architecture needs to be something like + +Per realm/client scene, we have a collision engine that has a whole bunch of capsules. +We update those collision engines at the top of the frame. +On collision, run collision logic + + + + + + +# Design Notes +We want to have one collision per "object" per frame. IE, lets say you have a sword with two hitboxes on it that both collide with an enemy. +This would technically generate two collision events per frame. Need to condense this to one collision "event". +Going to have one body per object, ie one body per sword, but then multiple shapes per body. +Then drop the collision engine down to 1 collision per body per frame. + + + + + diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 7e129130..c7f273fd 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -310,9 +310,15 @@ Attaching items to hands in first person Fix grass placement +(05/25/2024) + +VERY rudimentary first person documentation to give basic navigation to relevant files. + # TODO +Redo hitboxes to have capsules and also chaining between frames (but not between swinging the camera around) + Fix being able to walk off far side of the world (ie in level editor) Grass System properly LOD diff --git a/docs/src/rendering/actors/actorsindex.md b/docs/src/rendering/actors/actorsindex.md index 90ca4763..0a7d1c96 100644 --- a/docs/src/rendering/actors/actorsindex.md +++ b/docs/src/rendering/actors/actorsindex.md @@ -6,4 +6,5 @@ - @subpage staticmorph - @subpage shadermask - @subpage animationmask -- @subpage meshmask \ No newline at end of file +- @subpage meshmask +- @subpage firstpersonviewmodel \ No newline at end of file diff --git a/docs/src/rendering/actors/firstpersonviewmodel.md b/docs/src/rendering/actors/firstpersonviewmodel.md new file mode 100644 index 00000000..e7fe0b2a --- /dev/null +++ b/docs/src/rendering/actors/firstpersonviewmodel.md @@ -0,0 +1,10 @@ +@page firstpersonviewmodel First Person Viewmodel + +# The pipeline + +There is a separate render pipeline for first person elements. It is composited ontop the main render in the composite pipeline. + +# The actor + +There is a global entity, firstPersonEntity, that is rendered in the first person pipeline. This is the source of the visuals in that render. +The animations for this actor are controlled via the `FirstPersonTree`. It provides a convenient function where you give it the entity and the name of an animation and it will play it. \ No newline at end of file diff --git a/src/main/java/electrosphere/client/sim/ClientSimulation.java b/src/main/java/electrosphere/client/sim/ClientSimulation.java index 8dd586b6..4bcb3aae 100644 --- a/src/main/java/electrosphere/client/sim/ClientSimulation.java +++ b/src/main/java/electrosphere/client/sim/ClientSimulation.java @@ -8,6 +8,7 @@ import electrosphere.client.targeting.crosshair.Crosshair; import electrosphere.client.terrain.manager.ClientTerrainManager; import electrosphere.collision.PhysicsEntityUtils; import electrosphere.collision.PhysicsUtils; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.engine.Main; import electrosphere.entity.Entity; @@ -15,7 +16,6 @@ import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; import electrosphere.entity.state.collidable.ClientCollidableTree; import electrosphere.entity.types.attach.AttachUtils; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.particle.ParticleUtils; import electrosphere.renderer.actor.Actor; diff --git a/src/main/java/electrosphere/collision/CollisionEngine.java b/src/main/java/electrosphere/collision/CollisionEngine.java index 97aca413..2ca8fd31 100644 --- a/src/main/java/electrosphere/collision/CollisionEngine.java +++ b/src/main/java/electrosphere/collision/CollisionEngine.java @@ -54,8 +54,8 @@ import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityUtils; import electrosphere.entity.state.collidable.Impulse; -import electrosphere.entity.types.hitbox.HitboxData; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.logger.LoggerInterface; /** diff --git a/src/main/java/electrosphere/entity/types/hitbox/HitboxManager.java b/src/main/java/electrosphere/collision/hitbox/HitboxManager.java similarity index 50% rename from src/main/java/electrosphere/entity/types/hitbox/HitboxManager.java rename to src/main/java/electrosphere/collision/hitbox/HitboxManager.java index dfe96211..e317d54a 100644 --- a/src/main/java/electrosphere/entity/types/hitbox/HitboxManager.java +++ b/src/main/java/electrosphere/collision/hitbox/HitboxManager.java @@ -1,34 +1,53 @@ -package electrosphere.entity.types.hitbox; +package electrosphere.collision.hitbox; +import electrosphere.collision.CollisionEngine; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; -import java.util.ArrayList; -import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; /** - * - * @author amaterasu + * Manages all hitboxes on either the server or client */ public class HitboxManager { + //the list of all hitboxes CopyOnWriteArrayList hitboxes = new CopyOnWriteArrayList(); + + //the collision engine for this hitbox manager + CollisionEngine collisionEngine; + + //an id incrementer for hitboxes long idIncrementer = 0; + /** + * Constructor + */ public HitboxManager(){ - + collisionEngine = new CollisionEngine(); } + /** + * Registers a hitbox to the manager + * @param hitbox the hitbox to register + */ public void registerHitbox(Entity hitbox){ hitboxes.add(hitbox); idIncrementer++; hitbox.putData(EntityDataStrings.COLLISION_ENTITY_ID, idIncrementer); } + /** + * Gets all hitboxes in the manager + * @return all hitboxes in the manager + */ public CopyOnWriteArrayList getAllHitboxes(){ return hitboxes; } + /** + * Deregisters a hitbox from the manager + * @param hitbox the hitbox to deregister + */ public void deregisterHitbox(Entity hitbox){ hitboxes.remove(hitbox); } diff --git a/src/main/java/electrosphere/entity/types/hitbox/HitboxUtils.java b/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java similarity index 94% rename from src/main/java/electrosphere/entity/types/hitbox/HitboxUtils.java rename to src/main/java/electrosphere/collision/hitbox/HitboxUtils.java index 6814b2e7..b59318fd 100644 --- a/src/main/java/electrosphere/entity/types/hitbox/HitboxUtils.java +++ b/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java @@ -1,4 +1,4 @@ -package electrosphere.entity.types.hitbox; +package electrosphere.collision.hitbox; import electrosphere.engine.Globals; import electrosphere.entity.Entity; @@ -8,25 +8,21 @@ import electrosphere.entity.EntityUtils; import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; -import electrosphere.entity.state.attack.ShooterTree; import electrosphere.entity.state.life.LifeState; import electrosphere.entity.state.life.LifeUtils; import electrosphere.entity.state.movement.ProjectileTree; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.server.effects.ParticleEffects; import electrosphere.server.datacell.Realm; import java.util.List; -import org.joml.Matrix4f; import org.joml.Quaterniond; -import org.joml.Quaternionf; import org.joml.Vector3d; import org.joml.Vector3f; -import org.joml.Vector4f; /** - * - * @author amaterasu + * Utilities for working with hitboxes */ public class HitboxUtils { @@ -205,6 +201,10 @@ public class HitboxUtils { } } + /** + * Updates the position of a hitbox + * @param hitbox the hitbox to update + */ public static void serverUpdatePosition(Entity hitbox){ Entity parent = ((Entity)hitbox.getData(EntityDataStrings.COLLISION_ENTITY_DATA_PARENT)); HitboxData hitboxData = getHitboxData(hitbox); @@ -232,6 +232,10 @@ public class HitboxUtils { } } + /** + * Collides entities on the client + * @param generatorHitbox the hitbox generating the collision + */ public static void clientCollideEntities(Entity generatorHitbox){ // long generatorId = (Long)generatorHitbox.getData(EntityDataStrings.COLLISION_ENTITY_ID); @@ -279,6 +283,10 @@ public class HitboxUtils { } } + /** + * Handles collision between two hitboxes on the server + * @param generatorHitbox the hitbox generating the collision + */ public static void serverCollideEntities(Entity generatorHitbox){ // long generatorId = (Long)generatorHitbox.getData(EntityDataStrings.COLLISION_ENTITY_ID); @@ -332,6 +340,11 @@ public class HitboxUtils { } } + /** + * Handles a damage collision on the client + * @param hitbox the hitbox + * @param hurtbox the hurtbox + */ public static void clientDamageHitboxColision(Entity hitbox, Entity hurtbox){ Entity hitboxParent = (Entity)hitbox.getData(EntityDataStrings.COLLISION_ENTITY_DATA_PARENT); @@ -376,6 +389,11 @@ public class HitboxUtils { } } + /** + * Handles a damage hitbox collision on the server + * @param hitbox the hitbox + * @param hurtbox the hurtbox + */ public static void serverDamageHitboxColision(Entity hitbox, Entity hurtbox){ Entity hitboxParent = (Entity)hitbox.getData(EntityDataStrings.COLLISION_ENTITY_DATA_PARENT); @@ -420,15 +438,29 @@ public class HitboxUtils { } } - + /** + * Gets the data for a hitbox + * @param e the entity encapsulating the hitbox + * @return the hitbox data + */ public static HitboxData getHitboxData(Entity e){ return (HitboxData)e.getData(EntityDataStrings.HITBOX_DATA); } + /** + * Gets the hitbox associated list + * @param e The entity that has hitboxes + * @return the list of hitboxes associated with the entity + */ public static List getHitboxAssociatedList(Entity e){ return (List)e.getData(EntityDataStrings.HITBOX_ASSOCIATED_LIST); } + /** + * Gets the hurtbox associated list + * @param e the entity that has hurtboxes + * @return the list of hurtboxes associated with the entity + */ public static List getHurtboxAssociatedList(Entity e){ return (List)e.getData(EntityDataStrings.HURTBOX_ASSOCIATED_LIST); } diff --git a/src/main/java/electrosphere/controls/ControlHandler.java b/src/main/java/electrosphere/controls/ControlHandler.java index e6087bdc..1d74d694 100644 --- a/src/main/java/electrosphere/controls/ControlHandler.java +++ b/src/main/java/electrosphere/controls/ControlHandler.java @@ -222,7 +222,7 @@ public class ControlHandler { boolean shouldRecaptureScreen = false; //controls whether the camera is first or third person - boolean cameraIsThirdPerson = false; + boolean cameraIsThirdPerson = true; /* diff --git a/src/main/java/electrosphere/engine/Globals.java b/src/main/java/electrosphere/engine/Globals.java index 29a0eaec..ffb23ea1 100644 --- a/src/main/java/electrosphere/engine/Globals.java +++ b/src/main/java/electrosphere/engine/Globals.java @@ -24,6 +24,7 @@ import electrosphere.client.terrain.cells.VoxelTextureAtlas; import electrosphere.client.terrain.manager.ClientTerrainManager; import electrosphere.collision.CollisionEngine; import electrosphere.collision.CollisionWorldData; +import electrosphere.collision.hitbox.HitboxManager; import electrosphere.controls.CameraHandler; import electrosphere.controls.ControlCallback; import electrosphere.controls.ControlHandler; @@ -37,7 +38,6 @@ import electrosphere.engine.profiler.Profiler; import electrosphere.engine.time.Timekeeper; import electrosphere.entity.Entity; import electrosphere.entity.Scene; -import electrosphere.entity.types.hitbox.HitboxManager; import electrosphere.game.config.UserSettings; import electrosphere.game.data.voxel.VoxelType; import electrosphere.game.server.structure.virtual.StructureManager; diff --git a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java index 96caecf2..dbcf59ce 100644 --- a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java @@ -4,6 +4,7 @@ package electrosphere.entity.state.attack; import electrosphere.net.synchronization.BehaviorTreeIdEnums; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.engine.Main; import electrosphere.entity.Entity; @@ -19,7 +20,6 @@ import electrosphere.entity.state.rotator.RotatorTree; import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.creature.CreatureUtils; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.projectile.ProjectileUtils; import electrosphere.game.data.creature.type.attack.AttackMove; diff --git a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java index c7d5ec2b..0c21bc90 100644 --- a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java @@ -10,6 +10,7 @@ import electrosphere.net.parser.net.message.SynchronizationMessage; import electrosphere.server.datacell.utils.DataCellSearchUtils; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.engine.Main; import electrosphere.entity.Entity; @@ -28,7 +29,6 @@ import electrosphere.entity.state.rotator.ServerRotatorTree; import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.creature.CreatureUtils; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.projectile.ProjectileUtils; import electrosphere.game.data.creature.type.attack.AttackMove; diff --git a/src/main/java/electrosphere/entity/types/creature/CreatureUtils.java b/src/main/java/electrosphere/entity/types/creature/CreatureUtils.java index 4292fe6e..298d7bad 100644 --- a/src/main/java/electrosphere/entity/types/creature/CreatureUtils.java +++ b/src/main/java/electrosphere/entity/types/creature/CreatureUtils.java @@ -12,6 +12,7 @@ import electrosphere.collision.CollisionBodyCreation; import electrosphere.collision.PhysicsEntityUtils; import electrosphere.collision.PhysicsUtils; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityCreationUtils; @@ -50,9 +51,8 @@ import electrosphere.entity.state.rotator.RotatorHierarchyNode; import electrosphere.entity.state.rotator.RotatorTree; import electrosphere.entity.state.rotator.ServerRotatorTree; import electrosphere.entity.types.collision.CollisionObjUtils; -import electrosphere.entity.types.hitbox.HitboxData; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.creature.type.CreatureType; import electrosphere.game.data.creature.type.SprintSystem; import electrosphere.game.data.creature.type.attack.AttackMove; diff --git a/src/main/java/electrosphere/entity/types/item/ItemUtils.java b/src/main/java/electrosphere/entity/types/item/ItemUtils.java index 4b4ed975..e6c94769 100644 --- a/src/main/java/electrosphere/entity/types/item/ItemUtils.java +++ b/src/main/java/electrosphere/entity/types/item/ItemUtils.java @@ -14,6 +14,7 @@ import electrosphere.collision.CollisionBodyCreation; import electrosphere.collision.PhysicsEntityUtils; import electrosphere.collision.PhysicsUtils; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityCreationUtils; @@ -25,9 +26,8 @@ import electrosphere.entity.state.collidable.ClientCollidableTree; import electrosphere.entity.state.collidable.ServerCollidableTree; import electrosphere.entity.state.gravity.ClientGravityTree; import electrosphere.entity.state.gravity.ServerGravityTree; -import electrosphere.entity.types.hitbox.HitboxData; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.item.type.EquipWhitelist; import electrosphere.game.data.item.type.Item; import electrosphere.game.data.item.type.WeaponData; diff --git a/src/main/java/electrosphere/entity/types/projectile/ProjectileUtils.java b/src/main/java/electrosphere/entity/types/projectile/ProjectileUtils.java index 6b2391d0..1053601f 100644 --- a/src/main/java/electrosphere/entity/types/projectile/ProjectileUtils.java +++ b/src/main/java/electrosphere/entity/types/projectile/ProjectileUtils.java @@ -9,14 +9,14 @@ import org.joml.Quaternionfc; import org.joml.Vector3d; import org.joml.Vector3f; +import electrosphere.collision.hitbox.HitboxUtils; +import electrosphere.collision.hitbox.HitboxUtils.HitboxPositionCallback; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityCreationUtils; import electrosphere.entity.EntityUtils; import electrosphere.entity.ServerEntityUtils; import electrosphere.entity.state.movement.ProjectileTree; -import electrosphere.entity.types.hitbox.HitboxUtils; -import electrosphere.entity.types.hitbox.HitboxUtils.HitboxPositionCallback; import electrosphere.game.data.projectile.ProjectileType; import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; diff --git a/src/main/java/electrosphere/entity/types/hitbox/HitboxData.java b/src/main/java/electrosphere/game/data/collidable/HitboxData.java similarity index 65% rename from src/main/java/electrosphere/entity/types/hitbox/HitboxData.java rename to src/main/java/electrosphere/game/data/collidable/HitboxData.java index eb6e7d1f..e59fe669 100644 --- a/src/main/java/electrosphere/entity/types/hitbox/HitboxData.java +++ b/src/main/java/electrosphere/game/data/collidable/HitboxData.java @@ -1,40 +1,77 @@ -package electrosphere.entity.types.hitbox; +package electrosphere.game.data.collidable; import java.util.List; +import electrosphere.collision.hitbox.HitboxUtils.HitboxPositionCallback; import electrosphere.entity.Entity; -import electrosphere.entity.types.hitbox.HitboxUtils.HitboxPositionCallback; +/** + * Data about a hitbox + */ public class HitboxData { + + //the type of hitbox String type; + + //the bone it is attached to String bone; + + //the radius of the hitbox float radius; + + //controls whether the hitbox is active or not boolean active = false; + //used for more advanced hitbox spawning to find hitbox position on frame update HitboxPositionCallback positionCallback; + //used to filter this hitbox to hitting only certain parent entities List filter; + /** + * Gets the type of hitbox + * @return the type of hitbox + */ public String getType() { return type; } + /** + * Gets the type of bone + * @return the type of bone + */ public String getBone() { return bone; } + /** + * Gets the radius of the hitbox + * @return the radius of the hitbox + */ public float getRadius() { return radius; } + /** + * Returns whether the hitbox is active or not + * @return true if the hitbox is active, false otherwise + */ public boolean isActive() { return active; } + /** + * Toggles the active status + * @param active if true, the hitbox will be active, if false the hitbox will be inactive + */ public void setActive(boolean active) { this.active = active; } + /** + * Sets the bone this hitbox is attached to + * @param bone the bone to attach the hitbox to + */ public void setBone(String bone) { this.bone = bone; } diff --git a/src/main/java/electrosphere/game/data/creature/type/CreatureType.java b/src/main/java/electrosphere/game/data/creature/type/CreatureType.java index 06820377..9d92b50c 100644 --- a/src/main/java/electrosphere/game/data/creature/type/CreatureType.java +++ b/src/main/java/electrosphere/game/data/creature/type/CreatureType.java @@ -1,7 +1,7 @@ package electrosphere.game.data.creature.type; -import electrosphere.entity.types.hitbox.HitboxData; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.creature.type.attack.AttackMove; import electrosphere.game.data.creature.type.attack.AttackMoveResolver; import electrosphere.game.data.creature.type.equip.EquipPoint; diff --git a/src/main/java/electrosphere/game/data/item/type/WeaponData.java b/src/main/java/electrosphere/game/data/item/type/WeaponData.java index e4a11582..0ca7bd58 100644 --- a/src/main/java/electrosphere/game/data/item/type/WeaponData.java +++ b/src/main/java/electrosphere/game/data/item/type/WeaponData.java @@ -2,7 +2,7 @@ package electrosphere.game.data.item.type; import java.util.List; -import electrosphere.entity.types.hitbox.HitboxData; +import electrosphere.game.data.collidable.HitboxData; public class WeaponData { diff --git a/src/main/java/electrosphere/game/data/object/type/ObjectData.java b/src/main/java/electrosphere/game/data/object/type/ObjectData.java index 8f69a4e1..d3d49b65 100644 --- a/src/main/java/electrosphere/game/data/object/type/ObjectData.java +++ b/src/main/java/electrosphere/game/data/object/type/ObjectData.java @@ -1,7 +1,7 @@ package electrosphere.game.data.object.type; -import electrosphere.entity.types.hitbox.HitboxData; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.graphics.GraphicsTemplate; import java.util.List; diff --git a/src/main/java/electrosphere/renderer/RenderingEngine.java b/src/main/java/electrosphere/renderer/RenderingEngine.java index 5848422c..d6d6b452 100644 --- a/src/main/java/electrosphere/renderer/RenderingEngine.java +++ b/src/main/java/electrosphere/renderer/RenderingEngine.java @@ -81,15 +81,15 @@ import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.GL30; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; import electrosphere.entity.types.camera.CameraEntityUtils; -import electrosphere.entity.types.hitbox.HitboxData; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.logger.LoggerInterface; import electrosphere.renderer.RenderPipelineState.SelectedShaderEnum; import electrosphere.renderer.actor.Actor; diff --git a/src/main/java/electrosphere/renderer/pipelines/DebugContentPipeline.java b/src/main/java/electrosphere/renderer/pipelines/DebugContentPipeline.java index 0441435c..91d36ee8 100644 --- a/src/main/java/electrosphere/renderer/pipelines/DebugContentPipeline.java +++ b/src/main/java/electrosphere/renderer/pipelines/DebugContentPipeline.java @@ -8,14 +8,14 @@ import org.joml.Vector3f; import org.lwjgl.opengl.GL40; import electrosphere.collision.collidable.Collidable; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityUtils; import electrosphere.entity.types.camera.CameraEntityUtils; -import electrosphere.entity.types.hitbox.HitboxData; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.game.data.collidable.CollidableTemplate; +import electrosphere.game.data.collidable.HitboxData; import electrosphere.renderer.OpenGLState; import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.RenderingEngine; diff --git a/src/main/java/electrosphere/server/datacell/Realm.java b/src/main/java/electrosphere/server/datacell/Realm.java index e259a8bb..eac527e8 100644 --- a/src/main/java/electrosphere/server/datacell/Realm.java +++ b/src/main/java/electrosphere/server/datacell/Realm.java @@ -1,12 +1,10 @@ package electrosphere.server.datacell; import electrosphere.collision.CollisionEngine; +import electrosphere.collision.hitbox.HitboxManager; import electrosphere.engine.Globals; -import electrosphere.engine.Main; import electrosphere.entity.Entity; import electrosphere.entity.Scene; -import electrosphere.entity.types.hitbox.HitboxManager; -import electrosphere.menu.debug.ImGuiWindowMacros; import electrosphere.net.parser.net.message.NetworkMessage; import electrosphere.server.datacell.interfaces.DataCellManager; diff --git a/src/main/java/electrosphere/server/datacell/RealmManager.java b/src/main/java/electrosphere/server/datacell/RealmManager.java index b571255e..815e8d58 100644 --- a/src/main/java/electrosphere/server/datacell/RealmManager.java +++ b/src/main/java/electrosphere/server/datacell/RealmManager.java @@ -7,9 +7,9 @@ import java.util.concurrent.CopyOnWriteArraySet; import electrosphere.collision.CollisionEngine; import electrosphere.collision.CollisionWorldData; +import electrosphere.collision.hitbox.HitboxManager; import electrosphere.engine.Globals; import electrosphere.entity.Entity; -import electrosphere.entity.types.hitbox.HitboxManager; import electrosphere.game.server.world.ServerWorldData; import electrosphere.net.server.player.Player; diff --git a/src/main/java/electrosphere/server/simulation/MicroSimulation.java b/src/main/java/electrosphere/server/simulation/MicroSimulation.java index 2157b1e8..231e78ea 100644 --- a/src/main/java/electrosphere/server/simulation/MicroSimulation.java +++ b/src/main/java/electrosphere/server/simulation/MicroSimulation.java @@ -2,6 +2,8 @@ package electrosphere.server.simulation; import electrosphere.entity.types.attach.AttachUtils; import electrosphere.client.targeting.crosshair.Crosshair; +import electrosphere.collision.hitbox.HitboxManager; +import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.engine.Main; import electrosphere.entity.Entity; @@ -16,8 +18,6 @@ import electrosphere.entity.state.collidable.ClientCollidableTree; import electrosphere.entity.state.collidable.ServerCollidableTree; import electrosphere.entity.state.idle.IdleTree; import electrosphere.entity.types.creature.CreatureUtils; -import electrosphere.entity.types.hitbox.HitboxManager; -import electrosphere.entity.types.hitbox.HitboxUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.state.life.LifeState; import electrosphere.entity.state.life.LifeUtils;