small 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
3379f5ca26
commit
86344ebfeb
@ -429,12 +429,14 @@ public class ServerAttackTree implements BehaviorTree {
|
|||||||
this.stateTransitionUtil.simulate(AttackTreeState.BLOCK_RECOIL);
|
this.stateTransitionUtil.simulate(AttackTreeState.BLOCK_RECOIL);
|
||||||
//deactivate hitboxes
|
//deactivate hitboxes
|
||||||
List<Entity> attachedEntities = AttachUtils.getChildrenList(parent);
|
List<Entity> attachedEntities = AttachUtils.getChildrenList(parent);
|
||||||
|
if(attachedEntities != null){
|
||||||
for(Entity currentAttached : attachedEntities){
|
for(Entity currentAttached : attachedEntities){
|
||||||
if(HitboxCollectionState.hasHitboxState(currentAttached)){
|
if(HitboxCollectionState.hasHitboxState(currentAttached)){
|
||||||
HitboxCollectionState currentState = HitboxCollectionState.getHitboxState(currentAttached);
|
HitboxCollectionState currentState = HitboxCollectionState.getHitboxState(currentAttached);
|
||||||
currentState.setActive(false);
|
currentState.setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(this.currentMove.getActiveBones() != null && HitboxCollectionState.hasHitboxState(this.parent)){
|
if(this.currentMove.getActiveBones() != null && HitboxCollectionState.hasHitboxState(this.parent)){
|
||||||
HitboxCollectionState hitboxCollectionState = HitboxCollectionState.getHitboxState(this.parent);
|
HitboxCollectionState hitboxCollectionState = HitboxCollectionState.getHitboxState(this.parent);
|
||||||
for(String boneName : this.currentMove.getActiveBones()){
|
for(String boneName : this.currentMove.getActiveBones()){
|
||||||
@ -451,12 +453,14 @@ public class ServerAttackTree implements BehaviorTree {
|
|||||||
this.stateTransitionUtil.simulate(AttackTreeState.COOLDOWN);
|
this.stateTransitionUtil.simulate(AttackTreeState.COOLDOWN);
|
||||||
//deactive hitboxes
|
//deactive hitboxes
|
||||||
List<Entity> attachedEntities = AttachUtils.getChildrenList(parent);
|
List<Entity> attachedEntities = AttachUtils.getChildrenList(parent);
|
||||||
|
if(attachedEntities != null){
|
||||||
for(Entity currentAttached : attachedEntities){
|
for(Entity currentAttached : attachedEntities){
|
||||||
if(HitboxCollectionState.hasHitboxState(currentAttached)){
|
if(HitboxCollectionState.hasHitboxState(currentAttached)){
|
||||||
HitboxCollectionState currentState = HitboxCollectionState.getHitboxState(currentAttached);
|
HitboxCollectionState currentState = HitboxCollectionState.getHitboxState(currentAttached);
|
||||||
currentState.setActive(false);
|
currentState.setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(this.currentMove.getActiveBones() != null && HitboxCollectionState.hasHitboxState(this.parent)){
|
if(this.currentMove.getActiveBones() != null && HitboxCollectionState.hasHitboxState(this.parent)){
|
||||||
HitboxCollectionState hitboxCollectionState = HitboxCollectionState.getHitboxState(this.parent);
|
HitboxCollectionState hitboxCollectionState = HitboxCollectionState.getHitboxState(this.parent);
|
||||||
for(String boneName : this.currentMove.getActiveBones()){
|
for(String boneName : this.currentMove.getActiveBones()){
|
||||||
|
|||||||
@ -606,9 +606,8 @@ public class GriddedDataCellManager implements DataCellManager, VoxelCellManager
|
|||||||
public void simulate(){
|
public void simulate(){
|
||||||
Globals.profiler.beginCpuSample("GriddedDataCellManager.simulate");
|
Globals.profiler.beginCpuSample("GriddedDataCellManager.simulate");
|
||||||
loadedCellsLock.lock();
|
loadedCellsLock.lock();
|
||||||
Collection<ServerDataCell> groundCells = this.groundDataCells.values();
|
|
||||||
boolean runMicroSim = Globals.microSimulation != null && Globals.microSimulation.isReady();
|
boolean runMicroSim = Globals.microSimulation != null && Globals.microSimulation.isReady();
|
||||||
for(ServerDataCell cell : groundCells){
|
for(ServerDataCell cell : this.groundDataCells.values()){
|
||||||
if(runMicroSim && this.shouldSimulate(cell)){
|
if(runMicroSim && this.shouldSimulate(cell)){
|
||||||
Globals.microSimulation.simulate(cell);
|
Globals.microSimulation.simulate(cell);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,11 +96,6 @@ public class PoseActor {
|
|||||||
for(ActorAnimationMask mask : toRemoveMasks){
|
for(ActorAnimationMask mask : toRemoveMasks){
|
||||||
animationQueue.remove(mask);
|
animationQueue.remove(mask);
|
||||||
}
|
}
|
||||||
PoseModel model = Globals.assetManager.fetchPoseModel(modelPath);
|
|
||||||
if(model != null){
|
|
||||||
this.applyAnimationMasks(model);
|
|
||||||
this.calculateNodeTransforms(model);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -392,6 +387,17 @@ public class PoseActor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the transform cache for this actor
|
||||||
|
*/
|
||||||
|
public void updateTransformCache(){
|
||||||
|
PoseModel model = Globals.assetManager.fetchPoseModel(modelPath);
|
||||||
|
if(model != null){
|
||||||
|
this.applyAnimationMasks(model);
|
||||||
|
this.calculateNodeTransforms(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the animation scalar
|
* Sets the animation scalar
|
||||||
* @param animationScalar The new animation scalar value
|
* @param animationScalar The new animation scalar value
|
||||||
|
|||||||
@ -66,6 +66,16 @@ public class MicroSimulation {
|
|||||||
for(Entity collidable : collidables){
|
for(Entity collidable : collidables){
|
||||||
ServerCollidableTree.getServerCollidableTree(collidable).simulate((float)Globals.timekeeper.getSimFrameTime());
|
ServerCollidableTree.getServerCollidableTree(collidable).simulate((float)Globals.timekeeper.getSimFrameTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update actor transform caches
|
||||||
|
poseableEntities = dataCell.getScene().getEntitiesWithTag(EntityTags.POSEABLE);
|
||||||
|
if(poseableEntities != null){
|
||||||
|
for(Entity currentEntity : dataCell.getScene().getEntitiesWithTag(EntityTags.POSEABLE)){
|
||||||
|
//fetch actor
|
||||||
|
PoseActor currentPoseActor = EntityUtils.getPoseActor(currentEntity);
|
||||||
|
currentPoseActor.updateTransformCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Globals.profiler.endCpuSample();
|
Globals.profiler.endCpuSample();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user