Advertisement
Guest User

file end

a guest
Jul 15th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. event OnRGCQuickItemUpperHold(action : SInputAction)
  2. { (NOTE: This is line 1038 where it says after it has an unexpected file error)
  3. //RGC doesn't affect Ciri and is only applicable to gamepad users
  4. if(thePlayer.IsCiri() || !theInput.LastUsedGamepad())
  5. {
  6. return false;
  7. }
  8.  
  9. //quick item swapping is available while modifier is active
  10. if(GetWitcherPlayer().RGC_IsInRealtimeEquipCastMode())
  11. {
  12. //don't swap if released
  13. if(IsReleased(action))
  14. {
  15. return false;
  16. }
  17.  
  18. //validation of player
  19. if(thePlayer.IsInAir() || thePlayer.GetWeaponHolster().IsOnTheMiddleOfHolstering() )
  20. {
  21. return false;
  22. }
  23. if( thePlayer.IsSwimming() && !thePlayer.OnCheckDiving() && thePlayer.GetCurrentStateName() != 'AimThrow' )
  24. {
  25. return false;
  26. }
  27.  
  28. //validation of item
  29. itemId = thePlayer.GetSelectedItemId();
  30. if(!thePlayer.inv.IsIdValid(itemId) || !thePlayer.inv.IsItemCrossbow(itemId))
  31. {
  32. return false;
  33. }
  34.  
  35. //validate press
  36. if(IsPressed(action))
  37. {
  38. if(!IsActionAllowed(EIAB_Crossbow))
  39. {
  40. thePlayer.DisplayActionDisallowedHudMessage(EIAB_Crossbow);
  41. return false;
  42. }
  43. }
  44.  
  45. //on press
  46. if(IsPressed(action))
  47. {
  48. //set player state to throw hold
  49. thePlayer.SetThrowHold(true);
  50. return true;
  51. }
  52. else if(IsReleased(action) && thePlayer.IsThrowHold())
  53. {
  54. return true;
  55. }
  56.  
  57. return false;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement