@@ -143,7 +143,7 @@ public static void SpamTagSelf()
143143
144144 public static void SpamTagGun ( )
145145 {
146- if ( rightGrab || Mouse . current . rightButton . isPressed )
146+ if ( GetGunInput ( false ) )
147147 {
148148 var GunData = RenderGun ( ) ;
149149 RaycastHit Ray = GunData . Ray ;
@@ -171,7 +171,7 @@ public static void SpamTagGun()
171171 }
172172 }
173173 }
174- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
174+ if ( GetGunInput ( true ) )
175175 {
176176 VRRig possibly = Ray . collider . GetComponentInParent < VRRig > ( ) ;
177177 if ( possibly && possibly != GorillaTagger . Instance . offlineVRRig && ! PlayerIsTagged ( possibly ) )
@@ -419,7 +419,7 @@ public static void DisableTagReach()
419419
420420 public static void TagGun ( )
421421 {
422- if ( rightGrab || Mouse . current . rightButton . isPressed )
422+ if ( GetGunInput ( false ) )
423423 {
424424 var GunData = RenderGun ( ) ;
425425 RaycastHit Ray = GunData . Ray ;
@@ -495,7 +495,7 @@ public static void TagGun()
495495 GorillaTagger . Instance . offlineVRRig . enabled = true ;
496496 }
497497 }
498- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
498+ if ( GetGunInput ( true ) )
499499 {
500500 VRRig possibly = Ray . collider . GetComponentInParent < VRRig > ( ) ;
501501 if ( possibly && possibly != GorillaTagger . Instance . offlineVRRig && ! PlayerIsTagged ( possibly ) )
@@ -527,13 +527,13 @@ public static void TagGun()
527527
528528 public static void UntagGun ( )
529529 {
530- if ( rightGrab || Mouse . current . rightButton . isPressed )
530+ if ( GetGunInput ( false ) )
531531 {
532532 var GunData = RenderGun ( ) ;
533533 RaycastHit Ray = GunData . Ray ;
534534 GameObject NewPointer = GunData . NewPointer ;
535535
536- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
536+ if ( GetGunInput ( true ) )
537537 {
538538 VRRig possibly = Ray . collider . GetComponentInParent < VRRig > ( ) ;
539539 if ( possibly && possibly != GorillaTagger . Instance . offlineVRRig && PlayerIsTagged ( possibly ) )
@@ -552,13 +552,13 @@ public static void UntagGun()
552552
553553 public static void FlickTagGun ( )
554554 {
555- if ( rightGrab || Mouse . current . rightButton . isPressed )
555+ if ( GetGunInput ( false ) )
556556 {
557557 var GunData = RenderGun ( ) ;
558558 RaycastHit Ray = GunData . Ray ;
559559 GameObject NewPointer = GunData . NewPointer ;
560560
561- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
561+ if ( GetGunInput ( true ) )
562562 {
563563 GorillaLocomotion . Player . Instance . rightControllerTransform . position = Ray . point + new Vector3 ( 0f , 0.3f , 0f ) ;
564564 }
@@ -864,13 +864,13 @@ public static void BattleBalloonSpam()
864864
865865 public static void BattleKillGun ( )
866866 {
867- if ( rightGrab || Mouse . current . rightButton . isPressed )
867+ if ( GetGunInput ( false ) )
868868 {
869869 var GunData = RenderGun ( ) ;
870870 RaycastHit Ray = GunData . Ray ;
871871 GameObject NewPointer = GunData . NewPointer ;
872872
873- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
873+ if ( GetGunInput ( true ) )
874874 {
875875 VRRig possibly = Ray . collider . GetComponentInParent < VRRig > ( ) ;
876876 if ( possibly && possibly != GorillaTagger . Instance . offlineVRRig )
@@ -921,13 +921,13 @@ public static void BattleKillAll()
921921
922922 public static void BattleReviveGun ( )
923923 {
924- if ( rightGrab || Mouse . current . rightButton . isPressed )
924+ if ( GetGunInput ( false ) )
925925 {
926926 var GunData = RenderGun ( ) ;
927927 RaycastHit Ray = GunData . Ray ;
928928 GameObject NewPointer = GunData . NewPointer ;
929929
930- if ( rightTrigger > 0.5f || Mouse . current . leftButton . isPressed )
930+ if ( GetGunInput ( true ) )
931931 {
932932 VRRig possibly = Ray . collider . GetComponentInParent < VRRig > ( ) ;
933933 if ( possibly && possibly != GorillaTagger . Instance . offlineVRRig )
0 commit comments