cleanup autogen bug
This commit is contained in:
parent
07d18b6126
commit
8d6b4f71b8
@ -1,7 +1,6 @@
|
|||||||
package electrosphere.entity.state.attack;
|
package electrosphere.entity.state.attack;
|
||||||
|
|
||||||
|
|
||||||
import electrosphere.net.parser.net.message.SynchronizationMessage;
|
|
||||||
import electrosphere.net.synchronization.BehaviorTreeIdEnums;
|
import electrosphere.net.synchronization.BehaviorTreeIdEnums;
|
||||||
|
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
@ -112,19 +111,26 @@ public class ClientAttackTree implements BehaviorTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p> Automatically generated </p>
|
* Starts an attack
|
||||||
* <p>
|
|
||||||
* Requests that the server start this btree
|
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public void start(){
|
public void start(){
|
||||||
Globals.clientConnection.queueOutgoingMessage(
|
currentMoveCanHold = false;
|
||||||
SynchronizationMessage.constructClientRequestBTreeActionMessage(
|
currentMoveHasWindup = false;
|
||||||
Globals.clientSceneWrapper.mapClientToServerId(parent.getId()),
|
stillHold = true;
|
||||||
BehaviorTreeIdEnums.BTREE_CLIENTGROUNDMOVEMENTTREE_ID,
|
firesProjectile = false;
|
||||||
1
|
projectileToFire = null;
|
||||||
)
|
currentWeapon = null;
|
||||||
);
|
attackingPoint = null;
|
||||||
|
//figure out attack type we should be doing
|
||||||
|
String attackType = getAttackType();
|
||||||
|
//if we can attack, setup doing so
|
||||||
|
if(canAttack(attackType)){
|
||||||
|
setAttackMoveTypeActive(attackType);
|
||||||
|
currentMoveset = getMoveset(attackType);
|
||||||
|
if(currentMoveset != null){
|
||||||
|
Globals.clientConnection.queueOutgoingMessage(EntityMessage.constructstartAttackMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void release(){
|
public void release(){
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package electrosphere.entity.state.block;
|
package electrosphere.entity.state.block;
|
||||||
|
|
||||||
|
|
||||||
import electrosphere.net.parser.net.message.SynchronizationMessage;
|
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
import electrosphere.entity.EntityDataStrings;
|
import electrosphere.entity.EntityDataStrings;
|
||||||
@ -225,20 +224,5 @@ public class ClientBlockTree implements BehaviorTree {
|
|||||||
public void setCurrentBlockVariant(String currentBlockVariant){
|
public void setCurrentBlockVariant(String currentBlockVariant){
|
||||||
this.currentBlockVariant = currentBlockVariant;
|
this.currentBlockVariant = currentBlockVariant;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* <p> Automatically generated </p>
|
|
||||||
* <p>
|
|
||||||
* Requests that the server start this btree
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public void start(){
|
|
||||||
Globals.clientConnection.queueOutgoingMessage(
|
|
||||||
SynchronizationMessage.constructClientRequestBTreeActionMessage(
|
|
||||||
Globals.clientSceneWrapper.mapClientToServerId(parent.getId()),
|
|
||||||
BehaviorTreeIdEnums.BTREE_CLIENTGROUNDMOVEMENTTREE_ID,
|
|
||||||
1
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,17 +56,17 @@ public class ClientCollidableTree implements BehaviorTree {
|
|||||||
// System.out.println("Impulse force: " + impulseForce);
|
// System.out.println("Impulse force: " + impulseForce);
|
||||||
// System.out.println("Position: " + position);
|
// System.out.println("Position: " + position);
|
||||||
}
|
}
|
||||||
if(impulse.type.matches(Collidable.TYPE_ITEM)){
|
// if(impulse.type.matches(Collidable.TYPE_ITEM)){
|
||||||
if(ClientGravityTree.getClientGravityTree(parent)!=null){
|
// if(ClientGravityTree.getClientGravityTree(parent)!=null){
|
||||||
ClientGravityTree.getClientGravityTree(parent).start();
|
// ClientGravityTree.getClientGravityTree(parent).start();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if(impulse.type.matches(Collidable.TYPE_CREATURE)){
|
// if(impulse.type.matches(Collidable.TYPE_CREATURE)){
|
||||||
// System.out.println(System.currentTimeMillis() + " creature hit!");
|
// // System.out.println(System.currentTimeMillis() + " creature hit!");
|
||||||
if(ClientGravityTree.getClientGravityTree(parent)!=null){
|
// if(ClientGravityTree.getClientGravityTree(parent)!=null){
|
||||||
ClientGravityTree.getClientGravityTree(parent).start();
|
// ClientGravityTree.getClientGravityTree(parent).start();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
//bound to world bounds
|
//bound to world bounds
|
||||||
if(newPosition.x < Globals.clientWorldData.getWorldBoundMin().x){
|
if(newPosition.x < Globals.clientWorldData.getWorldBoundMin().x){
|
||||||
|
|||||||
@ -25,7 +25,6 @@ import electrosphere.game.data.item.type.EquipWhitelist;
|
|||||||
import electrosphere.logger.LoggerInterface;
|
import electrosphere.logger.LoggerInterface;
|
||||||
import electrosphere.net.parser.net.message.InventoryMessage;
|
import electrosphere.net.parser.net.message.InventoryMessage;
|
||||||
import electrosphere.net.parser.net.message.NetworkMessage;
|
import electrosphere.net.parser.net.message.NetworkMessage;
|
||||||
import electrosphere.net.parser.net.message.SynchronizationMessage;
|
|
||||||
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
|
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
|
||||||
import electrosphere.renderer.actor.Actor;
|
import electrosphere.renderer.actor.Actor;
|
||||||
import electrosphere.renderer.actor.ActorMeshMask;
|
import electrosphere.renderer.actor.ActorMeshMask;
|
||||||
@ -452,20 +451,4 @@ public class ClientEquipState implements BehaviorTree {
|
|||||||
return (ClientEquipState)entity.getData(EntityDataStrings.TREE_CLIENTEQUIPSTATE);
|
return (ClientEquipState)entity.getData(EntityDataStrings.TREE_CLIENTEQUIPSTATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p> Automatically generated </p>
|
|
||||||
* <p>
|
|
||||||
* Requests that the server start this btree
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public void start(){
|
|
||||||
Globals.clientConnection.queueOutgoingMessage(
|
|
||||||
SynchronizationMessage.constructClientRequestBTreeActionMessage(
|
|
||||||
Globals.clientSceneWrapper.mapClientToServerId(parent.getId()),
|
|
||||||
BehaviorTreeIdEnums.BTREE_CLIENTGROUNDMOVEMENTTREE_ID,
|
|
||||||
1
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,10 +5,10 @@ import electrosphere.entity.EntityDataStrings;
|
|||||||
|
|
||||||
public class GravityUtils {
|
public class GravityUtils {
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static void clientAttemptActivateGravity(Entity target){
|
public static void clientAttemptActivateGravity(Entity target){
|
||||||
if(target.containsKey(EntityDataStrings.GRAVITY_ENTITY)){
|
if(target.containsKey(EntityDataStrings.GRAVITY_ENTITY)){
|
||||||
ClientGravityTree tree = ClientGravityTree.getClientGravityTree(target);
|
ClientGravityTree tree = ClientGravityTree.getClientGravityTree(target);
|
||||||
tree.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class SynchronizationProtocol implements ServerProtocolTemplate<Synchroni
|
|||||||
public void handleSyncMessage(ServerConnectionHandler connectionHandler, SynchronizationMessage message) {
|
public void handleSyncMessage(ServerConnectionHandler connectionHandler, SynchronizationMessage message) {
|
||||||
switch(message.getMessageSubtype()){
|
switch(message.getMessageSubtype()){
|
||||||
case CLIENTREQUESTBTREEACTION:
|
case CLIENTREQUESTBTREEACTION:
|
||||||
throw new UnsupportedOperationException("Not implemented yet!");
|
// throw new UnsupportedOperationException("Not implemented yet!");
|
||||||
case UPDATECLIENTSTATE:
|
case UPDATECLIENTSTATE:
|
||||||
case UPDATECLIENTSTRINGSTATE:
|
case UPDATECLIENTSTRINGSTATE:
|
||||||
case UPDATECLIENTDOUBLESTATE:
|
case UPDATECLIENTDOUBLESTATE:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user