rename client gravity tree name
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-06-18 21:04:54 -04:00
parent fbbd93df8d
commit 2b715ab325
6 changed files with 15 additions and 9 deletions

View File

@ -364,6 +364,12 @@ Develop debug ui for equip points
(06/18/2024)
Block state synchronization between client and server
Highlevel netcode gen updates
- Fix formatting for imports so it doesn't put an extra newline
- Fix formatting for function generation so it DOES put a new line when the function isn't being replaced
- Convert fields to using id variables so all behavior tree classes don't get git updates every time the ids shuffle
- Furthermore, keep tracking of the existing ids for trees and fields and only generate ids for new trees and fields
Fix client gravity tree name
# TODO

View File

@ -135,7 +135,7 @@ public class EntityDataStrings {
Gravity Entity
*/
public static final String GRAVITY_ENTITY = "gravityEntity";
public static final String TREE_GRAVITY = "treeGravity";
public static final String TREE_CLIENTGRAVITY = "treeClientGravity";
public static final String TREE_SERVERGRAVITY = "treeServerGravity";
/*

View File

@ -28,7 +28,7 @@ import electrosphere.net.synchronization.annotation.SyncedField;
import electrosphere.net.synchronization.annotation.SynchronizableEnum;
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
@SynchronizedBehaviorTree(name = "gravity", isServer = false, correspondingTree="serverGravity")
@SynchronizedBehaviorTree(name = "clientGravity", isServer = false, correspondingTree="serverGravity")
/**
* Tree for making the entity fall if there's nothing underneath it
*/
@ -207,9 +207,9 @@ public class ClientGravityTree implements BehaviorTree {
//!!WARNING!! from here below should not be touched
//This was generated automatically to properly alert various systems that the btree exists and should be tracked
parent.putData(EntityDataStrings.TREE_GRAVITY, rVal);
parent.putData(EntityDataStrings.TREE_CLIENTGRAVITY, rVal);
Globals.clientScene.registerBehaviorTree(rVal);
Globals.entityValueTrackingService.attachTreeToEntity(parent, BehaviorTreeIdEnums.BTREE_GRAVITY_ID);
Globals.entityValueTrackingService.attachTreeToEntity(parent, BehaviorTreeIdEnums.BTREE_CLIENTGRAVITY_ID);
return rVal;
}
/**
@ -221,7 +221,7 @@ public class ClientGravityTree implements BehaviorTree {
* @param tree The behavior tree to detach
*/
public static void detachTree(Entity entity, BehaviorTree tree){
Globals.entityValueTrackingService.detatchTreeFromEntity(entity, BehaviorTreeIdEnums.BTREE_GRAVITY_ID);
Globals.entityValueTrackingService.detatchTreeFromEntity(entity, BehaviorTreeIdEnums.BTREE_CLIENTGRAVITY_ID);
}
/**
* <p>
@ -231,7 +231,7 @@ public class ClientGravityTree implements BehaviorTree {
* @return The ClientGravityTree
*/
public static ClientGravityTree getClientGravityTree(Entity entity){
return (ClientGravityTree)entity.getData(EntityDataStrings.TREE_GRAVITY);
return (ClientGravityTree)entity.getData(EntityDataStrings.TREE_CLIENTGRAVITY);
}
/**
* <p> Automatically generated </p>

View File

@ -33,7 +33,7 @@ import electrosphere.net.synchronization.annotation.SyncedField;
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
import electrosphere.server.datacell.Realm;
@SynchronizedBehaviorTree(name = "serverGravity", isServer = true, correspondingTree="gravity")
@SynchronizedBehaviorTree(name = "serverGravity", isServer = true, correspondingTree="clientGravity")
/**
* Tree for making the entity fall if there's nothing underneath it
*/

View File

@ -11,7 +11,7 @@ public class BehaviorTreeIdEnums {
public static final int BTREE_SERVERBLOCKTREE_ID = 3;
public static final int BTREE_CLIENTEQUIPSTATE_ID = 4;
public static final int BTREE_SERVEREQUIPSTATE_ID = 5;
public static final int BTREE_GRAVITY_ID = 6;
public static final int BTREE_CLIENTGRAVITY_ID = 12;
public static final int BTREE_SERVERGRAVITY_ID = 7;
public static final int BTREE_IDLE_ID = 8;
public static final int BTREE_SERVERIDLE_ID = 9;

View File

@ -15,7 +15,7 @@ public class FieldIdEnums {
public static final int TREE_CLIENTBLOCKTREE_SYNCEDFIELD_CURRENTBLOCKVARIANT_ID = 7;
public static final int TREE_SERVERBLOCKTREE_SYNCEDFIELD_STATE_ID = 8;
public static final int TREE_SERVERBLOCKTREE_SYNCEDFIELD_CURRENTBLOCKVARIANT_ID = 9;
public static final int TREE_GRAVITY_SYNCEDFIELD_STATE_ID = 10;
public static final int TREE_CLIENTGRAVITY_SYNCEDFIELD_STATE_ID = 16;
public static final int TREE_SERVERGRAVITY_SYNCEDFIELD_STATE_ID = 11;
public static final int TREE_IDLE_SYNCEDFIELD_STATE_ID = 12;
public static final int TREE_SERVERIDLE_SYNCEDFIELD_STATE_ID = 13;