fix equip transform containing parent
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c06af65e46
commit
f60d83172d
@ -95,6 +95,12 @@ public class ServerEquipState implements BehaviorTree {
|
||||
String equipItemClass = ItemUtils.getEquipClass(inInventoryEntity);
|
||||
List<String> pointEquipClassList = point.getEquipClassWhitelist();
|
||||
boolean itemIsInPointWhitelist = pointEquipClassList.contains(equipItemClass);
|
||||
if(inInventoryEntity == null){
|
||||
throw new Error("In inventory entity is null!");
|
||||
}
|
||||
if(ItemUtils.getContainingParent(inInventoryEntity) == null){
|
||||
throw new Error("Containing parent is null!");
|
||||
}
|
||||
if(!hasEquipped && targetIsItem && itemIsInPointWhitelist){
|
||||
//hydrate inventory item
|
||||
String itemType = ItemUtils.getType(inInventoryEntity);
|
||||
|
||||
@ -398,6 +398,10 @@ public class ServerInventoryState implements BehaviorTree {
|
||||
ServerInventoryState.serverRemoveItemFromInventories(existingContainer,itemEnt);
|
||||
}
|
||||
|
||||
//set containing parent
|
||||
ItemUtils.setContainingParent(itemEnt, container);
|
||||
|
||||
//apply transforms
|
||||
if(containerType == InventoryProtocol.INVENTORY_TYPE_EQUIP){
|
||||
ServerEquipState equipState = ServerEquipState.getEquipState(container);
|
||||
EquipPoint point = equipState.getEquipPoint(slotId);
|
||||
|
||||
@ -11,9 +11,14 @@ import electrosphere.engine.loadingthreads.LoadingThread.LoadingThreadType;
|
||||
import electrosphere.engine.profiler.Profiler;
|
||||
import electrosphere.net.NetUtils;
|
||||
|
||||
/**
|
||||
* Engine initialization utils for testing
|
||||
*/
|
||||
public class EngineInit {
|
||||
|
||||
//The maximum number of frames to wait before failing the startup routine
|
||||
/**
|
||||
* The maximum number of frames to wait before failing the startup routine
|
||||
*/
|
||||
public static final int MAX_FRAMES_TO_WAIT = 100;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user