viewmodel fps fix, audio fix, docs
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-08-15 18:23:00 -04:00
parent d15ba2445a
commit 37db40dc22
11 changed files with 83 additions and 67 deletions

View File

@ -0,0 +1,3 @@
@page blenderscenesetup Blender Scene Setp
Need to set the framerate of the scene to be 60fps

View File

@ -1,5 +1,6 @@
@page blenderindex Blender @page blenderindex Blender
[TOC] [TOC]
- @subpage blenderscenesetup
- @subpage WeavingMeshes - @subpage WeavingMeshes
- @subpage BasicClothingGuide - @subpage BasicClothingGuide

View File

@ -19,5 +19,5 @@
+ bug fixes + bug fixes
Fix grass rendering distance Fix grass rendering distance
Fix hitbox audio not playing spatially Fix audio freakout when attack while jumping/falling (should block regular attack while aerial)
Fix audio freakout when attack while jumping/falling (should block regular attack while aerial) Fix server ground movement tree playing animation over falling animation

View File

@ -582,6 +582,7 @@ Better creature damage sfx
Audio debugging Audio debugging
Play animations offset by network delay Play animations offset by network delay
- Attack animation - Attack animation
Fix viewmodel animation framerate
# TODO # TODO
@ -603,6 +604,7 @@ Bug Fixes
- Fix hitbox placement does not scale with entity scale on server - Fix hitbox placement does not scale with entity scale on server
- Fix not all grass tiles update when updating a nearby voxel (ie it doesn't go into negative coordinates to scan for foliage updates) - Fix not all grass tiles update when updating a nearby voxel (ie it doesn't go into negative coordinates to scan for foliage updates)
- Fix typescript load error - Fix typescript load error
- Calculate bounding sphere for meshes by deforming vertices with bone default pose instead of no bone deform
Startup Performance Startup Performance
- Cache loaded typescript - Cache loaded typescript

View File

