ai reset walking on disable
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-08-16 16:20:08 -04:00
parent 893752098e
commit c8fc089607
5 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
#Fri Aug 16 15:53:57 EDT 2024
buildNumber=253
#Fri Aug 16 16:06:50 EDT 2024
buildNumber=254

View File

@ -19,13 +19,14 @@
Ticketed randomizer node for BTs to more heavily weight attacking and waiting
+ bug fixes
Fix entities running to edge of map causing audio engine to break
Fix broken rendering pipeline when creating new level
Fix AI tracking deleted entity
Fix AI components not resetting on turning off ai manager
Fix being unable to jump sometimes (usually when pick up sword)
Fix server ground movement tree playing animation over falling animation
Fix ui alignment for item panels in inventory menus (ie dont have to place in corner)
Fix F2 menu not regaining controls when Xing menu instead of hitting F2 to close
Fix rotation not sending correctly on initialization of creatures on client
Fix grass rendering distance
+ unreproducible bugs
Fix entities running to edge of map causing audio engine to break

View File

@ -595,6 +595,7 @@ Fix terrain editing hard crashing engine
Fix attack animation mayyybe caching on non-local clients ??
Fix sword double-swing
Fix physics freakout for vertically aligned entities
Fix AI components not resetting on turning off ai manager
# TODO

View File

@ -5,6 +5,7 @@ import java.util.List;
import electrosphere.entity.Entity;
import electrosphere.entity.EntityDataStrings;
import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree;
import electrosphere.entity.types.creature.CreatureUtils;
import electrosphere.game.data.creature.type.ai.AITreeData;
import electrosphere.game.data.creature.type.ai.AttackerTreeData;
@ -154,5 +155,14 @@ public class AI {
public String getStatus(){
return this.status;
}
/**
* Resets key components
*/
protected void resetComponents(){
if(ServerGroundMovementTree.getServerGroundMovementTree(this.parent) != null){
ServerGroundMovementTree.getServerGroundMovementTree(this.parent).slowdown();
}
}
}

View File

@ -73,6 +73,13 @@ public class AIManager {
* @param isActive true to simulate ai each frame, false otherwise
*/
public void setActive(boolean isActive){
//turn off ai components if deactivating ai
if(this.active && !isActive){
for(AI ai : aiList){
ai.resetComponents();
}
}
//actually set
this.active = isActive;
}