Skip to content

Commit 41b83d5

Browse files
Fix tag aura and reach
1 parent bf88667 commit 41b83d5

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

Menu/Buttons.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,14 +621,14 @@ public class Buttons
621621

622622
new ButtonInfo { buttonText = "Tag Self", method =() => Advantages.TagSelf(), disableMethod =() => Movement.EnableRig(), toolTip = "Attempts to tags yourself."},
623623

624-
new ButtonInfo { buttonText = "Tag Aura", method =() => Advantages.PhysicalTagAura(), toolTip = "Moves your hand into nearby players when tagged."},
624+
new ButtonInfo { buttonText = "Tag Aura", method =() => Advantages.TagAura(), toolTip = "Moves your hand into nearby players when tagged."},
625625
new ButtonInfo { buttonText = "Grip Tag Aura <color=grey>[</color><color=green>G</color><color=grey>]</color>", method =() => Advantages.GripTagAura(), toolTip = "Moves your hand into nearby players when tagged and when holding <color=green>grip</color>."},
626626
new ButtonInfo { buttonText = "Joystick Tag Aura <color=grey>[</color><color=green>J</color><color=grey>]</color>", method =() => Advantages.JoystickTagAura(), toolTip = "Moves your hand into nearby players when tagged and when pressing <color=green>joystick</color>."},
627627

628628
new ButtonInfo { buttonText = "Tag Aura Gun", method =() => Advantages.TagAuraGun(), toolTip = "Gives a player tag aura."},
629629
new ButtonInfo { buttonText = "Tag Aura All", method =() => Advantages.TagAuraAll(), toolTip = "Gives all players tag aura."},
630630

631-
new ButtonInfo { buttonText = "Tag Reach", method =() => Advantages.TagReach(), toolTip = "Makes your hand tag hitbox larger."},
631+
new ButtonInfo { buttonText = "Tag Reach", method =() => Advantages.TagReach(), disableMethod =() => GorillaTagger.Instance.maxTagDistance = 1.2f, toolTip = "Makes your hand tag hitbox larger."},
632632

633633
new ButtonInfo { buttonText = "Tag Gun", method =() => Advantages.TagGun(), toolTip = "Tags whoever your hand desires."},
634634
new ButtonInfo { buttonText = "Flick Tag Gun", method =() => Advantages.FlickTagGun(), toolTip = "Moves your hand to wherever your hand desires in an attempt to tag whoever your hand desires."},

Mods/Advantages.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -266,26 +266,20 @@ public static void ChangeTagReachDistance(bool positive = true)
266266
GetIndex("ctrRange").overlapText = "Change Tag Reach Distance <color=grey>[</color><color=green>" + names[tagRangeIndex] + "</color><color=grey>]</color>";
267267
}
268268

269-
public static void PhysicalTagAura()
269+
public static void TagAura()
270270
{
271271
foreach (VRRig vrrig in GorillaParent.instance.vrrigs)
272272
{
273-
Vector3 they = vrrig.headMesh.transform.position;
274-
Vector3 notthem = VRRig.LocalRig.head.rigTarget.position;
275-
float distance = Vector3.Distance(they, notthem);
276-
277-
if (PlayerIsTagged(VRRig.LocalRig) && !PlayerIsTagged(vrrig) && GorillaLocomotion.GTPlayer.Instance.disableMovement == false && distance < tagAuraDistance)
278-
if (rightHand == true) { GorillaLocomotion.GTPlayer.Instance.rightControllerTransform.position = they; } else { GorillaLocomotion.GTPlayer.Instance.leftControllerTransform.position = they; }
273+
if (PlayerIsTagged(VRRig.LocalRig) && !PlayerIsTagged(vrrig) && GorillaLocomotion.GTPlayer.Instance.disableMovement == false && Vector3.Distance(vrrig.headMesh.transform.position, GorillaTagger.Instance.bodyCollider.transform.position) < tagAuraDistance)
274+
ReportTag(vrrig);
279275
}
280276
}
281277

282278
public static void TagAuraPlayer(VRRig giving)
283279
{
284280
foreach (VRRig vrrig in GorillaParent.instance.vrrigs)
285281
{
286-
Vector3 they = vrrig.headMesh.transform.position;
287-
Vector3 notthem = giving.head.rigTarget.position;
288-
float distance = Vector3.Distance(they, notthem);
282+
float distance = Vector3.Distance(vrrig.headMesh.transform.position, giving.transform.position);
289283

290284
if (PlayerIsTagged(giving) && !PlayerIsTagged(vrrig) && GorillaLocomotion.GTPlayer.Instance.disableMovement == false && distance < tagAuraDistance && !PlayerIsLocal(vrrig) && PlayerIsTagged(VRRig.LocalRig))
291285
TagPlayer(RigManager.GetPlayerFromVRRig(vrrig));
@@ -323,34 +317,36 @@ public static void TagAuraGun()
323317
public static void TagAuraAll()
324318
{
325319
foreach (VRRig vrrig in GorillaParent.instance.vrrigs)
326-
{
327320
TagAuraPlayer(vrrig);
328-
}
329321
}
330322

331323
public static void GripTagAura()
332324
{
333325
if (rightGrab)
334-
PhysicalTagAura();
326+
TagAura();
335327
}
336328

337329
public static bool lastj;
338330
public static bool jta;
339331
public static void JoystickTagAura()
340332
{
341333
bool l = rightJoystickClick;
334+
342335
if (l && !lastj)
343336
jta = !jta;
337+
344338
lastj = l;
345339

346340
if (jta)
347-
PhysicalTagAura();
341+
TagAura();
348342
}
349343

350344
public static void TagReach()
351345
{
352346
if (PlayerIsTagged(VRRig.LocalRig))
353347
{
348+
GorillaTagger.Instance.maxTagDistance = float.MaxValue;
349+
354350
GorillaTagger.Instance.tagRadiusOverride = tagReachDistance;
355351
GorillaTagger.Instance.tagRadiusOverrideFrame = Time.frameCount + 16;
356352

PluginInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class PluginInfo
55
public const string GUID = "org.iidk.gorillatag.iimenu";
66
public const string Name = "ii's Stupid Menu";
77
public const string Description = "Created by @goldentrophy with love <3";
8-
public const string BuildTimestamp = "2025-08-09T03:56:58Z";
8+
public const string BuildTimestamp = "2025-08-09T04:19:51Z";
99
public const string Version = "6.8.1";
1010

1111
public const string BaseDirectory = "iisStupidMenu";

0 commit comments

Comments
 (0)