DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CopyOldPropertiesToNew()

override void MoveEquipToExistingItemAndDestroyOldRootLambda::CopyOldPropertiesToNew ( notnull EntityAI old_item,
EntityAI new_item )

We don't care if a valid transform couldn't be found, we just want to preferably use it instead of placing on the old item

См. определение в файле MiscGameplayFunctions.c строка 124

125 {
126 super.CopyOldPropertiesToNew(old_item, new_item);
127
128 InventoryLocation understash_src = m_NewLocation; // m_NewLocation is a backup of original old_item's src before the operation started
129
130 array<EntityAI> children = new array<EntityAI>;
131 old_item.GetInventory().EnumerateInventory(InventoryTraversalType.LEVELORDER, children);
132 int count = children.Count();
133 for (int i = 0; i < count; ++i)
134 {
135 EntityAI child = children.Get(i);
136 if (child)
137 {
138 InventoryLocation child_src = new InventoryLocation;
139 child.GetInventory().GetCurrentInventoryLocation(child_src);
140
141 InventoryLocation child_dst = new InventoryLocation;
142 //@TODO: modify _dst with place on gnd?
143
144 vector m4[4];
146
148 GameInventory.PrepareDropEntityPos(old_item, child, m4, false, -1);
149
150 child_dst.SetGround(child,m4);
151
152 m_Player.LocalTakeToDst(child_src, child_dst);
153
154 GetGame().RemoteObjectTreeCreate(child); // this forces server to send CreateVehicle Message to client. This is needed for preserving the appearance of network operations on client (so that DeleteObject(old) arrives before CreateVehicle(new)). @NOTE: this does not delete the object on server, only it's network representation.
155 }
156 }
157 }
DayZPlayer m_Player
Определения Hand_Events.c:42
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
Определения Building.c:6
static proto native bool PrepareDropEntityPos(EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1)
Finds a transformation for the item to be dropped to If the initial transforation overlaps with anoth...
script counterpart to engine's class Inventory
Определения Inventory.c:79
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
InventoryLocation.
Определения InventoryLocation.c:29
Определения EnMath3D.c:28
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:106
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
Определения gameplay.c:6
proto native CGame GetGame()
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Определения EnMath3D.c:256