[GoldSource|CS 1.6] Fix avatar's on small resolution
//unicode patch for console
HexReplaceInLibrary("cstrike/cl_dlls/client.dll", "7ECC880A", "76CC880A", 0xCC, 0);
//www x 768<= tab avatar fixes
HexReplaceInLibrary("cstrike/cl_dlls/client.dll", "817C24CC00030000", "817C24CC01000000", 0xCC, 0);
HexReplaceInLibrary("cstrike/cl_dlls/client.dll", "3D000300CC8B4424CC", "3D010000CC8B4424CC", 0xCC, 0);
//wad files download fix
HexReplaceInLibrary("hw.dll", "1885C07403C600008D85", "1885C07414C600008D85", 0, 0);
//GetHullBounds Fix
HexReplaceInLibrary("hw.dll", "8B4C240433C02BC87406497403497505B801000000C3", "837C240401750B8B44240CC7400800000042B001C3C3", 0, 0);
related to Scorebar. https://hastebin.com/rilekuyijo.php
I guess developers need more information on how to fix this problem.
The game will not show player avatars if the height of the game window is less than 768 pixels. According to many, this is a very large number and you need to reduce it or remove this check at all.
The fix is required in the following functions:
- CCSClientScoreBoardDialog::AddHeader
- CCSClientScoreBoardDialog::AddSection
- CCSClientScoreBoardDialog::UpdatePlayerInfo
- CCSClientScoreBoardDialog::UpdatePlayerAvatar
void PatchStuff()
{
// Patch Unicode
uintptr_t ptr = (clso_addr + clso_st["_Z12ScrollTextUpv"])+0x1D2;
auto nint = *(uint8_t *)ptr;
modify_1((void*)ptr, 0x76, PAGE_EXECUTE_READWRITE);
nint = *(uint8_t *)ptr;
// Patch avatars
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog16UpdatePlayerInfoEv"])+0x140;
//ConsolePrintColor(0, 255,0, ">>>%d\n", *(uint32_t *)ptr);
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog11ShowAvatarsEv"])+0x27;
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog9AddHeaderEv"])+0xAA;
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog10AddSectionEii"])+0x1BB;
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog10AddSectionEii"])+0x475;
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
ptr = (clso_addr + clso_st["_ZN25CCSClientScoreBoardDialog18UpdatePlayerAvatarEiP9KeyValues"])+0x54;
modify_4((void*)ptr, 1, PAGE_EXECUTE_READWRITE);
}
void cOffset::modify_1(void *addr, uint8_t hexCode, int prot) {
addr = (void *)(((int)addr) & (-2));
ProtectAddr((void *)addr, PROT_READ | PROT_WRITE);
*(uint8_t *)addr = hexCode;
ProtectAddr((void *)addr, prot );
}
void cOffset::modify_2(void *addr, uint16_t hexCode, int prot) {
addr = (void *)(((int)addr) & (-2));
ProtectAddr((void *)addr, PROT_READ | PROT_WRITE);
*(uint16_t *)addr = hexCode;
ProtectAddr((void *)addr, prot );
}
void cOffset::modify_4(void *addr, uint32_t hexCode, int prot) {
addr = (void *)(((int)addr) & (-2));
ProtectAddr((void *)addr, PROT_READ | PROT_WRITE);
*(uint32_t *)addr = hexCode;
ProtectAddr((void *)addr, prot );
}
@mikela-valve there simple fix.
Thank's, waiting for fix.
This is added as of beta 8279. See my post here.
Im gonna test it in few day's. Wait please.
resolution 640x480 when on server 24 or less players avatars looks good, when 25 and more is not centered

@dager10 It's actually not centered in any of those, it just looks a bit better with the larger icon when the line height is larger. It's currently using a fixed amount of space for the avatar that doesn't vary with the line height, so when the lines are smaller the avatar is smaller as well and so sits more to the right in the column. I'll probably just make the avatar column dynamically size based on the line height so it always looks centered.
This should look better in beta build 8279.
According to my observations, avatars of players are displayed correctly at high and medium resolutions, but at low resolutions such as 800x600 or 640x480 avatars continue to shift only for spectators. Example below on gif:

Thanks @Splatt581. Spectator rows are handled differently from T/CT rows and I'd missed updating the initial width of the column for them. That should be fixed in the next update.
This should be fixed in the current beta. It did not require a full build so the build number is still 8279.
Problem with shift of avatars in spectator rows is still exists in latest beta build.
Ok, this is actually fixed now in beta. I had tested this in CS:CZ after the last fix and it seems that CZ handles the scoreboard differently than CS does so I didn't notice that CS still had the issue. Thanks @Splatt581!
I confirm, fixed.
Tested. This is bad fix. @mikela-valve
How to disable avatars altogether?
How to disable avatars altogether?
Why do you want to disable them?
Tits, pussies and other things that I see on avatars make it difficult to concentrate on the game.
@BUXPb That's a good question. Now that avatars are enabled for all screen sizes there's no way around having them there. I'm adding another cvar that you can use to disable them if you'd like either to avoid distraction or to have more space in the scoreboard.
scoreboard_showavatars will be 1 by default and 0 to disable showing avatars.
I'm adding another cvar that you can use to disable them if you'd like either to avoid distraction or to have more space in the scoreboard.
And then u ask about unnecessary cvars. No one game have this cvar, cs 1.6 also shouldnt, if he wanna play without avatar's he must download nonsteam version or smthng like that, and steam also have lil protection agains tits and dicks on avatars.
So. Ur solution is bad. Don't make avatar sizes fixed. They shown nice at 640x480, 800x600 and etc with dynamic size, just replace 768 to 0, and all. That's better. 2 - 10 player's on server, medium size, more player's avatar sizes automaticaly reduce to small and etc.