Compare commits
No commits in common. "ad66573a20a21326a2458b436c403d61d87e785e" and "afb32921fcd030f1aee0182a6ab64f4d0cb96684" have entirely different histories.
ad66573a20
...
afb32921fc
|
@ -78,7 +78,7 @@ build_windows:
|
||||||
- DLL_FILES="$(ls overlay_experimental/System/*.cpp | tr "\n" " ")"; sed "s|overlay_experimental/System/\*.cpp|$DLL_FILES|g" -i *.bat
|
- DLL_FILES="$(ls overlay_experimental/System/*.cpp | tr "\n" " ")"; sed "s|overlay_experimental/System/\*.cpp|$DLL_FILES|g" -i *.bat
|
||||||
- DLL_FILES="$(ls dll/*.proto | tr "\n" " " | sed "s/.proto/.pb.cc/g")"; sed "s|dll/\*.cc|$DLL_FILES|g" -i *.bat
|
- DLL_FILES="$(ls dll/*.proto | tr "\n" " " | sed "s/.proto/.pb.cc/g")"; sed "s|dll/\*.cc|$DLL_FILES|g" -i *.bat
|
||||||
- DLL_FILES="$(ls steamclient_loader/*.cpp | tr "\n" " ")"; sed "s|steamclient_loader/\*.cpp|$DLL_FILES|g" -i *.bat
|
- DLL_FILES="$(ls steamclient_loader/*.cpp | tr "\n" " ")"; sed "s|steamclient_loader/\*.cpp|$DLL_FILES|g" -i *.bat
|
||||||
- sed "s| /MP12 | /MP4 |g" -i *.bat
|
- sed "s| /MP12 | /MP5 |g" -i *.bat
|
||||||
- export WINEDEBUG=-all
|
- export WINEDEBUG=-all
|
||||||
- wine cmd /c build_win_debug_experimental.bat
|
- wine cmd /c build_win_debug_experimental.bat
|
||||||
- mkdir debug_experimental
|
- mkdir debug_experimental
|
||||||
|
|
|
@ -45,17 +45,10 @@ bool Steam_GameServer::InitGameServer( uint32 unIP, uint16 usGamePort, uint16 us
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
if (logged_in) return false; // may not be changed after logged in.
|
if (logged_in) return false; // may not be changed after logged in.
|
||||||
if (!pchVersionString) pchVersionString = "";
|
|
||||||
|
|
||||||
std::string version(pchVersionString);
|
std::string version(pchVersionString);
|
||||||
version.erase(std::remove(version.begin(), version.end(), ' '), version.end());
|
version.erase(std::remove(version.begin(), version.end(), ' '), version.end());
|
||||||
version.erase(std::remove(version.begin(), version.end(), '.'), version.end());
|
version.erase(std::remove(version.begin(), version.end(), '.'), version.end());
|
||||||
try {
|
server_data.set_version(stoi(version));
|
||||||
server_data.set_version(std::stoi(version));
|
|
||||||
} catch (...) {
|
|
||||||
PRINT_DEBUG("InitGameServer: not a number: %s\n", pchVersionString);
|
|
||||||
server_data.set_version(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
server_data.set_ip(unIP);
|
server_data.set_ip(unIP);
|
||||||
server_data.set_port(usGamePort);
|
server_data.set_port(usGamePort);
|
||||||
|
|
|
@ -81,7 +81,7 @@ private:
|
||||||
std::map<std::string, int32> stats_cache_int;
|
std::map<std::string, int32> stats_cache_int;
|
||||||
std::map<std::string, float> stats_cache_float;
|
std::map<std::string, float> stats_cache_float;
|
||||||
|
|
||||||
std::map<std::string, std::vector<achievement_trigger>> achievement_stat_trigger;
|
std::map<std::string, achievement_trigger> achievement_stat_trigger;
|
||||||
|
|
||||||
unsigned int find_leaderboard(std::string name)
|
unsigned int find_leaderboard(std::string name)
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ Steam_User_Stats(Settings *settings, Local_Storage *local_storage, class SteamCa
|
||||||
std::string stat_name = ascii_to_lowercase(static_cast<std::string const&>(it["progress"]["value"]["operand1"]));
|
std::string stat_name = ascii_to_lowercase(static_cast<std::string const&>(it["progress"]["value"]["operand1"]));
|
||||||
trig.min_value = static_cast<std::string const&>(it["progress"]["min_val"]);
|
trig.min_value = static_cast<std::string const&>(it["progress"]["min_val"]);
|
||||||
trig.max_value = static_cast<std::string const&>(it["progress"]["max_val"]);
|
trig.max_value = static_cast<std::string const&>(it["progress"]["max_val"]);
|
||||||
achievement_stat_trigger[stat_name].push_back(trig);
|
achievement_stat_trigger[stat_name] = trig;
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -283,10 +283,8 @@ bool SetStat( const char *pchName, int32 nData )
|
||||||
|
|
||||||
auto stat_trigger = achievement_stat_trigger.find(stat_name);
|
auto stat_trigger = achievement_stat_trigger.find(stat_name);
|
||||||
if (stat_trigger != achievement_stat_trigger.end()) {
|
if (stat_trigger != achievement_stat_trigger.end()) {
|
||||||
for (auto &t : stat_trigger->second) {
|
if (stat_trigger->second.check_triggered(nData)) {
|
||||||
if (t.check_triggered(nData)) {
|
SetAchievement(stat_trigger->second.name.c_str());
|
||||||
SetAchievement(t.name.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,10 +310,8 @@ bool SetStat( const char *pchName, float fData )
|
||||||
|
|
||||||
auto stat_trigger = achievement_stat_trigger.find(stat_name);
|
auto stat_trigger = achievement_stat_trigger.find(stat_name);
|
||||||
if (stat_trigger != achievement_stat_trigger.end()) {
|
if (stat_trigger != achievement_stat_trigger.end()) {
|
||||||
for (auto &t : stat_trigger->second) {
|
if (stat_trigger->second.check_triggered(fData)) {
|
||||||
if (t.check_triggered(fData)) {
|
SetAchievement(stat_trigger->second.name.c_str());
|
||||||
SetAchievement(t.name.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -801,11 +801,11 @@ void Steam_Overlay::OverlayProc()
|
||||||
bool hidden = x.hidden && !achieved;
|
bool hidden = x.hidden && !achieved;
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text("%s", x.title.c_str());
|
ImGui::Text(x.title.c_str());
|
||||||
if (x.hidden) {
|
if (x.hidden) {
|
||||||
ImGui::Text("hidden achievement");
|
ImGui::Text("hidden achievement");
|
||||||
} else {
|
} else {
|
||||||
ImGui::TextWrapped("%s", x.description.c_str());
|
ImGui::TextWrapped(x.description.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (achieved) {
|
if (achieved) {
|
||||||
|
|
Loading…
Reference in New Issue