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

◆ HandleDropMagazine()

static bool HandleDropMagazine ( DayZPlayer player,
Magazine mag )
static

We don't care if a valid transform couldn't be found, we just want to preferably use it instead of placing on the player

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

255 {
256 vector m4[4];
258
260 GameInventory.PrepareDropEntityPos(player, mag, m4, false, -1);
261 InventoryLocation il_mag_next = new InventoryLocation;
262 il_mag_next.SetGround(mag, m4);
263 InventoryLocation il_mag_curr = new InventoryLocation;
264 if (mag.GetInventory().GetCurrentInventoryLocation(il_mag_curr))
265 {
266 return GameInventory.LocationSyncMoveEntity(il_mag_curr, il_mag_next);
267 }
268 else
269 {
270 Error("DayZPlayerUtils::HandleDropMagazine - cannot get current inv location of mag=" + mag);
271 return false;
272 }
273 }
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
static proto native bool PrepareDropEntityPos(EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1)
Finds a transformation for the item to be dropped to If the initial transforation overlaps with anoth...
script counterpart to engine's class Inventory
Определения Inventory.c:79
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
InventoryLocation.
Определения InventoryLocation.c:29
Определения EnMath3D.c:28
Определения EnConvert.c:106
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Определения EnMath3D.c:256

Перекрестные ссылки Error(), GameInventory::LocationSyncMoveEntity(), Math3D::MatrixIdentity4(), GameInventory::PrepareDropEntityPos() и InventoryLocation::SetGround().