Gravity "fixes" / Symbolism map skeleton
This commit is contained in:
parent
85f60b038b
commit
719a0eaa9c
22
assets/Data/symbolism.json
Normal file
22
assets/Data/symbolism.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"symbolismMap" : [
|
||||||
|
{
|
||||||
|
"name" : "fire",
|
||||||
|
"relations" : [
|
||||||
|
{
|
||||||
|
"name" : "water",
|
||||||
|
"strength" : -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "water",
|
||||||
|
"relations" : [
|
||||||
|
{
|
||||||
|
"name" : "fire",
|
||||||
|
"strength" : -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -518,13 +518,13 @@ public class LoadingThread extends Thread {
|
|||||||
// AttachUtils.attachEntityToEntityAtBone(testHomie, sword, "Bone.020");
|
// AttachUtils.attachEntityToEntityAtBone(testHomie, sword, "Bone.020");
|
||||||
|
|
||||||
|
|
||||||
CollisionObjUtils.spawnCollisionPlane(new Vector3f(1,1,1), new Vector3f(8,2,10), new Quaternionf()); // .rotateLocalX(0.75f)
|
// CollisionObjUtils.spawnCollisionPlane(new Vector3f(1,1,1), new Vector3f(8,2,10), new Quaternionf()); // .rotateLocalX(0.75f)
|
||||||
|
|
||||||
CollisionObjUtils.spawnCollisionCube(new Vector3f(1,1,1), new Vector3f(10,1,10), new Quaternionf());
|
// CollisionObjUtils.spawnCollisionCube(new Vector3f(1,1,1), new Vector3f(10,1,10), new Quaternionf());
|
||||||
|
|
||||||
CreatureUtils.positionCharacter(Globals.playerCharacter, new Vector3f(10,3,10));
|
// CreatureUtils.positionCharacter(Globals.playerCharacter, new Vector3f(10,3,10));
|
||||||
|
|
||||||
// StructureUtils.spawnBasicStructure("building1", new Vector3f(5,2.4f,15), new Quaternionf().rotateLocalY((float)Math.PI));
|
StructureUtils.spawnBasicStructure("building1", new Vector3f(10,2.4f,15), new Quaternionf().rotateLocalY((float)Math.PI));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,6 @@ public class MovementTree {
|
|||||||
public void start(){
|
public void start(){
|
||||||
//TODO: check if can start moving
|
//TODO: check if can start moving
|
||||||
state = MovementTreeState.STARTUP;
|
state = MovementTreeState.STARTUP;
|
||||||
activateGravityTree();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void interrupt(){
|
public void interrupt(){
|
||||||
@ -184,6 +183,7 @@ public class MovementTree {
|
|||||||
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
||||||
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
||||||
|
|
||||||
|
activateGravityTree();
|
||||||
|
|
||||||
if(Globals.RUN_SERVER){
|
if(Globals.RUN_SERVER){
|
||||||
Globals.server.broadcastMessage(
|
Globals.server.broadcastMessage(
|
||||||
@ -241,6 +241,8 @@ public class MovementTree {
|
|||||||
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
||||||
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
||||||
|
|
||||||
|
activateGravityTree();
|
||||||
|
|
||||||
if(Globals.RUN_SERVER){
|
if(Globals.RUN_SERVER){
|
||||||
Globals.server.broadcastMessage(
|
Globals.server.broadcastMessage(
|
||||||
EntityMessage.constructmoveUpdateMessage(
|
EntityMessage.constructmoveUpdateMessage(
|
||||||
@ -301,6 +303,8 @@ public class MovementTree {
|
|||||||
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
|
||||||
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
|
||||||
|
|
||||||
|
activateGravityTree();
|
||||||
|
|
||||||
if(Globals.RUN_SERVER){
|
if(Globals.RUN_SERVER){
|
||||||
Globals.server.broadcastMessage(
|
Globals.server.broadcastMessage(
|
||||||
EntityMessage.constructmoveUpdateMessage(
|
EntityMessage.constructmoveUpdateMessage(
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
package electrosphere.game.server.symbolism;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author amaterasu
|
||||||
|
*/
|
||||||
|
public class Symbol {
|
||||||
|
String name;
|
||||||
|
List<SymbolismRelation> relations;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SymbolismRelation> getRelations() {
|
||||||
|
return relations;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package electrosphere.game.server.symbolism;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SymbolismMap {
|
||||||
|
|
||||||
|
List<SymbolismRelation> symbolismMap;
|
||||||
|
|
||||||
|
public List<SymbolismRelation> getSymbolismMap() {
|
||||||
|
return symbolismMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package electrosphere.game.server.symbolism;
|
||||||
|
|
||||||
|
public class SymbolismRelation {
|
||||||
|
String name;
|
||||||
|
float strength;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getStrength() {
|
||||||
|
return strength;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -82,7 +82,7 @@ public class RenderingEngine {
|
|||||||
static Framebuffer lightDepthBuffer;
|
static Framebuffer lightDepthBuffer;
|
||||||
|
|
||||||
public static boolean renderHitboxes = false;
|
public static boolean renderHitboxes = false;
|
||||||
public static boolean renderPhysics = true;
|
public static boolean renderPhysics = false;
|
||||||
|
|
||||||
ShaderProgram activeProgram;
|
ShaderProgram activeProgram;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user