Unlock AND drop.
278 {
279 InventoryLocation inventoryLocation = new InventoryLocation;
280 GetInventory().GetCurrentInventoryLocation(inventoryLocation);
281
282
283 if (
g_Game.IsMultiplayer())
284 {
285 parent.GetInventory().DropEntity(
InventoryMode.SERVER, parent,
this);
286 }
287 else
288 {
289 parent.GetInventory().DropEntity(
InventoryMode.LOCAL, parent,
this);
290 }
291
292 vector groundPos;
293 string slotName = InventorySlots.GetSlotName(inventoryLocation.
GetSlot());
294 if (parent.MemoryPointExists(
slotName))
295 {
296 groundPos = parent.ModelToWorld(parent.GetMemoryPointPos(
slotName));
297 }
298 else
299 {
301 }
302
304 PlaceOnSurface();
305 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
PlayerSpawnPreset slotName
proto native int GetSlot()
returns slot id if current type is Attachment
proto native void SetPosition(vector position)
Set the world position of the Effect.
vector GetPosition()
Get the world position of the Effect.