actioninteractloopbase.c 959 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. class ActionInteractLoopBaseCB : ActionInteractBaseCB
  2. {
  3. bool CancelCondition()
  4. {
  5. if ( !m_ActionData )
  6. {
  7. return DefaultCancelCondition();
  8. }
  9. //SetCommand(DayZPlayerConstants.CMD_ACTIONINT_ACTIONLOOP);
  10. //Print("cancel condition enabled: " + GetState().ToString() );
  11. if ( !m_Interrupted && (GetState() == STATE_LOOP_LOOP || GetState() == STATE_LOOP_LOOP2) )
  12. {
  13. AnimatedActionBase action = AnimatedActionBase.Cast(m_ActionData.m_Action);
  14. action.Do(m_ActionData,m_ActionData.m_State);
  15. }
  16. return DefaultCancelCondition();
  17. }
  18. override void CreateActionComponent()
  19. {
  20. m_ActionData.m_ActionComponent = new CAInteract;
  21. }
  22. override void InitActionComponent()
  23. {
  24. super.InitActionComponent();
  25. EnableCancelCondition(true);
  26. }
  27. };
  28. class ActionInteractLoopBase : ActionInteractBase
  29. {
  30. void ActionInteractLoopBase()
  31. {
  32. m_CallbackClass = ActionInteractLoopBaseCB;
  33. m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
  34. }
  35. };