-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: disable trying to upload leaderboard data
- Loading branch information
Showing
6 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "Matchmaking.hpp" | ||
|
||
#include "Hook.hpp" | ||
#include "SAR.hpp" | ||
|
||
REDECL(Matchmaking::UpdateLeaderboardData); | ||
|
||
extern Hook g_UpdateLeaderboardDataHook; | ||
DETOUR(Matchmaking::UpdateLeaderboardData, KeyValues *a2) { | ||
return 0; | ||
} | ||
Hook g_UpdateLeaderboardDataHook(&Matchmaking::UpdateLeaderboardData_Hook); | ||
|
||
bool Matchmaking::Init() { | ||
if (!sar.game->Is(SourceGame_Portal2)) { | ||
#ifdef _WIN32 | ||
Matchmaking::UpdateLeaderboardData = (decltype(Matchmaking::UpdateLeaderboardData))Memory::Scan(matchmaking->Name(), "55 8B EC 83 EC 08 53 8B D9 8B 03 8B 50 08"); | ||
#else | ||
Matchmaking::UpdateLeaderboardData = (decltype(Matchmaking::UpdateLeaderboardData))Memory::Scan(matchmaking->Name(), "55 89 E5 57 56 53 83 EC 2C 8B 45 08 8B 5D 0C"); | ||
#endif | ||
|
||
g_UpdateLeaderboardDataHook.SetFunc(Matchmaking::UpdateLeaderboardData); | ||
} | ||
|
||
return this->hasLoaded; | ||
} | ||
void Matchmaking::Shutdown() { | ||
} | ||
|
||
Matchmaking *matchmaking; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
#include "Module.hpp" | ||
#include "Utils.hpp" | ||
|
||
class Matchmaking : public Module { | ||
public: | ||
// PlayerLocal::UpdateLeaderboardData | ||
DECL_DETOUR(UpdateLeaderboardData, KeyValues *a2); | ||
|
||
bool Init() override; | ||
void Shutdown() override; | ||
const char *Name() override { return MODULE("matchmaking"); } | ||
}; | ||
|
||
extern Matchmaking *matchmaking; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters