bugfixes
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
efd2ff1bb7
commit
79e2fdf512
@ -110,15 +110,15 @@
|
|||||||
"idleAnim" : "Idle",
|
"idleAnim" : "Idle",
|
||||||
"collidable": {
|
"collidable": {
|
||||||
"type" : "CUBE",
|
"type" : "CUBE",
|
||||||
"dimension1" : 0.03,
|
"dimension1" : 0.04,
|
||||||
"dimension2" : 0.03,
|
"dimension2" : 0.04,
|
||||||
"dimension3" : 0.2,
|
"dimension3" : 0.8,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 0,
|
"rotY": 0,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
"rotW": 1,
|
"rotW": 1,
|
||||||
"offsetX" : 0.0,
|
"offsetX" : 0.0,
|
||||||
"offsetY" : 0.05,
|
"offsetY" : 0.0,
|
||||||
"offsetZ" : 0.0
|
"offsetZ" : 0.0
|
||||||
},
|
},
|
||||||
"iconPath" : "Textures/icons/itemIconWeapon.png"
|
"iconPath" : "Textures/icons/itemIconWeapon.png"
|
||||||
|
|||||||
Binary file not shown.
@ -25,25 +25,21 @@ A list of all creatures that are targets for the game, and what their status of
|
|||||||
|
|
||||||
## Deer
|
## Deer
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Bird
|
## Bird
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Bat
|
## Bat
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Wolf
|
## Wolf
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
@ -75,31 +71,26 @@ A list of all creatures that are targets for the game, and what their status of
|
|||||||
|
|
||||||
## Chicken
|
## Chicken
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Slime
|
## Slime
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Rat
|
## Rat
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Boar
|
## Boar
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
## Spider
|
## Spider
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|
||||||
@ -141,6 +132,5 @@ A list of all creatures that are targets for the game, and what their status of
|
|||||||
|
|
||||||
## Raptor
|
## Raptor
|
||||||
- [ ] 3d Model
|
- [ ] 3d Model
|
||||||
- [ ] Viewmodel
|
|
||||||
- [ ] Data
|
- [ ] Data
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ Progress on the human creature
|
|||||||
|
|
||||||
## Third Person Model
|
## Third Person Model
|
||||||
- [X] Meshed
|
- [X] Meshed
|
||||||
- [ ] Textured
|
- [X] Textured
|
||||||
- [X] Rigged
|
- [X] Rigged
|
||||||
- Animations
|
- Animations
|
||||||
- Common
|
- Common
|
||||||
@ -173,20 +173,20 @@ Progress on the human creature
|
|||||||
- [ ] Ride Glider
|
- [ ] Ride Glider
|
||||||
- Attributes 0/0
|
- Attributes 0/0
|
||||||
## Data
|
## Data
|
||||||
- [ ] Bone Groups
|
- [X] Bone Groups
|
||||||
- [ ] Physics
|
- [X] Physics
|
||||||
- [ ] Visual Attributes
|
- [ ] Visual Attributes
|
||||||
- Movement
|
- Movement
|
||||||
- [ ] Ground Movement
|
- [X] Ground Movement
|
||||||
- [ ] Sprinting
|
- [X] Sprinting
|
||||||
- [ ] Jumping
|
- [X] Jumping
|
||||||
- [ ] Falling
|
- [X] Falling
|
||||||
- [ ] Walking
|
- [X] Walking
|
||||||
- [ ] Swimming
|
- [X] Swimming
|
||||||
- [ ] Equip Data
|
- [X] Equip Data
|
||||||
- [ ] Hitboxes
|
- [X] Hitboxes
|
||||||
- Combat
|
- Combat
|
||||||
- [ ] Health
|
- [X] Health
|
||||||
- [ ] Block System
|
- [X] Block System
|
||||||
- [ ] Attack Moves
|
- [X] Attack Moves
|
||||||
- [ ] AI
|
- [X] AI
|
||||||
@ -7,15 +7,32 @@
|
|||||||
+ on clearing the tutorial, continue the game when the sword is equipped, create another popup to teach sword controls. it pauses the game
|
+ on clearing the tutorial, continue the game when the sword is equipped, create another popup to teach sword controls. it pauses the game
|
||||||
+ when popup is accepted, spawn an enemy with an effect
|
+ when popup is accepted, spawn an enemy with an effect
|
||||||
Script engine ability to spawn entities
|
Script engine ability to spawn entities
|
||||||
Particles and particle manager
|
|
||||||
|
|
||||||
+ rearchitecture
|
+ rearchitecture
|
||||||
|
Particles and particle manager
|
||||||
|
|
||||||
+ fix the vibes
|
+ fix the vibes
|
||||||
Hitstun
|
Hitstun
|
||||||
Ticketed randomizer node for BTs to more heavily weight attacking and waiting
|
Ticketed randomizer node for BTs to more heavily weight attacking and waiting
|
||||||
|
|
||||||
|
+ feedback driven requirements
|
||||||
|
Much much much much more UI sound effects
|
||||||
|
Combine inventory menus into one ui
|
||||||
|
UI spacing and scaling
|
||||||
|
Come up with a title for the game and create a title menu for it (ideally with some animation and music)
|
||||||
|
Better skybox
|
||||||
|
Model clothing, hair for the human
|
||||||
|
Hitstun, particles, light on sword collision
|
||||||
|
Idle viewmodel does not show hands
|
||||||
|
Add punching/unarmed combat
|
||||||
|
Crouching
|
||||||
|
Objectives
|
||||||
|
- PVP arena mode initially?
|
||||||
|
- Spawn player at start of a dungeon
|
||||||
|
- Spawn player in a town with a quest to complete a nearby dungeon
|
||||||
|
|
||||||
+ bug fixes
|
+ bug fixes
|
||||||
|
Fix local connection showing equipped item in natural inventory
|
||||||
Fix return to title menu synchronization bug
|
Fix return to title menu synchronization bug
|
||||||
|
|
||||||
+ unreproducible bugs
|
+ unreproducible bugs
|
||||||
|
|||||||
@ -758,6 +758,13 @@ More animations
|
|||||||
Skeleton 3rd person model
|
Skeleton 3rd person model
|
||||||
NPE fixes in hitbox collection state + commonentityutils
|
NPE fixes in hitbox collection state + commonentityutils
|
||||||
Debug menu ability to play animation locally or on server
|
Debug menu ability to play animation locally or on server
|
||||||
|
Documentation updates
|
||||||
|
|
||||||
|
(09/15/2024)
|
||||||
|
Fix movement packet timing bug
|
||||||
|
Fix all items spawning above player head
|
||||||
|
Fix items falling below terrain
|
||||||
|
Fix gridded data cell manager saving attached items on realm save
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
@ -788,20 +795,22 @@ Startup Performance
|
|||||||
- Cache loaded typescript
|
- Cache loaded typescript
|
||||||
- Allow texture map to bind multiple model paths to a single set of mesh->textures
|
- Allow texture map to bind multiple model paths to a single set of mesh->textures
|
||||||
- Cache texture atlas for terrain
|
- Cache texture atlas for terrain
|
||||||
|
- Separate thread loads non-critical assets async while on title menu, but blocks main game display until completed
|
||||||
|
- Voxel caching and compression over network
|
||||||
|
- Easiest one is if sending all air, send single byte
|
||||||
|
- Proactively send chunks on player loading in (ie, send all chunks that are all air before its even requested)
|
||||||
|
- Also send all 'dirt' or 'stone' chunks
|
||||||
|
|
||||||
Code Generation
|
Code Generation
|
||||||
- Generate static "hasXComponent", "getXComponent" functions on sync'd components
|
- Generate static "hasXComponent", "getXComponent" functions on sync'd components
|
||||||
|
|
||||||
Rearchitecting
|
Rearchitecting
|
||||||
- Main render is a ui element (that we can have multiple of)
|
- Main render is a ui element (that we can have multiple of)
|
||||||
- Don't require player entity/camera for client-side logic
|
|
||||||
- "Viewport Testing" - where we can run a test that observes a scene on client without having a client-player-assigned entity
|
|
||||||
- This will require allowing the server to assign a player to data cells without the player having an entity -- this is what i mean by decoupling entity/player
|
|
||||||
|
|
||||||
Code cleanup
|
Code cleanup
|
||||||
- Rename "BehaviorTree" to be "Component" (what it actually is)
|
- Rename "BehaviorTree" to be "Component" (what it actually is)
|
||||||
- Refactor ground movement components
|
- Refactor ground movement components
|
||||||
- Refactor menu clases under electrosphere.client package
|
- Refactor menu clases to be under electrosphere.client package
|
||||||
|
|
||||||
Goof off today requirements:
|
Goof off today requirements:
|
||||||
Transvoxel implementation
|
Transvoxel implementation
|
||||||
@ -824,9 +833,6 @@ Bug fixes
|
|||||||
- The quads are off screen because the calculation for ndcX/ndcY are putting it wayyy to the right -- will need to revisit calcs for all that
|
- The quads are off screen because the calculation for ndcX/ndcY are putting it wayyy to the right -- will need to revisit calcs for all that
|
||||||
- Fix being able to walk off far side of the world (ie in level editor)
|
- Fix being able to walk off far side of the world (ie in level editor)
|
||||||
|
|
||||||
Grass System properly LOD
|
|
||||||
- Have foliage dynamically time out cells to be reconsidered based on distance from player (if close, short cooldown, if far long cooldown)
|
|
||||||
|
|
||||||
Debug
|
Debug
|
||||||
- Draw all bones with orientations
|
- Draw all bones with orientations
|
||||||
|
|
||||||
|
|||||||
@ -606,15 +606,16 @@ public class CollisionEngine {
|
|||||||
* Ray casts into the scene and gets the position of the closest collision's position in world space.
|
* Ray casts into the scene and gets the position of the closest collision's position in world space.
|
||||||
* Will collide with any collidable types including characters and items.
|
* Will collide with any collidable types including characters and items.
|
||||||
* @param start The start position of the ray to cast
|
* @param start The start position of the ray to cast
|
||||||
* @param direction The direction of the ray to cast
|
* @param direction The direction of the ray to cast (this will automatically be converted into a unit vector if it isn't already)
|
||||||
* @param length The length of the ray to cast
|
* @param length The length of the ray to cast
|
||||||
* @return The position, in world coordinates, of the closest collision of the way, or null if it did not collide with anything.
|
* @return The position, in world coordinates, of the closest collision of the way, or null if it did not collide with anything.
|
||||||
*/
|
*/
|
||||||
public Vector3d rayCastPosition(Vector3d start, Vector3d direction, double length){
|
public Vector3d rayCastPosition(Vector3d start, Vector3d direction, double length){
|
||||||
spaceLock.acquireUninterruptibly();
|
spaceLock.acquireUninterruptibly();
|
||||||
|
Vector3d unitDir = new Vector3d(direction).normalize();
|
||||||
//create the ray
|
//create the ray
|
||||||
DRay ray = OdeHelper.createRay(space, length);
|
DRay ray = OdeHelper.createRay(space, length);
|
||||||
ray.set(start.x, start.y, start.z, direction.x, direction.y, direction.z);
|
ray.set(start.x, start.y, start.z, unitDir.x, unitDir.y, unitDir.z);
|
||||||
//collide
|
//collide
|
||||||
RayCastCallbackData data = new RayCastCallbackData(bodyPointerMap, null);
|
RayCastCallbackData data = new RayCastCallbackData(bodyPointerMap, null);
|
||||||
rayCastCallback.setLength(length);
|
rayCastCallback.setLength(length);
|
||||||
|
|||||||
@ -249,27 +249,27 @@ public class ClientGroundMovementTree implements BehaviorTree {
|
|||||||
// System.out.println("MOVE to " + message.getX() + " " + message.getY() + " " + message.getZ());
|
// System.out.println("MOVE to " + message.getX() + " " + message.getY() + " " + message.getZ());
|
||||||
switch(message.getMessageSubtype()){
|
switch(message.getMessageSubtype()){
|
||||||
case MOVEUPDATE:
|
case MOVEUPDATE:
|
||||||
if(updateTime > lastUpdateTime){
|
if(updateTime >= lastUpdateTime){
|
||||||
lastUpdateTime = updateTime;
|
lastUpdateTime = updateTime;
|
||||||
switch(message.gettreeState()){
|
switch(message.gettreeState()){
|
||||||
case 0:
|
case 0:
|
||||||
state = MovementTreeState.STARTUP;
|
state = MovementTreeState.STARTUP;
|
||||||
// System.out.println("Set state STARTUP");
|
// System.out.println("Set state STARTUP");
|
||||||
GravityUtils.clientAttemptActivateGravity(parent);
|
GravityUtils.clientAttemptActivateGravity(parent);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
state = MovementTreeState.MOVE;
|
state = MovementTreeState.MOVE;
|
||||||
// System.out.println("Set state MOVE");
|
// System.out.println("Set state MOVE");
|
||||||
GravityUtils.clientAttemptActivateGravity(parent);
|
GravityUtils.clientAttemptActivateGravity(parent);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
state = MovementTreeState.SLOWDOWN;
|
state = MovementTreeState.SLOWDOWN;
|
||||||
// System.out.println("Set state SLOWDOWN");
|
// System.out.println("Set state SLOWDOWN");
|
||||||
GravityUtils.clientAttemptActivateGravity(parent);
|
GravityUtils.clientAttemptActivateGravity(parent);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
state = MovementTreeState.IDLE;
|
state = MovementTreeState.IDLE;
|
||||||
// System.out.println("Set state IDLE");
|
// System.out.println("Set state IDLE");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//this should only fire on the client, we don't want the server snap updating due to client position reporting
|
//this should only fire on the client, we don't want the server snap updating due to client position reporting
|
||||||
|
|||||||
@ -226,9 +226,11 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
|||||||
switch(message.gettreeState()){
|
switch(message.gettreeState()){
|
||||||
//0 is startup
|
//0 is startup
|
||||||
case 0: {
|
case 0: {
|
||||||
|
// System.out.println("Receive move packet from client treestate " + message.gettreeState());
|
||||||
start(ClientGroundMovementTree.getMovementRelativeFacingShortAsEnum((short)message.getpropertyValueInt()));
|
start(ClientGroundMovementTree.getMovementRelativeFacingShortAsEnum((short)message.getpropertyValueInt()));
|
||||||
} break;
|
} break;
|
||||||
case 2: {
|
case 2: {
|
||||||
|
// System.out.println("Receive move packet from client treestate " + message.gettreeState());
|
||||||
slowdown();
|
slowdown();
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import org.joml.Vector3d;
|
|||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
import electrosphere.client.entity.camera.CameraEntityUtils;
|
import electrosphere.client.entity.camera.CameraEntityUtils;
|
||||||
|
import electrosphere.collision.CollisionEngine;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.signal.Signal.SignalType;
|
import electrosphere.engine.signal.Signal.SignalType;
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
@ -174,7 +175,8 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
CollisionEngine clientCollisionEngine = Globals.clientSceneWrapper.getCollisionEngine(); //using client collision engine so ray doesn't collide with player entity
|
||||||
|
Vector3d cursorPos = clientCollisionEngine.rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, data.getId(), null);
|
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, data.getId(), null);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -203,7 +205,8 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
CollisionEngine clientCollisionEngine = Globals.clientSceneWrapper.getCollisionEngine(); //using client collision engine so ray doesn't collide with player entity
|
||||||
|
Vector3d cursorPos = clientCollisionEngine.rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
||||||
if(cursorPos == null){
|
if(cursorPos == null){
|
||||||
cursorPos = new Vector3d(centerPos).add(new Vector3d(eyePos).mul(-5.0));
|
cursorPos = new Vector3d(centerPos).add(new Vector3d(eyePos).mul(-5.0));
|
||||||
}
|
}
|
||||||
@ -235,7 +238,8 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
CollisionEngine clientCollisionEngine = Globals.clientSceneWrapper.getCollisionEngine(); //using client collision engine so ray doesn't collide with player entity
|
||||||
|
Vector3d cursorPos = clientCollisionEngine.rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
FoliageUtils.serverSpawnTreeFoliage(realm, cursorPos, data.getId(), new Random().nextLong());
|
FoliageUtils.serverSpawnTreeFoliage(realm, cursorPos, data.getId(), new Random().nextLong());
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -263,7 +267,8 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
CollisionEngine clientCollisionEngine = Globals.clientSceneWrapper.getCollisionEngine(); //using client collision engine so ray doesn't collide with player entity
|
||||||
|
Vector3d cursorPos = clientCollisionEngine.rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
ItemUtils.serverSpawnBasicItem(realm, cursorPos, item.getId());
|
ItemUtils.serverSpawnBasicItem(realm, cursorPos, item.getId());
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -292,7 +297,8 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
CollisionEngine clientCollisionEngine = Globals.clientSceneWrapper.getCollisionEngine(); //using client collision engine so ray doesn't collide with player entity
|
||||||
|
Vector3d cursorPos = clientCollisionEngine.rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
CommonEntityUtils.serverSpawnBasicObject(realm, cursorPos, object.getId());
|
CommonEntityUtils.serverSpawnBasicObject(realm, cursorPos, object.getId());
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
import electrosphere.entity.EntityUtils;
|
import electrosphere.entity.EntityUtils;
|
||||||
|
import electrosphere.entity.state.attach.AttachUtils;
|
||||||
import electrosphere.entity.state.equip.ServerEquipState;
|
import electrosphere.entity.state.equip.ServerEquipState;
|
||||||
import electrosphere.entity.state.inventory.InventoryUtils;
|
import electrosphere.entity.state.inventory.InventoryUtils;
|
||||||
import electrosphere.entity.types.EntityTypes;
|
import electrosphere.entity.types.EntityTypes;
|
||||||
@ -53,12 +54,14 @@ public class ContentSerialization {
|
|||||||
rVal.serializedEntities.add(serializedEntity);
|
rVal.serializedEntities.add(serializedEntity);
|
||||||
} break;
|
} break;
|
||||||
case ITEM: {
|
case ITEM: {
|
||||||
EntitySerialization serializedEntity = new EntitySerialization();
|
if(!AttachUtils.isAttached(entity)){
|
||||||
serializedEntity.setPosition(EntityUtils.getPosition(entity));
|
EntitySerialization serializedEntity = new EntitySerialization();
|
||||||
serializedEntity.setRotation(EntityUtils.getRotation(entity));
|
serializedEntity.setPosition(EntityUtils.getPosition(entity));
|
||||||
serializedEntity.setType(EntityType.ITEM.getValue());
|
serializedEntity.setRotation(EntityUtils.getRotation(entity));
|
||||||
serializedEntity.setSubtype(CommonEntityUtils.getEntitySubtype(entity));
|
serializedEntity.setType(EntityType.ITEM.getValue());
|
||||||
rVal.serializedEntities.add(serializedEntity);
|
serializedEntity.setSubtype(CommonEntityUtils.getEntitySubtype(entity));
|
||||||
|
rVal.serializedEntities.add(serializedEntity);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
case FOLIAGE: {
|
case FOLIAGE: {
|
||||||
EntitySerialization serializedEntity = new EntitySerialization();
|
EntitySerialization serializedEntity = new EntitySerialization();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user