358 {
359 if (CanDrop())
360 {
361 if (m_ActiveIndex == 0)
362 {
364 ItemBase item_in_hands =
ItemBase.Cast(player.GetHumanInventory().GetEntityInHands());
365 if ( item_in_hands && player.CanDropEntity( item_in_hands ) &&
GetGame().
GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !player.GetInventory().HasInventoryReservation(item_in_hands, null) )
366 {
367 if ( item_in_hands.GetTargetQuantityMax() < item_in_hands.GetQuantity() )
368 item_in_hands.SplitIntoStackMaxClient( null, -1 );
369 else
370 player.PhysicalPredictiveDropItem( item_in_hands );
371 m_MainWidget.FindAnyWidget("Cursor").Show( false );
372 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
373 return true;
374 }
375 }
376 else if ( GetFocusedContainer() )
377 {
378 return GetFocusedContainer().TransferItemToVicinity();
379 }
380 }
381 return false;
382 }
class GP5GasMask extends MaskBase ItemBase
proto native CGame GetGame()