actiondropitemsimple.c 567 B

12345678910111213141516171819202122232425262728293031323334
  1. class ActionDropItemSimple: ActionDropItem
  2. {
  3. void ActionDropItemSimple() {}
  4. override bool IsInstant()
  5. {
  6. return true;
  7. }
  8. override bool MainItemAlwaysInHands()
  9. {
  10. return false;
  11. }
  12. override bool CanBeUsedOnBack()
  13. {
  14. return true;
  15. }
  16. override void Start(ActionData action_data)
  17. {
  18. super.Start(action_data);
  19. #ifndef SERVER
  20. ClearInventoryReservationEx(action_data);
  21. PhysicalDropItem(action_data);
  22. #endif
  23. }
  24. override void PhysicalDropItem(ActionData action_data)
  25. {
  26. action_data.m_Player.PredictiveDropEntity(action_data.m_MainItem);
  27. }
  28. }