Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- event OnRGCQuickItemUpperHold(action : SInputAction)
- { (NOTE: This is line 1038 where it says after it has an unexpected file error)
- //RGC doesn't affect Ciri and is only applicable to gamepad users
- if(thePlayer.IsCiri() || !theInput.LastUsedGamepad())
- {
- return false;
- }
- //quick item swapping is available while modifier is active
- if(GetWitcherPlayer().RGC_IsInRealtimeEquipCastMode())
- {
- //don't swap if released
- if(IsReleased(action))
- {
- return false;
- }
- //validation of player
- if(thePlayer.IsInAir() || thePlayer.GetWeaponHolster().IsOnTheMiddleOfHolstering() )
- {
- return false;
- }
- if( thePlayer.IsSwimming() && !thePlayer.OnCheckDiving() && thePlayer.GetCurrentStateName() != 'AimThrow' )
- {
- return false;
- }
- //validation of item
- itemId = thePlayer.GetSelectedItemId();
- if(!thePlayer.inv.IsIdValid(itemId) || !thePlayer.inv.IsItemCrossbow(itemId))
- {
- return false;
- }
- //validate press
- if(IsPressed(action))
- {
- if(!IsActionAllowed(EIAB_Crossbow))
- {
- thePlayer.DisplayActionDisallowedHudMessage(EIAB_Crossbow);
- return false;
- }
- }
- //on press
- if(IsPressed(action))
- {
- //set player state to throw hold
- thePlayer.SetThrowHold(true);
- return true;
- }
- else if(IsReleased(action) && thePlayer.IsThrowHold())
- {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement