[TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on clients
I've tried to add command listeners for load_itempreset 0,1,2 and 3, but they never fire.
I can't find any serverside commands to override tf_respawn_on_loadoutchanges 0/1 for clients. Any ideas on how to block or force this? |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
Quote:
You could check their cvar and respond with the code you want. Take a look at this plugin I posted that already does this. https://forums.alliedmods.net/showthread.php?t=334971 |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
The server's CTFPlayer::CheckInstantLoadoutRespawn is responsible for respawning on loadout changes; you can supercede it with a detour.
(The loadout change notification is sent from client → game coordinator → server, so the usual client-server tactics don't apply here.) |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
Quote:
PHP Code:
PHP Code:
|
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
Quote:
What you can do is detour CTFPlayer::CheckInstantLoadoutRespawn and then patch the function call in pre-hook and restore the original bytes in post-hook. That's only if you want to do it per-player. If you just want to patch that function call for the server's whole lifespan, then you won't need to detour anything. In that case, you would just need the address of CTFPlayer::CheckInstantLoadoutRespawn and the offset of the "mov" instruction that passes the bool to the PointInRespawnRoom function call. |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
Fixed by the June 21 2022 update.
Quote:
Got it working with SourceScramble. Code:
"Games" |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
I don't have anything setup to do memory patching rn but I did investigate this a bit and the information above is correct, I was able to write out a messy patch for it here. https://github.com/rowedahelicon/TF2...ut-Respawn-Fix
There is a better way to do this and I'm sure someone will but if you still want *something* for now, here you go |
Re: [TF2] Blocking load_itempreset / forcing tf_respawn_on_loadoutchanges 0 on client
Quote:
On Windows, CTFPlayer::CheckInstantLoadoutRespawn has a unique signature of \x57\x8B\xF9\x8B\x07\x8B\x80\x04\x01\x00\x00\xFF\xD0\x84\xC0\x0F\x84\x2A\x2A\x2A\x2A\x8B\x07 as of build 7182415, and the offset 19h can be verified as \x6A\x00 and patched to \x6A\x01 to force the parameter to true. |
All times are GMT -4. The time now is 17:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.