Xan-NoSelfPing icon

NoSelfPing

"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.

By Xan
Last updated a year ago
Total downloads 109551
Total rating 6 
Categories Mods Tweaks
Dependency string Xan-NoSelfPing-1.0.0
Dependants 89 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.9 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.9
RiskofThunder-HookGenPatcher-1.2.1 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.1

README

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.