Garry's Mod

Garry's Mod

510 ratings
LeyHitreg - Say No To Fake Hits!
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Scenic, Realism
File Size
Posted
38.611 KB
Feb 5 @ 1:20am
1 Change Note ( view )

Subscribe to download
LeyHitreg - Say No To Fake Hits!

Description
LeyHitreg - Say No To Fake Hits!

🛠 An open-source fix for Garry’s Mod hit registration issues! No more frustrating fake hits – this addon ensures hitboxes stay synced with player models for accurate combat mechanics.
https://github.com/Leystryku/LeyHitreg/

🎯 What This Addon Does
✅ Fixes misaligned hitboxes – No more shooting through enemies!
✅ Eliminates fake hitmarkers – Every shot you land actually counts.
✅ Reduces hitreg issues caused by lag or animation glitches.
✅ Optimized for PvP – Perfect for TTT, DarkRP, and competitive game modes.
✅ Plug-and-Play – Works out of the box, no complicated setup needed.

⚙️ How It Works
This addon adjusts the way hitboxes sync with player models, reducing the common issue where player animations don’t match the actual hitbox position. It ensures that when you hit an enemy, your shots register correctly, just like they should!

🛠 Installation & Compatibility
✅ Drag & Drop – Just subscribe and restart your server!
✅ Works with any gamemode – DarkRP, TTT, Sandbox, Murder, and more.
✅ No performance impact – Lightweight and efficient.
✅ Compatible with most addons – Doesn't interfere with other hitreg mods.

🔥 Why Use This?
If you've ever been frustrated by shooting an enemy and seeing blood splatter but no damage registering, this is the fix you need. LeyHitReg ensures that your shots count every time by keeping hitboxes perfectly in sync with the player models.

🤓Technical Explanation
Normally the game sends a packet to the server saying he wants to shoot a bullet and the entire hit registration/confirmation is done serverside, while the client tries to determine whether he hit/not using his own view of the game based on his tick. However, the data of the client and the server does not always match up. Therefore, the server uses certain algorithms to roll back the state depending on how much the user lagged. This is referred to as lag compensation. The main issue is, this kind of rollback isn't perfect especially since the server does not have all data and the two are not fully synced up.

That's the issue this addon tackles. To solve this, the client additionally tells the server whether his shot was a hit and which hit group he shot. This solves the issue since the client is the one dictating whether a shot was a hit. If the client doesn't send a shot then the game just does its normal serverside HitReg. Additionally, the server has validations for checking whether the shot being sent is reasonable to avoid exploitation, such as shooting through walls.

In addition, the addon uses the same way of networking as for the source engines movement packets (usercommands), recuding networking overhead and ensuring processing of the hit/miss shot signal from the client happens at a time-point closeby to processing of the players shot.
67 Comments
Matsilagi Apr 24 @ 9:48pm 
This addon breaks bullet spread and patterns
hawky_ Apr 22 @ 12:42pm 
optimization depending on the addons installed. Just tried Clientside Hitreg and it's a gamble of working properly or not in TTT2 with custom playermodels.
Balls Apr 3 @ 4:47am 
Why are you talking about optimization in description when "Clientside Hitreg" addon have same performance while being more accurate without any downgrade?
brothetoast Mar 13 @ 7:22am 
ill try it
Zydel Mar 9 @ 8:04am 
Interesting project, surely its nice to see its being open source since many weapon bases has their own hit registration system. This could be used as a base plugin to work around with other weapon bases. Would require a great lot of work though.
Thrax_Warrior Mar 3 @ 3:36pm 
breaks bullet spread
wiimeiser Feb 28 @ 4:28pm 
How does it even break spread, anyway?
62 Feb 27 @ 4:47am 
Not seeing the problem with arccw
Virgiliu314 Feb 26 @ 8:25am 
Everyone, this also affects ArcCW as well. Spread will be fucked if this is installed.
Agent228 Feb 26 @ 8:06am 
incompatible with arc9 :(