[TFC] Spy disguise not working after map change
On a fully updated SteamCmd Linux server without any plugins, it's not possible to disguise any more after a map change.
It can randomly start working again, but this isn't reproducible.
Protocol version 48 Exe version 1.1.2.2/Stdio (tfc) Exe build: 17:45:07 Apr 25 2013 (6027)
Updated with these commands:
app_set_config 90 mod tfc app_update 90 validate
Possibly related: bug fix for https://github.com/ValveSoftware/halflife/issues/1003
Another report here: http://steamcommunity.com/app/20/discussions/0/864975632348324162/
Not just Linux, windows too.
Protocol version 48 Exe version 1.1.2.2 (tfc) Exe build: 17:46:18 Apr 25 2013 (6027)
Have you also tested it on TFC Beta using "app_update 90 -beta beta validate"? Just to compare the difference.
RoboCop, I did some testing just now, same issue in the beta.
] rcon version Protocol version 48 Exe version 1.1.2.2/Stdio (tfc) Exe build: 10:03:21 Aug 8 2013 (6132)
Also did some testing on your servers. The bug appears on AvD and CTF, but not on Dusty4Ever (a dustbowl 24/7 server, so always same map).
Alfred, could you please increase priority for this bug and for https://github.com/ValveSoftware/halflife/issues/1070 (shooting multiple projectiles at once), I think these are the most annoying ones right now.
So 10 months later from the last post, and over a year from posting, is there any news on a fix for the two major bugs introduced during SteamCMD - double fire and spy disguises?
It looks like CBasePlayer::flLastDisguesChange in CBasePlayer;;TeamFortress_SpyDisguise() is not reset.
Code starts like this:
if (gpGlobals->time - CBasePlayer::flLastDisguesChange >= 1.0)
{
CBasePlayer::flLastDisguesChange = gpGlobals->time;
I would assume at map change, flLastDisguesChange holds the previous value, and thus, the check won't be true unless gpGlobals->time unless value is > to previous value of flLastDisguesChange + 1.
This bug is very much still an issue in the current stable version and is affecting a surge of players from the latest Steam Summer Sale.
Protocol version 48 Exe version 1.1.2.2/Stdio (tfc) Exe build: 13:12:29 Aug 29 2013 (6153)
Concerning the sourcecode @Arkshine is quoting, I can't seem to find public reference to that. Is TFC itself closed source?
Team Fortress Classic is closed source but the snippet is probably from reverse engineering the Linux server .so Is it possible to fix this with a plugin?
Arkshine is correct. flLastDisguesChange is a static local variable in the disguise function. It's never reset (and can't be reset since it's only accessible to that function) so it will stay at its last value from the previous map.
It's odd that they're using a static local for this. I'd have thought a member variable would be better suited here, since this affects all spies. If you timed it right, you could detect when another spy is disguising.
It's easy to fix and test, so hopefully whoever is assigned to this issue now will fix it.
this bug still seems to be prevalent. i experience it on some servers, and not on others. what is the fix?
thanks.
@battlemint The work-around is to use an old binary for TFC, from before SteamCMD was rolled out.
https://web.archive.org/web/20150418185206/http://forums.steampowered.com/forums/showthread.php?p=35217128
Thank you, pizzahut!
Can someone confirm whether this is fixed now? After today's update, I tried reproducing the bug on Windows with listen server (TFC main menu), SteamCMD and Steam Tools (Steam library). The bug didn't occur.
The double shoot bug is still present though.
Looks like it, there's code to reset the disguise time if it's greater than the current time:
if ( flLastDisguesChange > gpGlobals->time )
{
lLastDisguesChange = 0;
}
We may get some fixes after all.
I have no idea how I "unassigned alfred-valve". But as it's fixed now anyway, no matter. Closing issue.
How is that possible?