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

◆ NeedInventoryJunctureFromServer()

override bool ManBase::NeedInventoryJunctureFromServer ( notnull EntityAI item,
EntityAI currParent,
EntityAI newParent )
inlineprotected

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

5068 {
5069 if (g_Game.IsMultiplayer())
5070 {
5072 switch (t)
5073 {
5074 case DayZPlayerInstanceType.INSTANCETYPE_AI_SINGLEPLAYER:
5075 return false;
5076 case DayZPlayerInstanceType.INSTANCETYPE_CLIENT:
5077 case DayZPlayerInstanceType.INSTANCETYPE_SERVER:
5078 case DayZPlayerInstanceType.INSTANCETYPE_AI_SERVER:
5079 case DayZPlayerInstanceType.INSTANCETYPE_AI_REMOTE:
5080 case DayZPlayerInstanceType.INSTANCETYPE_REMOTE:
5081 return true; // Might help mitigate "megabugged" (desync)
5082
5083 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[syncinv] " + GetDebugName(this) + " STS=" + GetSimulationTimeStamp() + " NeedInventoryJunctureFromServer item=" + Object.GetDebugName(item) + " currPar=" + currParent + " newPar=" + newParent);
5084
5085 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
5086
5087 bool cp_owned = false;
5088 if (currParent)
5089 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
5090
5091 bool np_owned = false;
5092 if (newParent)
5093 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
5094
5095 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
5096 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[syncinv] " + GetDebugName(this) + " STS=" + GetSimulationTimeStamp() + " NeedInventoryJunctureFromServer=" + !all_owned + " i_pwn=" + i_owned + " cp_pwn=" + cp_owned + " np_pwn=" + np_owned);
5097
5098 return !all_owned;
5099 default:
5100 Error("[syncinv] unsupported instance type t=" + t);
5101 break;
5102 }
5103 }
5104 return false;
5105 }
void syncDebugPrint(string s)
DayZGame g_Game
Определения DayZGame.c:3942
override string GetDebugName()
Определения dayzplayer.c:1173
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1071
proto native DayZPlayerInstanceType GetInstanceType()
class LOD Object
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), g_Game, GetDebugName(), GetInstanceType(), LogManager::IsSyncLogEnable() и syncDebugPrint().