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

◆ DeathDropHandEntity()

void DayZPlayer::DeathDropHandEntity ( )
inlineprotected

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

606 {
607 if (!g_Game.IsServer())
608 {
609 return;
610 }
611
612#ifdef ENABLE_LOGGING
613 if (LogManager.IsSyncLogEnable())
614 {
615 syncDebugPrint("DZPI::OnSimulationEnd - trying to drop item");
616 }
617#endif
618
619 EntityAI itemInHands = GetEntityInHands();
620 if (!itemInHands)
621 {
622 return;
623 }
624
625 int boneIndex = GetBoneIndexByName("RightHand_Dummy");
626
627 vector m4[4];
628 GetBoneTransformWS(boneIndex, m4);
629
630 // TODO(kumarjac): Change to occur on the earlier event and drop with physics instead?
631 // aside from dynamic lifetime of entities being too low, physics is stable now.
632 GetInventory().DropEntityWithTransform(InventoryMode.SERVER, this, itemInHands, m4);
633
634 CEApi ceApi = GetCEApi();
635 if (ceApi)
636 {
637 int deadBodyLifetime = ceApi.GetCEGlobalInt("CleanupLifetimeDeadPlayer");
638 if (deadBodyLifetime <= 0)
639 {
640 deadBodyLifetime = 3600;
641 }
642
643 itemInHands.SetLifetime(deadBodyLifetime);
644 }
645 }
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:228
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:3942

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