Skip to content

Added signatures for x64 CS:S (Thanks to rumour) and replaced executable. Veltext seems to be working now. #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/data/games/cstrike_steam.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name=Counter-Strike: Source
steam_path=common\Counter-Strike Source\hl2.exe
steam_path=common\Counter-Strike Source\cstrike_win64.exe
args=-game cstrike
46 changes: 46 additions & 0 deletions src/svr_standalone/game_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ GameFnProxy game_get_player_by_index_proxy_1()
return px;
}

// For x64 CS:S. TF2 proxy works for now.
GameFnProxy game_get_player_by_index_proxy_2()
{
// Find UTIL_PlayerByIndex, use function (see Source 2013 SDK).

GameFnProxy px;
px.target = game_scan_pattern("client.dll", "40 53 48 83 EC ?? 8B D1", NULL);
px.proxy = game_player_by_index_proxy_0;
return px;
}

// ----------------------------------------------------------------

// For x86 CS:S.
Expand All @@ -262,6 +273,17 @@ GameFnProxy game_get_spec_target_proxy_1()
return px;
}

// For x64 CS:S. TF2 proxy works for now.
GameFnProxy game_get_spec_target_proxy_2()
{
// Find GetSpectatorTarget, use function.

GameFnProxy px;
px.target = game_scan_pattern("client.dll", "48 83 EC ?? E8 ?? ?? ?? ?? 48 85 C0 74 ?? 48 8B 10 48 8B C8 FF 92 ?? ?? ?? ?? 48 85 C0", NULL);
px.proxy = game_spec_target_proxy_0;
return px;
}

// ----------------------------------------------------------------

// For x86 CS:S.
Expand Down Expand Up @@ -484,6 +506,27 @@ GameFnProxy game_get_local_player_proxy_1()
return px;
}

// For x64 CS:S.
GameFnProxy game_get_local_player_proxy_2()
{
// Find C_BasePlayer::PostDataUpdate (or search "snd_soundmixer"), find global assignment to s_pLocalPlayer.

u8* addr = (u8*)game_scan_pattern("client.dll", "48 89 05 ?? ?? ?? ?? 48 8D 15 ?? ?? ?? ?? 48 8B 05", NULL);

if (addr == NULL)
{
return {};
}

addr += 3;
addr = (u8*)game_follow_displacement(addr, 4);

GameFnProxy px;
px.target = addr;
px.proxy = game_local_player_proxy_1;
return px;
}

// ----------------------------------------------------------------

// For x86 CS:GO.
Expand Down Expand Up @@ -889,12 +932,14 @@ GameProxyOpt GAME_PLAYER_BY_INDEX_PROXIES[] =
{
GameProxyOpt { SVR_IS_X86(), game_get_player_by_index_proxy_0, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_player_by_index_proxy_1, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_player_by_index_proxy_2, { "client.dll" }, 0 },
};

GameProxyOpt GAME_SPEC_TARGET_PROXIES[] =
{
GameProxyOpt { SVR_IS_X86(), game_get_spec_target_proxy_0, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_spec_target_proxy_1, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_spec_target_proxy_2, { "client.dll" }, 0 },
};

GameOverrideOpt GAME_END_MOVIE_OVERRIDES[] =
Expand Down Expand Up @@ -933,6 +978,7 @@ GameProxyOpt GAME_LOCAL_PLAYER_PROXIES[] =
{
GameProxyOpt { SVR_IS_X86(), game_get_local_player_proxy_0, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_local_player_proxy_1, { "client.dll" }, 0 },
GameProxyOpt { SVR_IS_X64(), game_get_local_player_proxy_2, { "client.dll" }, 0 },
};

GameProxyOpt GAME_SPEC_TARGET_OR_LOCAL_PLAYER_PROXIES[] =
Expand Down