foliage serialization/deserialization
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
277b9b6ee3
commit
0eb002df82
@ -266,10 +266,10 @@
|
|||||||
"isDefault" : true
|
"isDefault" : true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Models/proceduralTree2/proceduralTree2v2.fbx": [
|
"Models/foliage/proceduralTree2/proceduralTree2v2.fbx": [
|
||||||
{
|
{
|
||||||
"meshName" : "Trunk",
|
"meshName" : "Trunk",
|
||||||
"diffuse" : "/Textures/foliage/proceduralTree2/Trunk.png",
|
"diffuse" : "/Models/foliage/proceduralTree2/Trunk.png",
|
||||||
"isDefault" : true
|
"isDefault" : true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#maven.buildNumber.plugin properties file
|
#maven.buildNumber.plugin properties file
|
||||||
#Fri Aug 16 19:38:51 EDT 2024
|
#Fri Aug 16 22:21:28 EDT 2024
|
||||||
buildNumber=258
|
buildNumber=259
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
+ on clearing the tutorial, continue the game when the sword is equipped, create another popup to teach sword controls. it pauses the game
|
+ on clearing the tutorial, continue the game when the sword is equipped, create another popup to teach sword controls. it pauses the game
|
||||||
+ when popup is accepted, spawn an enemy with an effect
|
+ when popup is accepted, spawn an enemy with an effect
|
||||||
Script engine ability to spawn entities
|
Script engine ability to spawn entities
|
||||||
|
Particles and particle manager
|
||||||
|
|
||||||
+ rearchitecture
|
+ rearchitecture
|
||||||
Quad tree implementation to support grass placement and eventually chunk LOD management
|
Quad tree implementation to support grass placement and eventually chunk LOD management
|
||||||
@ -17,6 +18,9 @@
|
|||||||
Ticketed randomizer node for BTs to more heavily weight attacking and waiting
|
Ticketed randomizer node for BTs to more heavily weight attacking and waiting
|
||||||
|
|
||||||
+ bug fixes
|
+ bug fixes
|
||||||
|
Fix anime outlines drawing over solid geometry
|
||||||
|
Fix anime outlines not drawing for first person pipeline
|
||||||
|
Fix cursor transparency rendering for cursor, skybox
|
||||||
Fix AI tracking deleted entity
|
Fix AI tracking deleted entity
|
||||||
Fix server ground movement tree playing animation over falling animation
|
Fix server ground movement tree playing animation over falling animation
|
||||||
Fix empty item slot not showing underneath dragged item
|
Fix empty item slot not showing underneath dragged item
|
||||||
|
|||||||
@ -603,6 +603,9 @@ Fix rotation not sending correctly on initialization of creatures on client
|
|||||||
Fix F2 menu not regaining controls when Xing menu instead of hitting F2 to close
|
Fix F2 menu not regaining controls when Xing menu instead of hitting F2 to close
|
||||||
Logger toggle debug window
|
Logger toggle debug window
|
||||||
|
|
||||||
|
(08/17/2024)
|
||||||
|
Foliage serialization/deserialization
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
|||||||
@ -87,8 +87,7 @@ public class InstancedActor implements Comparable<InstancedActor> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(InstancedActor o) {
|
public int compareTo(InstancedActor o) {
|
||||||
InstancedActor otherActor = (InstancedActor)o;
|
return this.priority - o.priority;
|
||||||
return this.priority - otherActor.priority;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import electrosphere.entity.Entity;
|
|||||||
import electrosphere.entity.EntityUtils;
|
import electrosphere.entity.EntityUtils;
|
||||||
import electrosphere.entity.state.equip.ServerEquipState;
|
import electrosphere.entity.state.equip.ServerEquipState;
|
||||||
import electrosphere.entity.state.inventory.InventoryUtils;
|
import electrosphere.entity.state.inventory.InventoryUtils;
|
||||||
import electrosphere.entity.types.attach.AttachUtils;
|
|
||||||
import electrosphere.entity.types.creature.CreatureEquipData.EquippedItem;
|
import electrosphere.entity.types.creature.CreatureEquipData.EquippedItem;
|
||||||
import electrosphere.entity.types.creature.CreatureTemplate;
|
import electrosphere.entity.types.creature.CreatureTemplate;
|
||||||
import electrosphere.entity.types.creature.CreatureUtils;
|
import electrosphere.entity.types.creature.CreatureUtils;
|
||||||
@ -66,10 +65,20 @@ public class ContentSerialization {
|
|||||||
rVal.serializedEntities.add(serializedEntity);
|
rVal.serializedEntities.add(serializedEntity);
|
||||||
}
|
}
|
||||||
if(StructureUtils.isStructure(entity)){
|
if(StructureUtils.isStructure(entity)){
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException("Not implemented");
|
||||||
}
|
}
|
||||||
if(FoliageUtils.isFoliage(entity)){
|
if(FoliageUtils.isFoliage(entity)){
|
||||||
throw new UnsupportedOperationException();
|
if(FoliageUtils.hasSeed(entity)){
|
||||||
|
EntitySerialization serializedEntity = new EntitySerialization();
|
||||||
|
serializedEntity.setPosition(EntityUtils.getPosition(entity));
|
||||||
|
serializedEntity.setRotation(EntityUtils.getRotation(entity));
|
||||||
|
serializedEntity.setType(FoliageUtils.ENTITY_TYPE_FOLIAGE);
|
||||||
|
serializedEntity.setSubtype(FoliageUtils.getFoliageType(entity).getName());
|
||||||
|
serializedEntity.setTemplate(FoliageUtils.getFoliageSeed(entity) + "");
|
||||||
|
rVal.serializedEntities.add(serializedEntity);
|
||||||
|
} else {
|
||||||
|
throw new UnsupportedOperationException("Not implemented");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,6 +130,11 @@ public class ContentSerialization {
|
|||||||
Entity object = ObjectUtils.serverSpawnBasicObject(realm, serializedEntity.getPosition(), serializedEntity.getSubtype());
|
Entity object = ObjectUtils.serverSpawnBasicObject(realm, serializedEntity.getPosition(), serializedEntity.getSubtype());
|
||||||
EntityUtils.getRotation(object).set(serializedEntity.getRotation());
|
EntityUtils.getRotation(object).set(serializedEntity.getRotation());
|
||||||
} break;
|
} break;
|
||||||
|
case FoliageUtils.ENTITY_TYPE_FOLIAGE: {
|
||||||
|
long seed = Long.parseLong(serializedEntity.getTemplate());
|
||||||
|
Entity foliage = FoliageUtils.serverSpawnTreeFoliage(realm, serializedEntity.getPosition(), serializedEntity.getSubtype(), seed);
|
||||||
|
EntityUtils.getRotation(foliage).set(serializedEntity.getRotation());
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user