I run a Stronghold server where ScalePlayerDamage and PlayerTraceAttack are vital to the gameplay, it seems like the recent source engine update broke them.
Anyone else having these issues or know what's going on better than I do?
I can confirm that these hooks are broken with the last GMod update.
Our server is suffering too.
It's ScalePlayerDamage not PlayerScaleDamage, just saying.
Ya, anyway, temporary hackish fix until Garry releases a proper update.
[code]function GM:EntityTakeDamage( ent, inflictor, attacker, amount, dmginfo )
if ( ent:IsPlayer() ) then
hitgroup = HITGROUP_GENERIC;
if ( IsValid(attacker) ) then
hitgroup = attacker:GetEyeTrace().HitGroup;
end
hook.Call("ScalePlayerDamage", self, ent, hitgroup, dmginfo)
end
end[/code]
The hitgroup will likely be off unless you set it to use a method you do for spread on your weapons.
you should use hook.Call("ScalePlayerDamage", self, ent, hitgroup, dmginfo) instead, to maintain compatibility.
[QUOTE=Wizard of Ass;37280634]you should use hook.Call("ScalePlayerDamage", self, ent, hitgroup, dmginfo) instead, to maintain compatibility.[/QUOTE]
Ya, I don't have to worry about that with our code base. I went ahead and edited the temporary patch to include your suggestion.
This really stinks. I want my server to work again. :/
Well, someone needs to catch Garry's attention so he knows its broken.
I'm guessing this is why weapon damage in TTT is broken?
As since last update they are all doing 50% damage on chest shot & 150% damage on headshot.
[QUOTE=Kigen;37280528]Ya, anyway, temporary hackish fix until Garry releases a proper update.
[code]function GM:EntityTakeDamage( ent, inflictor, attacker, amount, dmginfo )
if ( ent:IsPlayer() ) then
hitgroup = HITGROUP_GENERIC;
if ( IsValid(attacker) ) then
hitgroup = attacker:GetEyeTrace().HitGroup;
end
hook.Call("ScalePlayerDamage", self, ent, hitgroup, dmginfo)
end
end[/code]
The hitgroup will likely be off unless you set it to use a method you do for spread on your weapons.[/QUOTE]
Line 4 should be
[code]if ( IsValid(attacker) and attacker:IsPlayer() )then[/code]
But other than that it's perfect, thanks a lot for the temporary fix. :smile:
[QUOTE=NaRyan;37304387]I'm guessing this is why weapon damage in TTT is broken?
As since last update they are all doing 50% damage on chest shot & 150% damage on headshot.[/QUOTE]
Tommynator posted a fix for this on the TTT forums, located [url=http://www.zombiemaster.org/smf/index.php?topic=11546.0]here[/url].
Sorry, you need to Log In to post a reply to this thread.