Garry's Mod

Garry's Mod

Clientside Hitreg
97 Comments
wget  [author] Oct 9 @ 10:05am 
@Goggles
that is a very odd error, it points to a line where it makes more sense for a previous line to trigger the error first

can you explain what the circumstances were so that it could be replicated
Spanospy Oct 9 @ 9:12am 
@goggles I'm betting one of your subscribed addons is messing with it. Share your collection :steamhappy:
Goggles Oct 9 @ 7:07am 
whats this mean

[clientside_hitreg] addons/clientside_hitreg/lua/marghitreg/sv_marghitreg.lua:889: attempt to index local 'ply' (a nil value)
1. v - addons/clientside_hitreg/lua/marghitreg/sv_marghitreg.lua:889
2. unknown - lua/includes/modules/hook.lua:102
ALE199 Oct 8 @ 2:15am 
I see and thanks again ^^
wget  [author] Oct 8 @ 2:02am 
@ALE199
just prevents the infinite loop by sort of inversing what zippy's thing does, shouldn't affect other addons that don't do the same thing
https://github.com/wgetJane/gmod-clientside-hitreg/commit/045d4553f0b60c1c4623d62ad584d24c42816787
thanks for reporting the issue
ALE199 Oct 8 @ 1:06am 
how did you fix it if I could ask?
ALE199 Oct 8 @ 1:06am 
Ok tested and it works perfectly! I'll try online with friends to see if it works with more than one person but I will say, you done gods work, great job man!
ALE199 Oct 8 @ 12:58am 
Also I will say it's very cool that you still are working on this, you've been very patient and helpful ^^
ALE199 Oct 8 @ 12:58am 
Alright I will and well Zippy turned off all his comments on steam (understandable tbh) but I don't wanna struggle with all the rigamarore to concact him so I hope someone else has this niche problem and askes him to fix it.
22050hz amen break sample Oct 7 @ 8:18pm 
they sure ain't the best practices i've seen
wget  [author] Oct 7 @ 6:22pm 
@ALE199
managed to figure out a fix, try to see if the infinite loop doesn't happen with Zippy's Impact Effects anymore
wget  [author] Oct 7 @ 9:20am 
@ALE199
just checked Zippy's Impact Effects and immediately found something bizarre in its autorun/enhanced_impact_effects.lua file:

local didCode = false
hook.Add("EntityFireBullets", "ZippyImpactEffects", function( ent, data )
if didCode then return end

data.Callback = -- a bunch of code

didCode = true
hook.Run("EntityFireBullets", ent, data)
didCode = false

return true
end)

this is some extremely problematic code, not sure what this is even trying to do, this can easily cause an infinite loop, which is what would cause a crash

there's nothing i can really do to fix this on my end, this is an issue with Zippy's Impact Effects, which should refactor this to use the PostEntityFireBullets hook, instead of whatever this is
ALE199 Oct 7 @ 7:48am 
I should mention if you play singleplayer, it doesn't crash but multiplayer even without another living soul, it will crash.

I turned off Zippy Effects and it doensn't crash.

So my logical conclusion: Something to do with Zippy stuff.
ALE199 Oct 7 @ 7:44am 
No need, I just tested it real quick and it doesn't work, I'm guessing it's Zippy Effect but LeyHitreg and that works fine with Zippy Effects.

Here's a bug for you, this is how I always achieve it: If you have Smorgasbord mod, fire at Bananas with the M16 in CS_Italy.

the game will crash.

So that's my basis if it does or doesn't work.
If it crashes when I shoot bananas in cs_Italy, it means this mod doesn't work even with the cvar provided.
ALE199 Oct 7 @ 7:36am 
Oh sorry I'll tell you later when I can get a friend to test it out together
wget  [author] Oct 7 @ 1:57am 
@ALE199
did the cvar work?
if not, i'll try to find the time to test compatibility with Zippy Effects, but i'm a little busy
wget  [author] Oct 5 @ 8:57pm 
@ALE199
try clhr_nofirebulletsincallback 0
ALE199 Oct 5 @ 4:48am 
Unfortunatly I do have to agree with Glebaas as this addon does have a negative effect on performance and is incompatible with mods such as:
-Enhanced Death Animation
-Enhanced Blood Splatter
-Zippy Effects*
(potentially Proximity Voice Chat)

Using it with those mods, causes a swift crash or frame rates to tank to hell.

I'm not sure why that happends, my own theory is (because we are using collection and we both use the same mods) is that Zippy effects and simmilar mods when you fire, it sends info to the client that "You hit there, make this effect, make this enemy bleed"
But let's say two people shoot the same thing, the server has three packets essentially saying to do the bleed effect and the particle effect for each client 2+ times, which all together causes the perfomance to drop but not directly.

it's not the addon it self that make the performance tank, rather it's a side effect.
wget  [author] May 18 @ 5:30pm 
@Glebaasツ
idk why it would, this addon doesnt do anything per-frame, it only does something when bullets are fired
it naturally uses a bit more memory and increases net usage, but only very minimally
there aren't memory leaks (like shot info tables being retained in memory forever) and the net messages are packed as tight as they can possibly be, you can check the code on github
Glebaasツ May 18 @ 8:08am 
Can this addon affect FPS and optimization in any way?
sadie! <3 May 14 @ 10:09am 
holy moly it even fixed the bullet penetration and particles are working now.
sadie! <3 May 14 @ 10:00am 
Fix seemed to have worked without a hitch. Thanks for the quick fix! <3
wget  [author] May 14 @ 12:22am 
@sadie! <3
thanks for reporting, can you check if the recent update fixes your issue
sadie! <3 May 13 @ 11:19pm 
[Clientside Hitreg] lua/marghitreg/sv_marghitreg.lua:1059: Tried to use a NULL entity!
1. unknown - [C]:-1
2. v - lua/marghitreg/sv_marghitreg.lua:1059
3. unknown - lua/includes/modules/hook.lua:102

