View Single Post
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 03-26-2017 , 05:53   Re: [TF2] tf_ragdoll -> issues with m_flModelScale, also general loadout change issue
Reply With Quote #2

Funny thing is that I've also worked on custom ragdoll a while back, your loadout problem is simply from the netprop you mention in your code.
Code:
m_hRagWearables
http://steamcommunity.com/sharedfile.../?id=597605825
As you can see there, I attached my cosmetics to a custom ragdoll (not tf_ragdoll), but upon respawning I couldn't get my wearable back, and that's simply because they were on the ragdoll. However deleting the ragdoll (and so the wearables with it), I could respawn with my wearables, but then you may tell me, during your tests the ragdoll wasn't no longer there and so the wearables, but as you know the ragdoll is client-side handled, so it can disappear on your end, but the entity used to create it (tf_ragdoll), is still there on the server. So a fix to that would be to delete the tf_ragdoll entity upon re-spawning, and I'm pretty sure it's what the game does, and deleting the tf_ragdoll entity won't delete the ragdoll on client's end, the client will decide whenever it should be deleted.

But either way, your current approach of setting wearables is wrong, in SF2 upon replacing ragdoll to dispatch desired death effects, the ragdoll is set under that netprop on the client: SetEntPropEnt(client, Prop_Send, "m_hRagdoll", ent, 0);(it doesn't matter when you set it, as long it's in the same frame as the creation of the ragdoll entity).
And it automatically adds the wearables on client's end, and the game will also delete the tf_ragdoll entity whenever it's needed.

Now about the model scale, I doubt there's any way to set it, CTFRagdoll has m_flModelScale as datamap, but it means that it's not networked so it's pretty much useless. You can try it, but I doubt you'll get anything from it.
__________________

Last edited by Benoist3012; 03-26-2017 at 06:04.
Benoist3012 is offline