Open dwmtz opened 11 years ago
I'm also having this problem on both my desktop and laptop, and I also run Windows 7 x64 on both, it may be related to #220
EDIT: It prints the error in the chat box too, here is an example
Having this problem as well. Windows 7 x64.
I did some additional testing, I tried joining a team deathmatch server. It initially put me on the rebel team and attempted to set me to female_02. However, my model was still a combine soldier. When I tried to manually change my model to male_04, it changed me to the combine team as a combine soldier, and all subsequent attempts to change to a rebel character resulted in me receiving a warning Please wait 4 more seconds before trying to switch.
I have this problem too. It appears that the "cl_playermodel" config variable is getting set to just "models" instead of something like "models/female_01.mdl". You can work around this by hand-editing the "config.cfg" file in a text editor or by typing "cl_playermodel models/female_01.mdl" in the console.
edit: actually nope, that doesn't work. changing it to anything other than "combine_soldier" works in the setup gui but when you go to join a game, it reverts it back to combine_soldier and then says "please wait 5 more seconds before trying to switch" in the console.
Wrong. If you hook CHL2MP_Player::ChangeTeam() and check client's model cache, you'll see something like "models" instead of "models/police.mdl". As everyone knows slashes like ->/<- are delimiters for commandline arguments and it seems VALVE forgot to add quotes in source code. Debug:
ChangeTeam(3): 1->2 MDL: models/kleiner.mdl CACHE: models
So as you see MDL is old model and CACHE is new model set from ingame menu. And kleiner.mdl is valid model for my server)
Can you try this again? We've made lots of changes in this area to fix problems along this line. Make sure you're not enlisted in the games betas.
Still a problem. Even after wiping and reinstalling Steam and HL2MP from my drive.
In fact, I see the issue even without being connected to a server. If I go in to Options and try to change my skin and click "Ok", it reverts back to combine_soldier. On top of that, I also notice that if I change my spray, click "Ok", and go back into the options, the changes take effect. However, if I close out of HL2MP and go back, the spray changes revert back to spray_canned.
Sprays and purple textures from underwater/tank explosions were fixed in latest Source Engine update. WooHoo! But team selection is broken yet. Also (for developers) virtual table offsets were shifted again (from somewhere near CHL2MP_Player::ChangeTeam(int) and higher is -1 now - just like before steampipe beta update)
For those who use SM - version 1.6.0 works perfect.
Same problem here. Please fix this.
Bug still exists. Can't change model, it always reverts to combine_soldier. Please fix
I tried changing my model manually in both autoexec.cfg and config.cfg today. When I start HL2:DM and check the settings, it shows the correct model, but as soon as either I join a server, or save options, it reverts to combine soldier. I seem to be having the same problem with my spray selection. The platform I am running is Windows 7 x64. Within 24 hours I aim to try on the same computer under Ubuntu 12.04 to see if it suffers from the same issues.
I was still having no luck getting the player model to change away from combine soldier with any combination of autoexec.cfg and config.cfg.
A minute ago, I deleted HL2DM, and any traces I could find of appid 240 in the Steam folder. When I started HL2DM for the first time (after re-installing it) it still had all my graphics settings (where on earth are they stored?), but everything else had reset to default. On the default settings, I was still stuck as combine soldier, and every time I saved the settings it would revert back to it.
The line in config.cfg was cl_playermodel "models"
by default. I closed HL2DM and changed this to cl_playermodel "models/humans/group03/male_07.mdl"
. Aftter starting HL2DM again I discovered that I was now male_07, and any attempt to change away from this player model resulted in being reverted back to male_07.
I'm completely at a loss as to how this could be happening, but hopefully this information sheds light on something.
https://github.com/ValveSoftware/Source-1-Games/issues/263#issuecomment-16957961
2013/7/16 Jonathan Price notifications@github.com
I was still having no luck getting the player model to change away from combine soldier with any combination of autoexec.cfg and config.cfg.
A minute ago, I deleted HL2DM, and any traces I could find of appid 240 in the Steam folder. When I started HL2DM for the first time (after re-installing it) it still had all my graphics settings (where on earth are they stored?), but everything else had reset to default. On the default settings, I was still stuck as combine soldier, and every time I saved the settings it would revert back to it.
The line in config.cfg was cl_playermodel "models" by default. I closed HL2DM and changed this to cl_playermodel "models/humans/group03/male_07.mdl". Aftter starting HL2DM again I discovered that I was now male_07, and any attempt to change away from this player model resulted in being reverted back to male_07.
I'm completely at a loss as to how this could be happening, but hopefully this information sheds light on something.
— Reply to this email directly or view it on GitHubhttps://github.com/ValveSoftware/Source-1-Games/issues/263#issuecomment-21048478 .
Another player with this problem, this time under vista x64
I have tried renaming the config file that is the folder "steamapps\common\Half-Life 2 Deathmatch\hl2mp\cfg" & copying a config.cfg file from synergy (already had my chosen model set - male_02) Set this file to ready only & launch hl2:dm. The result is that on first check of options the player model is set correctly, however the player model in game is still showing as combine_soldier...
Not in any betas for this game.
Why is this still broken????? Its absolutely ridiculous that this isnt fixed yet.
Its bad enough there isnt some sort of basic Team selection GUI in hl2dm like there is in EVERY OTHER source game, now there is literally no way to change team other than using console commands and typing in the correct location of the models in yourself.
!!!!
just pick 1 from here http://steamcommunity.com/app/320/discussions/0/828935361241856800/ and make ur config readonly :\
We've been running this model chooser work around (players can set their model in chat using !model): https://github.com/foobarhl/sourcemod/blob/master/scripting/sm_modelchooser_hl2dm.sp but this issue continues to be a real nuisance.
@fletcherdvalve Any updates?
Yes thanks I know of the workaround and have been using them, I posted because I was annoyed having just formatted my computer and re-downloading hl2dm to find that this hasnt been fixed.
Dont you think its important for players to be able to change teams without having to use console commands Valve? If this was tf2 or CSS it would be fixed instantly and the community would be flaming and throwing a fit, us hl2dm players are so used to be kicked when we are down we just end up accepting it and watching the game die.
Valve too busy designing hats and props for TF2 and Dota to give 10 minutes to fix something pretty fucking important to HL2DM Team Deathmatch, seriously you probably only have to change a tiny bit of code (that being the directory where the game thinks the models are stored).
The apathy is disgusting.
Valve's support for this game is absolutely fucking deplorable. Some things that would probably be a 5 minute fix have gone ignored for years. Hell, EVERYTHING wrong with this game has been ignored for this long.
i tend to agree with y'all, my reported problem hasn't even been fixed for ages https://github.com/ValveSoftware/Source-1-Games/issues/498#issuecomment-48835846 and, yes the only workaround is to either use console commands, or use bind keys to change model, or to use the the hl2dm models changer plugin.
FIX THIS. How many years do we need to wait for this crap that should only be a 5 minute fix? This is downright infuriating, this should have been taken care of years ago. Doesn't anyone see how negligent Valve has been over the recent years? Seriously.
That's not really any way to approach this issue. This repo has been for documentation purposes only for quite some time now.
Their aware of the issue, but have been otherwise preoccupied.
Please try to be respectful on future comments. Thank you.
Too preoccupied for 3 years to do something that would take all but 5 minutes or less? Liar.
Valve doesn't look at anything. They are aware, but don't give a shit. They do not care, they never will. I will be respectful when they show some respect to the games and the people who have supported them all these years, and had to deal with the broken bullshit. HL2DM is nearly unplayable these days, mods are inheriting the horrid bugs, and there's no wonder why most source mods and games are dead aside from TF2 and CSGO. (Hell, TF2 is dying as well, thanks to the efforts to kill modding and how it's nearly impossible to run a stable TF2 SRCDS server anymore.)
Until Valve shows some respect to the people who are trying to help them fix their shit and improve their product, they can bite me. I will also continue to say Valve doesn't care until they prove they DO care.
I'm not the only one who's had to put up with more than a fair share of this crap over the years, and I personally am tired of it. Hell, if I had source code access to HL2DM I'd fix this crap myself now that I have the knowledge... but, oh wait... the SDK doesn't even work with Visual Studio 2015, and it's only a matter of time until 2013 becomes hard to obtain like previous VS versions. Fucking A+.
Why doesn't valve have a place where the community can actively submit bug reports for their games? Or any means for communication? Documentation purposes my ass. They just DON'T CARE. Got too fat and happy, and now has the corporate "too high to fall" arrogant attitude, living the life off the money they make off of micro-transactions and other peoples' games... no incentive to work on their own shit anymore. I used to respect Valve as a company, even considered working there at one point, but then I realized that it's probably not even worth it. I refuse to work for a company that treats their supporters like trash.
The cause seems to be outside of the Source SDK, so I can't fix it myself. Seems to be in the VGUI system for the multiplayer submenu. It sets cl_playermodel to "models" instead of the name of the model. Seems to be parsing the string incorrectly (likely due to the slashes).
GetClientConVarValue may be the culprit, or the VGUI function that populates the model list and sets the cl_playermodel CVAR.
Does ANYONE have a fix on this yet? Not a stupid workaround, A REAL FIX?
I've been looking at this issue recently along with a few others related to team selection. I've managed to create a proper selection menu so far, but nothing pretty yet.
Also had some luck getting a bit of a class selection implemented along with a selection menu. Will post updates as soon as I've got something worth looking at.
Hello HL2DM 2020!
I've been looking at this issue recently along with a few others related to team selection. I've managed to create a proper selection menu so far, but nothing pretty yet.
Also had some luck getting a bit of a class selection implemented along with a selection menu. Will post updates as soon as I've got something worth looking at.
Hello HL2DM 2020!
Thankfully this plugin has completely fixed the model change menu bug: https://gamebanana.com/gamefiles/7747
For me this issue seems fixed (player model selection stays and player model in game reflects selection), although I'm testing on Linux. Though, the selection in the menu will reset to spray_canned if the game is exited and started again.
HL2DM Version: Build Label: 5394425 # Uniquely identifies each build Network PatchVersion: 5394425 # Determines client and server compatibility Protocol version: 24 # High level network protocol version Server version: 5394425 Server AppID: 232370 Client version: 5394425 Client AppID: 320
System information: https://pastebin.com/qzzJSxfV
@StrikerMan780 is right though, I'm an amature programmer and I even figured out how to fix this issue.
In _src/game/server/hl2mp/hl2mpplayer.cpp change line 250 to this:
Q_snprintf( szReturnString, sizeof (szReturnString ), "cl_playermodel %s\n" );
For some reason Valve made the game deliberately change the players model to the combine model. This doesn't seem to fix the selection menu on options but it will keep your player model consistent with the last one that you set.
I think that the options menu is probably sending incorrect console commands which is why its just printing the the last model you selected.
Trying to set your playermodel to one that isn't set in the source code like models/kleiner.mdl
will result in your model not getting changed and the console printing your current model.
If anyone knows how to modify the options menu please let me know, I'm still getting used to modifying the source code and I'm not sure where everything is.
I hope this information has helped someone.
Q_snprintf( szReturnString, sizeof (szReturnString ), "cl_playermodel %s\n" );
This looks like undefined behaviour to me. Where is it getting the value of %s from? I see no format parameters. This looks to me like all it is doing is executing an invalid command, so the model doesn't get set back to combine_soldier.mdl when specifying an invalid model. (which would be very exploitable).
Valve needs to look into why engine->GetClientConVarValue (or something it calls) is messing things up.
@StrikerMan780 If you search for %s in hl2mp_player.cpp you will find three cases of Valve using it for the cl_playermodel console command. combine_soldier.mdl is getting set whenever hl2mp_player.cpp fails to validate the playermodels (ValidatePlayerModel( szModelName ) == false).
After messing around with this issue a lot its just clear that you need to completely rewrite how playermodels are handled in hl2mp_player.cpp. It's how I eventually fixed them in my game.
@Yushe Yes, but in all those instances they used additional arguments after the format string to satisfy the format specifier where your change doesn't satisfy the format specifier with additional arguments which @StrikerMan780 suspects will cause undefined behavior. szModelName and pszCurrentModelName is where you should be looking because that's what's being appended to cl_playermodel for szReturnString for the engine to subsequently send as client command. The original Q_snprintf and arguments in hl2mp.cpp seems to be fine, it's the aforementioned variables to think about.
@fletcherdvalve You're assigned to this, what's your progress on it?
lmao
how have you guys not fixed this yet?!! its been a decade!!!
So, after a while I installed the game again (on GNU/Linux), aaaaaaand it still happens.
Set model to female_01
, join a random Team Deathmatch server, it automatically changes to combine_soldier
. Every time, without fail.
This is not fixed, and still a basic annoying issue towards user experience. As someone explained in the past, this has to do with some command parsing change in the engine, making it to stop at the slash (/
) and thus affecting cl_playermodel
inputs, causing the game code to read and associate "models"
path to the Combine team, and setting a random Combine model as a fallback along switching team.
So I noticed this happening on my mod and it annoyed me enough to fix it myself by patching the binary.
In this issue it's mentioned that this happens on Linux which shouldn't be the case (unless you're running the Windows build through Proton?). The Linux binaries are already correct and the problem should only happen on Windows.
Essentially what's happening is Valve has a strcmp() that checks for an extra OS-specific path separator - on Windows this is \
.
The path is already normalized to use Unix separators before that, so on Windows it fails and never removes the extra slash.
I simply fixed it in a hex editor to replace that \
with /
instead.
Patched DLL is here: GameUI_6982830.zip The exact same file is currently used on both HL2DM and Source SDK 2013 Base Multiplayer so it should work for mods as well.
Valve - hopefully that helps enough for an official patch! Specifically this is happening in FindVMTFilesInFolder()
.
@TEAMJBMOD Although I won't replace a client DLL file to check due to its own inconveniences, I couldn't relate your explanation to the problem. In fact, it looks as opposite to it.
If the "path is already normalized before it" (assuming you mean the derived UI command after saving/applying settings -i.e. cl_playermodel models/humans/.../XXX.mdl
-) sent to the engine and server, why would such strcmp
related logic need to "remove the extra slash" at all, if the command is already correct and would be handled correctly once reaching ClientSettingsChanged
at the server DLL?
When, what seems to be happening (first slash being replaced by a null terminator, given such function always receives exact cl_playermodel models
inputs as we know) looks somewhat orthogonal to your explanation.
Could you clarify? Thanks.
COptionsSubMultiplayer::OnApplyChanges()
gets the active selected item from m_pModelList
with a forward slash embedded into it for some reason. As such, it changes cl_playermodel
to models//[selected model].mdl
, which somewhere along the line becomes models
.
literally forces my mod to be a combine.. yippie
The game keeps switching back to the combine_soldier model whenever I try to change the player model. Running on Windows 7 x64.