609 {
611 {
612 return;
613 }
614
615#ifdef ENABLE_LOGGING
616 if (LogManager.IsSyncLogEnable())
617 {
619 }
620#endif
621
622 EntityAI itemInHands = GetEntityInHands();
623 if (!itemInHands)
624 {
625 return;
626 }
627
629
630 vector m4[4];
631 GetBoneTransformWS(boneIndex, m4);
632
633
634
635 GetInventory().DropEntityWithTransform(
InventoryMode.SERVER,
this, itemInHands, m4);
636
638 if (ceApi)
639 {
640 int deadBodyLifetime = ceApi.GetCEGlobalInt("CleanupLifetimeDeadPlayer");
641 if (deadBodyLifetime <= 0)
642 {
643 deadBodyLifetime = 3600;
644 }
645
646 itemInHands.SetLifetime(deadBodyLifetime);
647 }
648 }
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class CEItemProfile CEApi
API to interact with Central Economy.
proto native CEApi GetCEApi()
Get the CE API.
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)