Garry's Mod

Garry's Mod

540 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
5 Feb @ 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.
70 Comments
62 17 Jun @ 7:52am 
If you want bullet spread to still work try an older version of the addon that i edited slightly, see what you think:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3457208393

You must disable penetration in most weapon bases and it won't work with hl2 weapons though.

I would love feedback on any bugs and i will try fix em.
koishicat 17 Jun @ 7:29am 
bullet spread is a worthy sacrifice to not want to pull my hair out where nothing is hitting.
think of people who arent american ffs.
neto 12 Jun @ 8:35pm 
This addon breaks bullet spread and patterns
Matsilagi 24 Apr @ 9:48pm 
This addon breaks bullet spread and patterns
hawky_ 22 Apr @ 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 3 Apr @ 4:47am 
Why are you talking about optimization in description when "Clientside Hitreg" addon have same performance while being more accurate without any downgrade?
bob 13 Mar @ 7:22am 
ill try it
Zydel 9 Mar @ 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.
John 3:16 3 Mar @ 3:36pm 
breaks bullet spread
wiimeiser 28 Feb @ 4:28pm 
How does it even break spread, anyway?