[PropHunt] Why you can shoot a prop dead-on, but it won't take damage?

I’m looking into programmatic reasons why this frustrating phenomenon can happen, especially (or even almost exclusively) with the smaller props like soda cans, water bottles, coffee cups, etc.

Story time!

You’re chasing a prop down the hallway, down the street, around the corners, all over the place, and they’ll be in completely plain sight to you - not like they’re hiding behind, around, or inside something, it’s just you chasing the prop in a wide-open area. Pull out the magnum and nail that pesky coffee cup square in the body, but it doesn’t take damage. Blood spurts out of it, indicating it was really hit, but it took no damage, and thus did not die.

So you pull out the shotgun and hit it with a few rounds. Several of them hit! Blood everywhere. But still the prop is running down the road, as if nothing happened. It taunts you.

The infernal coffee cup just won’t die. It lives by pure caffeinated shenanigans, blessed by the gods. You get out the SMG and unload 30 bullets right into it - it now looks like dirty, despicable, diabolical, and extremely questionable things have happened - blood is everywhere, someone must be missing a tampon or something. But STILL, that damn prop is running away from you.

Finally, you say “Fuck this!”, audibly and out loud, and launch the SMG grenade at it. Finally, it dies. All it took was a damn explosion. And amidst the sheer unadulterated humiliation, you weren’t even sure that would work. You were THAT close to starring in a modern Aesop fable about you and an indestructible coffee cup.


What I’m seeking is a programmatic cause for this, because I seek to find a fix for it. A way to explain why small props in this game seem to behave this way. I’m not sure what it is - friends have tossed up the term of hitboxing, and if that’s the case - what is it about the hitbox that causes it? Is the hitbox larger than the prop? Smaller? Positioned incorrectly on the prop’s model? Etc.

Anyone have thoughts or input?

Thank you in advance.

Lag and hitboxes.

Doubt you’ll find a fix. Probably just lag related. You see the blood on the clientside, probably as a result of prediction. I’ll bet other players watching don’t see you hit the prop at all. Especially true with smaller props, as prediction has more room for error.

I experience this when hosting the server application in my own LAN (my home) on a Dell PowerEdge T320… Gigabit switching, and the in-game ping (via the tab menu) reports a value of 5.

Could this still be the case? If so, then I’ll close this hope immediately cause it won’t get any better than that haha.

I may have a video of this occurring (or, may be able to produce one). I’ll look into that in the meantime to see if I can demonstrate it

Took me ages to figure out this particular bug.
It’s caused by the fact that a prop has 2 entities (one inside the other), both are affected by bullets, but only one of them actually takes damage.

You sir, have the answer. And I was able to make some code that I believe fixes it, after testing a few rounds. :smiley:

This did turn out to be the case too - I added a check into the EntityTakeDamage handler in init.lua to monitor damage taken by entities. Went in with a few friends, told them to become coffee mugs/soda cans and run around away from me. Once I saw the blood spatter, I went in and checked the output - lo and behold, it registered the damage taken, but it was not dealt to the prop so it didn’t subtract any health.

All I had to do was then “redirect” it to the prop instead. Here’s the simple code - add it in to the EntityTakeDamage function in init.lua (before the one that checks for hunters killing innocent props) and voila!


    if GAMEMODE:InRound() && ent && ent:IsPlayer() && ent:Alive() && ent:Team() == TEAM_PROPS && ent.ph_prop then
        --This next line is/was for debugging
        --print("!! " .. ent:Name() .. "'s PLAYER entity appears to have taken damage, we can redirect it to the prop! (Model is: " .. ent.ph_prop:GetModel() .. ")")
        ent.ph_prop:TakeDamageInfo(dmginfo)
        return
    end

Thank you very much for your help with this Blasteh. It’s amazing! :smiley:

In my travels through this gamemode, I would like to raise this post from the dead because it works perfectly. Encourages more diverse props to be used, and makes things a bit more fair for the hunters when they can do something whatsoever other than chuck a grenade in this situation.

My reason for necro’ing though:

I would love to see more servers implement this fix, if not the gamemode developer directly (though I doubt they’re active)… So I’m calling upon server administrators everywhere - fix this! It’s right here! :slight_smile:

[EDIT]
It was pointed out to me that Wolvin’s Enhanced Prop Hunt implemented the fix. Thank goodness! :smiley: Glad to see it.
[/EDIT]