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

◆ ThrowEntity()

bool HumanInventory::ThrowEntity ( EntityAI item,
vector dir,
float force )
inlineprivate

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

161 {
162 if (GetGame().IsServer() && GetGame().IsMultiplayer())
163 return false;
164
165 DayZPlayer player = DayZPlayer.Cast(item.GetHierarchyRootPlayer());
166 InventoryMode invMode = InventoryMode.PREDICTIVE;
167
168 if (player.NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), null))
169 invMode = InventoryMode.JUNCTURE;
170
171 InventoryLocation src = new InventoryLocation();
172 if (item && item.GetInventory() && item.GetInventory().GetCurrentInventoryLocation(src))
173 {
174 switch (src.GetType())
175 {
176 case InventoryLocationType.HANDS:
177 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ThrowEntity item=" + item);
178 HandEventThrow throwEvent = new HandEventThrow(GetManOwner(), src);
179 throwEvent.SetForce(dir * force);
180 HandEvent(invMode, throwEvent);
181 return true;
182
183 default:
184 DropEntity(invMode, player, item);
185 return true;
186 }
187 }
188 Error("No inventory location");
189 return false;
190 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
Man GetManOwner()
Определения HumanInventory.c:102
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
override bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
Определения HumanInventory.c:139
proto native int GetType()
returns type of InventoryLocation
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки DropEntity(), Error(), GetGame(), GetManOwner(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().