Gravity "fixes" / Symbolism map skeleton

This commit is contained in:
austin 2021-07-20 00:44:58 -04:00
parent 85f60b038b
commit 719a0eaa9c
7 changed files with 85 additions and 6 deletions

View File

@ -0,0 +1,22 @@
{
"symbolismMap" : [
{
"name" : "fire",
"relations" : [
{
"name" : "water",
"strength" : -1
}
]
},
{
"name" : "water",
"relations" : [
{
"name" : "fire",
"strength" : -1
}
]
}
]
}

View File

@ -518,13 +518,13 @@ public class LoadingThread extends Thread {
// 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));
}

View File

@ -65,7 +65,6 @@ public class MovementTree {
public void start(){
//TODO: check if can start moving
state = MovementTreeState.STARTUP;
activateGravityTree();
}
public void interrupt(){
@ -184,6 +183,7 @@ public class MovementTree {
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
activateGravityTree();
if(Globals.RUN_SERVER){
Globals.server.broadcastMessage(
@ -241,6 +241,8 @@ public class MovementTree {
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
activateGravityTree();
if(Globals.RUN_SERVER){
Globals.server.broadcastMessage(
EntityMessage.constructmoveUpdateMessage(
@ -301,6 +303,8 @@ public class MovementTree {
bodyTransformMatrix = new javax.vecmath.Matrix4f(PhysicsUtils.jomlToVecmathQuaternionf(rotation),PhysicsUtils.jomlToVecmathVector3f(newPosition),1.0f);
body.setWorldTransform(new com.bulletphysics.linearmath.Transform(bodyTransformMatrix));
activateGravityTree();
if(Globals.RUN_SERVER){
Globals.server.broadcastMessage(
EntityMessage.constructmoveUpdateMessage(

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -82,7 +82,7 @@ public class RenderingEngine {
static Framebuffer lightDepthBuffer;
public static boolean renderHitboxes = false;
public static boolean renderPhysics = true;
public static boolean renderPhysics = false;
ShaderProgram activeProgram;