remove movement restriction on attack

This commit is contained in:
austin 2024-08-13 16:12:32 -04:00
parent 25fff94029
commit 830d2071df
4 changed files with 1 additions and 21 deletions

View File

@ -555,6 +555,7 @@ Multiple hitboxes per bone
Potential fix for client concurrency issue
Debounce attack collisions
Remove entities on death
Remove movement restriction on attack
# TODO

View File

@ -17,7 +17,6 @@ import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeState;
import electrosphere.entity.state.collidable.Impulse;
import electrosphere.entity.state.equip.ServerEquipState;
import electrosphere.entity.state.hitbox.HitboxCollectionState;
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
import electrosphere.entity.state.rotator.ServerRotatorTree;
import electrosphere.entity.types.attach.AttachUtils;
import electrosphere.entity.types.collision.CollisionObjUtils;
@ -35,7 +34,6 @@ import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
import electrosphere.net.synchronization.enums.FieldIdEnums;
import electrosphere.renderer.actor.Actor;
import electrosphere.server.datacell.Realm;
import electrosphere.util.math.MathUtils;
import java.util.LinkedList;
import java.util.List;
@ -226,15 +224,6 @@ public class ServerAttackTree implements BehaviorTree {
currentMoveCanHold = currentMove.getHoldState() != null;
//clear collided list
this.collidedEntities.clear();
//stop movement tree
if(parent.containsKey(EntityDataStrings.SERVER_MOVEMENT_BT)){
BehaviorTree movementTree = CreatureUtils.serverGetEntityMovementTree(parent);
if(movementTree instanceof ServerGroundMovementTree){
((ServerGroundMovementTree)movementTree).interrupt();
}
}
Vector3d movementVector = CreatureUtils.getFacingVector(parent);
EntityUtils.getRotation(parent).rotationTo(MathUtils.getOriginVector(), new Vector3d(movementVector.x,movementVector.y,movementVector.z));
frameCurrent = 0;
} else {
this.setState(AttackTreeState.IDLE);

View File

@ -16,8 +16,6 @@ import electrosphere.entity.EntityDataStrings;
import electrosphere.entity.EntityUtils;
import electrosphere.entity.btree.BehaviorTree;
import electrosphere.entity.state.AnimationPriorities;
import electrosphere.entity.state.attack.ClientAttackTree;
import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeState;
import electrosphere.entity.state.client.firstPerson.FirstPersonTree;
import electrosphere.entity.state.movement.FallTree;
import electrosphere.entity.state.movement.SprintTree;
@ -424,9 +422,6 @@ public class ClientGroundMovementTree implements BehaviorTree {
public boolean canStartMoving(){
boolean rVal = true;
if(parent.containsKey(EntityDataStrings.TREE_CLIENTATTACKTREE) && ((ClientAttackTree)parent.getData(EntityDataStrings.TREE_CLIENTATTACKTREE)).getState() != AttackTreeState.IDLE){
rVal = false;
}
return rVal;
}

View File

@ -15,8 +15,6 @@ import electrosphere.entity.EntityDataStrings;
import electrosphere.entity.EntityUtils;
import electrosphere.entity.btree.BehaviorTree;
import electrosphere.entity.state.AnimationPriorities;
import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeState;
import electrosphere.entity.state.attack.ServerAttackTree;
import electrosphere.entity.state.movement.ServerFallTree;
import electrosphere.entity.state.movement.ServerSprintTree;
import electrosphere.entity.state.movement.groundmove.ClientGroundMovementTree.MovementRelativeFacing;
@ -435,9 +433,6 @@ public class ServerGroundMovementTree implements BehaviorTree {
public boolean canStartMoving(){
boolean rVal = true;
if(parent.containsKey(EntityDataStrings.TREE_SERVERATTACKTREE) && ((ServerAttackTree)parent.getData(EntityDataStrings.TREE_SERVERATTACKTREE)).getState() != AttackTreeState.IDLE){
rVal = false;
}
return rVal;
}