mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 02:14:15 +08:00
opt-in sharing leaderboards instead of opt-out
This commit is contained in:
parent
07f3c7a2d2
commit
04e7a7d476
@ -6,7 +6,7 @@
|
||||
the script will attempt to detect and use the built-in tool `sudo` if it was available
|
||||
* share leaderboards scores with connected players, adjust players ranks locally, and sort entries as needed by the game, suggested by **[M4RCK5]**
|
||||
this will only work when people connected on the same network are playing the same game, once they disconnect their leaderboard entry will be lost (no data persistence for other players), also doesn't work well with VPN clients.
|
||||
could be disabled via `disable_sharing_leaderboards.txt`
|
||||
this behavior could be enabled via `share_leaderboards_over_network.txt`
|
||||
* implemented the missing interface `ISteamGameServerStats`, allowing game servers to exchange user stats & achievements with players
|
||||
could be disabled via `disable_sharing_stats_with_gameserver.txt`
|
||||
* for windows: updated stub drm patterns and added a workaround for older variants,
|
||||
|
@ -247,8 +247,8 @@ public:
|
||||
|
||||
// allow Steam_User_Stats::FindLeaderboard() to always succeed and create the given unknown leaderboard
|
||||
bool disable_leaderboards_create_unknown = false;
|
||||
// don't share leaderboards with other players playing the same game on the same network
|
||||
bool disable_sharing_leaderboards = false;
|
||||
// share leaderboards with other players playing the same game on the same network
|
||||
bool share_leaderboards_over_network = false;
|
||||
|
||||
// don't share stats and achievements with the game server
|
||||
bool disable_sharing_stats_with_gameserver = false;
|
||||
|
@ -1238,7 +1238,7 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
bool achievement_bypass = false;
|
||||
bool is_beta_branch = false;
|
||||
bool disable_leaderboards_create_unknown = false;
|
||||
bool disable_sharing_leaderboards = false;
|
||||
bool share_leaderboards_over_network = false;
|
||||
bool disable_sharing_stats_with_gameserver = false;
|
||||
bool use_gc_token = false;
|
||||
bool enable_new_app_ticket = false;
|
||||
@ -1287,8 +1287,8 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
disable_account_avatar = true;
|
||||
} else if (p == "disable_leaderboards_create_unknown.txt") {
|
||||
disable_leaderboards_create_unknown = true;
|
||||
} else if (p == "disable_sharing_leaderboards.txt") {
|
||||
disable_sharing_leaderboards = true;
|
||||
} else if (p == "share_leaderboards_over_network.txt") {
|
||||
share_leaderboards_over_network = true;
|
||||
} else if (p == "disable_sharing_stats_with_gameserver.txt") {
|
||||
disable_sharing_stats_with_gameserver = true;
|
||||
} else if (p == "achievements_bypass.txt") {
|
||||
@ -1375,8 +1375,8 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
settings_client->disable_leaderboards_create_unknown = disable_leaderboards_create_unknown;
|
||||
settings_server->disable_leaderboards_create_unknown = disable_leaderboards_create_unknown;
|
||||
|
||||
settings_client->disable_sharing_leaderboards = disable_sharing_leaderboards;
|
||||
settings_server->disable_sharing_leaderboards = disable_sharing_leaderboards;
|
||||
settings_client->share_leaderboards_over_network = share_leaderboards_over_network;
|
||||
settings_server->share_leaderboards_over_network = share_leaderboards_over_network;
|
||||
|
||||
settings_client->disable_sharing_stats_with_gameserver = disable_sharing_stats_with_gameserver;
|
||||
settings_server->disable_sharing_stats_with_gameserver = disable_sharing_stats_with_gameserver;
|
||||
|
@ -273,7 +273,7 @@ unsigned int Steam_User_Stats::cache_leaderboard_ifneeded(const std::string &nam
|
||||
|
||||
void Steam_User_Stats::send_my_leaderboard_score(const Steam_Leaderboard &board, const CSteamID *steamid, bool want_scores_back)
|
||||
{
|
||||
if (settings->disable_sharing_leaderboards) return;
|
||||
if (!settings->share_leaderboards_over_network) return;
|
||||
|
||||
const auto my_entry = board.find_recent_entry(settings->get_local_steam_id());
|
||||
Leaderboards_Messages::UserScoreEntry *score_entry_msg = nullptr;
|
||||
@ -308,7 +308,7 @@ void Steam_User_Stats::send_my_leaderboard_score(const Steam_Leaderboard &board,
|
||||
|
||||
void Steam_User_Stats::request_user_leaderboard_entry(const Steam_Leaderboard &board, const CSteamID &steamid)
|
||||
{
|
||||
if (settings->disable_sharing_leaderboards) return;
|
||||
if (!settings->share_leaderboards_over_network) return;
|
||||
|
||||
auto board_info_msg = new Leaderboards_Messages::LeaderboardInfo();
|
||||
board_info_msg->set_allocated_board_name(new std::string(board.name));
|
||||
@ -646,7 +646,7 @@ Steam_User_Stats::Steam_User_Stats(Settings *settings, class Networking *network
|
||||
if (!settings->disable_sharing_stats_with_gameserver) {
|
||||
this->network->setCallback(CALLBACK_ID_GAMESERVER_STATS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_stats, this);
|
||||
}
|
||||
if (!settings->disable_sharing_leaderboards) {
|
||||
if (settings->share_leaderboards_over_network) {
|
||||
this->network->setCallback(CALLBACK_ID_LEADERBOARDS_STATS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_leaderboards, this);
|
||||
}
|
||||
this->network->setCallback(CALLBACK_ID_USER_STATUS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_low_level, this);
|
||||
@ -658,7 +658,7 @@ Steam_User_Stats::~Steam_User_Stats()
|
||||
if (!settings->disable_sharing_stats_with_gameserver) {
|
||||
this->network->rmCallback(CALLBACK_ID_GAMESERVER_STATS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_stats, this);
|
||||
}
|
||||
if (!settings->disable_sharing_leaderboards) {
|
||||
if (settings->share_leaderboards_over_network) {
|
||||
this->network->rmCallback(CALLBACK_ID_LEADERBOARDS_STATS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_leaderboards, this);
|
||||
}
|
||||
this->network->rmCallback(CALLBACK_ID_USER_STATUS, settings->get_local_steam_id(), &Steam_User_Stats::steam_user_stats_network_low_level, this);
|
||||
|
@ -544,7 +544,7 @@ Check the example file.
|
||||
|
||||
## Sharing leaderboards scores over LAN:
|
||||
|
||||
By default the emu will mutually share leaderboards scores with people playing the same game on the same network, you can disable this option by adding the config file `disable_sharing_leaderboards.txt` inside your `steam_settings` folder.
|
||||
You can allow the emu to mutually share leaderboards scores with people playing the same game on the same network, by adding the config file `share_leaderboards_over_network.txt` inside your `steam_settings` folder.
|
||||
|
||||
This works best with real LAN, latency from VPN clients might break it.
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
Rename this file to disable_sharing_leaderboards.txt to disable sharing Leaderboards scroes with people playing the same game on the same network
|
@ -0,0 +1 @@
|
||||
Rename this file to share_leaderboards_over_network.txt to enable sharing Leaderboards scores with people playing the same game on the same network.
|
Loading…
x
Reference in New Issue
Block a user