NoSelfPing

v1.0.0·Updated 2023-01-11

"Wait, so this entire time you *didn't* actually want to attack yourself?..." -- This fixes a bug causing you to ping yourself at certain camera angles.

About this mod Author’s original text

No Self Ping

This mod fixes a bug that made it possible to ping yourself, printing funny (albeit annoying) messages like Xan wants to attack: Xan.

This is particularly useful for mods that add large character models, as the character model gets in the way of otherwise meaningful pings.

Modders

Modders, please note that this method bypasses PingerController.GeneratePingInfo such that its second call to Util.CharacterRaycast is redirected to a method implemented by my own code. This means that the hooks On.RoR2.Util.CharacterRaycast and On.RoR2.Util.HandleCharacterPhysicsCastResults will not execute if they are called via GeneratePingInfo (but other code that uses those methods, such as certain attacks and targeting sequences, will work fine as if nothing has happened).

Basically, if your code does anything with the raycasting specifically when pinging, sorry, this is not compatible. I would like to avoid such an intrusive change, but the IL code is incredibly messy and hard to keep track of without it. I just wanted to mention this since it poses a compatibility issue.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackRiskofThunder-HookGenPatcher

File & checksum

Filename
NoSelfPing-1.0.0.zip
File size
51.3 KiB