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

◆ DeathDropHandEntity()

void DayZPlayer::DeathDropHandEntity ( )
inlineprotected

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

609 {
610 if (!g_Game.IsServer())
611 {
612 return;
613 }
614
615#ifdef ENABLE_LOGGING
616 if (LogManager.IsSyncLogEnable())
617 {
618 syncDebugPrint("DZPI::OnSimulationEnd - trying to drop item");
619 }
620#endif
621
622 EntityAI itemInHands = GetEntityInHands();
623 if (!itemInHands)
624 {
625 return;
626 }
627
628 int boneIndex = GetBoneIndexByName("RightHand_Dummy");
629
630 vector m4[4];
631 GetBoneTransformWS(boneIndex, m4);
632
633 // TODO(kumarjac): Change to occur on the earlier event and drop with physics instead?
634 // aside from dynamic lifetime of entities being too low, physics is stable now.
635 GetInventory().DropEntityWithTransform(InventoryMode.SERVER, this, itemInHands, m4);
636
637 CEApi ceApi = GetCEApi();
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 LogManager EntityAI
class CEItemProfile CEApi
API to interact with Central Economy.
Определения CentralEconomy.c:229
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)
DayZGame g_Game
Определения DayZGame.c:4074

Перекрестные ссылки CEApi, g_Game, GetBoneIndexByName(), GetCEApi(), LogManager::IsSyncLogEnable() и syncDebugPrint().