terrain editing improvement + animation bugfix
This commit is contained in:
parent
45e0c98ee1
commit
7e2f4feaf5
@ -199,7 +199,7 @@ public class ClientGravityTree implements BehaviorTree {
|
||||
break;
|
||||
case NOT_ACTIVE:
|
||||
if(hadEntityCollision()){
|
||||
start();
|
||||
// start();
|
||||
}
|
||||
//nothing here atm
|
||||
//eventually want to check if need to re-activate somehow
|
||||
|
||||
@ -109,7 +109,7 @@ public class Actor {
|
||||
// playingAnimation = true;
|
||||
// animation = animationName;
|
||||
Model model = Globals.assetManager.fetchModel(modelPath);
|
||||
if(model != null){
|
||||
if(model != null && model.getAnimation(animationName) != null){
|
||||
double length = model.getAnimation(animationName).duration;
|
||||
ActorAnimationMask animMask = new ActorAnimationMask(priority, animationName, 0, length);
|
||||
for(Bone bone : model.bones){
|
||||
|
||||
@ -62,7 +62,7 @@ public class TerrainEditing {
|
||||
){
|
||||
float current = data.getWeights()[voxelPos.x][voxelPos.y][voxelPos.z];
|
||||
//hard clamp so it doesn't go over 1
|
||||
float finalValue = Math.max(Math.min(current + weight,1),-1);
|
||||
float finalValue = Math.max(Math.min(current + weight * distance,1),-1);
|
||||
voxelCellManager.editChunk(chunkPos, voxelPos, finalValue, type);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user