It seems to be an issue only with SWCS, even with bullet penetration disabled.
wget  [author] May 13 @ 10:12pm 
@sadie! <3
can you send the errors
sadie! <3 May 13 @ 6:02pm 
For whatever reason, SWCS weapons work like a dream with this in sandbox, but cause errors, don't show up particles when i shoot things, and make bullet penetration inconsistent in TTT.
22050hz amen break sample Feb 23 @ 1:48am 
this remains goated because it doesn't break bullet spread unlike leyhitreg
wget  [author] Feb 7 @ 2:52am 
IMPORTANT!!!

now that leyhitreg was just recently made free and open source and available on the workshop ( https://steamcommunity.com/sharedfiles/filedetails/?id=3421440369 ), please do NOT use both leyhitreg and this addon at the same time

having both leyhitreg and this addon active at the same time will NOT somehow result in better hitreg if that's what you're thinking, it will actually just break a ton of things that nobody's gonna help you with, because they are not meant to be used together

you must install only either this addon or leyhitreg, so just use whichever one's most compatible with your server's set of addons
wget  [author] Feb 6 @ 3:26am 
btw code should be up on github now, which i should've done like 2 years ago
https://github.com/wgetJane/gmod-clientside-hitreg
Winn Feb 5 @ 1:55pm 
it was really weird, it happened once and then never again. thank you for your efforts though
wget  [author] Feb 5 @ 4:40am 
@Winn
i could not replicate this at all in any branch, can you be specific about the circumstances of the crash?
wget  [author] Jan 30 @ 9:39pm 
@Winn
very odd, this is a crash on the C-side of the game

what branch of gmod is the server on, main or 64-bit or dev?

also can you be more specific on how the crash happened? is it a vanilla hl2 gun shooting a strider?
Winn Jan 30 @ 6:43pm 
crashed while shooting a strider

Client
*Not in Lua call OR Lua has panicked*

Server
0. DispatchTraceAttack - [C]:-1
1. func - lua/marghitreg/sv_marghitreg.lua:1087
2. internal_call - lua/includes/modules/hook.lua:409
3. (null) - lua/includes/modules/hook.lua:428

MenuSystem
*Not in Lua call OR Lua has panicked*
wget  [author] Dec 4, 2024 @ 5:44pm 
@Loewenstern
yes, the addon only ever disables itself in single-player mode
Loewenstern Dec 4, 2024 @ 1:36pm 
does this work when hosting peer to peer?
wget  [author] Oct 20, 2024 @ 4:59am 
@Dr. House M.D.
can you paste in the error you're getting
Silly Driver Oct 19, 2024 @ 12:32pm 
I'm having issues where the add-on either partially loads and errors or simply refuses to load at all.

sv_allowcslua 1 fixes the add-on not loading at all problem, but it still randomly decides to show only three or four convars instead of all the ones listed in the description, as well as erroring when shooting things (indicating something is missing).

Add-on works fantastic for my needs, but I cannot for the life of me get it to reliably load without restarting the server several times. (tested without other add-ons enabled)
4GClaroARG Sep 28, 2024 @ 6:19am 
Thanks
wget  [author] Sep 27, 2024 @ 11:51pm 
@4GClaroARG it should, maybe set clhr_tolerance_ping to like 200

if you're playing in a private server with only friends then setting clhr_supertolerant 1 should be fine
4GClaroARG Sep 27, 2024 @ 7:13am 
Does this work well for players who have 200/250 ping? Because I have some players who play from the other side of the world.
wget  [author] Jun 25, 2024 @ 9:08am 
@SpawN (El Diablo)
this is a multiplayer-only addon, there's nothing it can possibly even do in singleplayer
[IG] Murlock Jun 25, 2024 @ 8:47am 
BUT FR, this can prob be done better than goto statments lol! this is rly funny to me :mortis:
[IG] Murlock Jun 25, 2024 @ 8:46am 
::loop::

print("WHY THE ♥♥♥♥ IS GOTO A THING IN LUA I HAD NO IDEA. IDK HOW TO FEEL ABOUT THIS")

goto loop
pixel0poprocks!! Jun 24, 2024 @ 5:34pm 
These do not work In singleplayer, It likely Isn't Intended to work In SP but I'd still like to see SP support.
pixel0poprocks!! Jun 9, 2024 @ 6:11pm 
I tested It and I determined that It's not any of my addons.
pixel0poprocks!! Jun 6, 2024 @ 4:32pm 
I'm not too sure then, I'll have to see to It myself l8tr
wget  [author] Jun 5, 2024 @ 11:19pm 
@SpawN (El Diablo)
just tested on the main and 64-bit versions and it works completely fine
pixel0poprocks!! Jun 5, 2024 @ 5:54pm 
I don't wanna bother with what addon prevents the addon from working, even then I also tried It with all of my addons disabled and still.
wget  [author] Jun 4, 2024 @ 10:27pm 
@SpawN (El Diablo)
most of the cvars are serverside, also are you sure that the addon is actually enabled? if it is then there might be a diff addon that's preventing this from working
pixel0poprocks!! Jun 4, 2024 @ 5:03pm 
I don't see the cvars In console.