terrain editing improvement + animation bugfix

This commit is contained in:
austin 2024-02-25 14:27:48 -05:00
parent 45e0c98ee1
commit 7e2f4feaf5
3 changed files with 3 additions and 3 deletions

View File

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

View File

@ -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){

View File

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