@ -94,6 +94,15 @@ public class ClientSceneWrapper {
return serverToClientIdMap.containsKey(id); return serverToClientIdMap.containsKey(id);
} }
/**
* Checks if the client->server map contains a given id
* @param id The client id
* @return true if there's a corresponding server id, false otherwise
*/
public boolean clientToServerMapContainsId(int id){
return clientToServerIdMap.containsKey(id);
}
/** /**
* Gets the entity provided a server-provided id * Gets the entity provided a server-provided id

View File

@ -11,6 +11,8 @@ import electrosphere.entity.btree.StateTransitionUtil.StateTransitionUtilItem;
import electrosphere.entity.state.collidable.Impulse; import electrosphere.entity.state.collidable.Impulse;
import electrosphere.entity.state.equip.ClientEquipState; import electrosphere.entity.state.equip.ClientEquipState;
import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.hitbox.HitboxCollectionState;
import electrosphere.entity.state.movement.FallTree;
import electrosphere.entity.state.movement.jump.ClientJumpTree;
import electrosphere.entity.state.rotator.RotatorTree; import electrosphere.entity.state.rotator.RotatorTree;
import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.attach.AttachUtils;
import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.collision.CollisionObjUtils;
@ -207,7 +209,6 @@ public class ClientAttackTree implements BehaviorTree {
false false
), ),
}); });
this.stateTransitionUtil.setAccountForSync(true);
} }
/** /**
@ -424,44 +425,45 @@ public class ClientAttackTree implements BehaviorTree {
return rVal; return rVal;
} }
boolean canAttack(String attackType){ /**
boolean rVal = true; * Checks if the tree can perform the specified attack
* @param attackType The attack type
* @return true if can attack, false otherwise
*/
private boolean canAttack(String attackType){
if(attackType == null){ if(attackType == null){
return false; return false;
} else if(state != AttackTreeState.IDLE){ }
if(state != AttackTreeState.IDLE){
//checks if we have a next move and if we're in the specified range of frames when we're allowed to chain into it //checks if we have a next move and if we're in the specified range of frames when we're allowed to chain into it
if( if(
currentMove != null && currentMove == null ||
currentMove.getNextMoveId() != null && currentMove.getNextMoveId() == null ||
!currentMove.getNextMoveId().equals("") && currentMove.getNextMoveId().equals("") ||
frameCurrent >= currentMove.getMoveChainWindowStart() && frameCurrent <= currentMove.getMoveChainWindowEnd() frameCurrent < currentMove.getMoveChainWindowStart() ||
frameCurrent > currentMove.getMoveChainWindowEnd()
){ ){
rVal = true; return false;
}
} else {
if(ClientEquipState.hasEquipState(parent)){
// ClientEquipState equipState = ClientEquipState.getEquipState(parent);
// if(equipState.hasEquipPrimary()){
// switch(attackType){
// case EntityDataStrings.ATTACK_MOVE_TYPE_MELEE_SWING_ONE_HAND:
// break;
// default:
// rVal = false;
// break;
// }
// } else {
// switch(attackType){
// case EntityDataStrings.ATTACK_MOVE_TYPE_MELEE_SWING_ONE_HAND:
// rVal = false;
// break;
// default:
// rVal = false;
// break;
// }
// }
} }
} }
return rVal; if(state == AttackTreeState.IDLE){
if(!ClientEquipState.hasEquipState(parent)){
return false;
}
}
if(ClientJumpTree.getClientJumpTree(parent) != null){
ClientJumpTree clientJumpTree = ClientJumpTree.getClientJumpTree(parent);
if(clientJumpTree.isJumping()){
return false;
}
}
if(FallTree.getFallTree(parent) != null){
FallTree fallTree = FallTree.getFallTree(parent);
if(fallTree.isFalling()){
return false;
}
}
return true;
} }
/** /**

View File

@ -17,6 +17,8 @@ import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeState;
import electrosphere.entity.state.collidable.Impulse; import electrosphere.entity.state.collidable.Impulse;
import electrosphere.entity.state.equip.ServerEquipState; import electrosphere.entity.state.equip.ServerEquipState;
import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.hitbox.HitboxCollectionState;
import electrosphere.entity.state.movement.ServerFallTree;
import electrosphere.entity.state.movement.jump.ServerJumpTree;
import electrosphere.entity.state.rotator.ServerRotatorTree; import electrosphere.entity.state.rotator.ServerRotatorTree;
import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.attach.AttachUtils;
import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.collision.CollisionObjUtils;
@ -469,47 +471,44 @@ public class ServerAttackTree implements BehaviorTree {
} }
/** /**
* Checks whether the entity can attack or not * Checks if the tree can perform the specified attack
* @param attackType The type of attack to perform * @param attackType The attack type
* @return true if it can attack, false otherwise * @return true if can attack, false otherwise
*/ */
private boolean canAttack(String attackType){ private boolean canAttack(String attackType){
boolean rVal = true;
if(attackType == null){ if(attackType == null){
return false; return false;
} else if(state != AttackTreeState.IDLE){ }
if(state != AttackTreeState.IDLE){
//checks if we have a next move and if we're in the specified range of frames when we're allowed to chain into it //checks if we have a next move and if we're in the specified range of frames when we're allowed to chain into it
if( if(
currentMove.getNextMoveId() != null && currentMove == null ||
!currentMove.getNextMoveId().equals("") && currentMove.getNextMoveId() == null ||
frameCurrent >= currentMove.getMoveChainWindowStart() && frameCurrent <= currentMove.getMoveChainWindowEnd() currentMove.getNextMoveId().equals("") ||
frameCurrent < currentMove.getMoveChainWindowStart() ||
frameCurrent > currentMove.getMoveChainWindowEnd()
){ ){
rVal = true; return false;
}
} else {
if(ServerEquipState.hasEquipState(parent)){
// ServerEquipState equipState = ServerEquipState.getEquipState(parent);
// if(equipState.hasEquipPrimary()){
// switch(attackType){
// case EntityDataStrings.ATTACK_MOVE_TYPE_MELEE_SWING_ONE_HAND:
// break;
// default:
// rVal = false;
// break;
// }
// } else {
// switch(attackType){
// case EntityDataStrings.ATTACK_MOVE_TYPE_MELEE_SWING_ONE_HAND:
// rVal = false;
// break;
// default:
// rVal = false;
// break;
// }
// }
} }
} }
return rVal; if(state == AttackTreeState.IDLE){
if(!ServerEquipState.hasEquipState(parent)){
return false;
}
}
if(ServerJumpTree.getServerJumpTree(parent) != null){
ServerJumpTree serverJumpTree = ServerJumpTree.getServerJumpTree(parent);
if(serverJumpTree.isJumping()){
return false;
}
}
if(ServerFallTree.getFallTree(parent) != null){
ServerFallTree serverFallTree = ServerFallTree.getFallTree(parent);
if(serverFallTree.isFalling()){
return false;
}
}
return true;
} }
/** /**

View File

@ -489,7 +489,7 @@ public class ImGuiEntityMacros {
} }
} }
} }
if(Globals.clientSceneWrapper.getScene().getEntityFromId(detailViewEntity.getId()) != null){ if(Globals.clientSceneWrapper.clientToServerMapContainsId(detailViewEntity.getId())){
//detailViewEntity is a client entity //detailViewEntity is a client entity
//get server entity //get server entity
int serverIdForClientEntity = Globals.clientSceneWrapper.mapClientToServerId(detailViewEntity.getId()); int serverIdForClientEntity = Globals.clientSceneWrapper.mapClientToServerId(detailViewEntity.getId());