diff --git a/spt/features/con_notify.cpp b/spt/features/con_notify.cpp index e01990020..a5610994b 100644 --- a/spt/features/con_notify.cpp +++ b/spt/features/con_notify.cpp @@ -1,4 +1,5 @@ #include "stdafx.hpp" +#include "game_detection.hpp" #include "..\feature.hpp" #include "visualizations\imgui\imgui_interface.hpp" @@ -49,7 +50,14 @@ static ConNotifyFeature spt_con_notify; bool ConNotifyFeature::ShouldLoadFeature() { - return true; + if (utils::DoesGameLookLikeSteampipe()) + { + return false; + } + else + { + return true; + } } void ConNotifyFeature::InitHooks() @@ -83,15 +91,12 @@ void ConNotifyFeature::LoadFeature() return;\ } \ \ - const char* devVal = developer->GetString(); \ - char* oldDev = new char[strlen(devVal) + 1]; \ - strcpy(oldDev, devVal); \ + auto oldDev = developer->GetFloat(); \ developer->SetValue(true); \ \ spt_con_notify.ORIG_##funcName(__VA_ARGS__); \ \ developer->SetValue(oldDev); \ - delete[] oldDev; \ return;\ } diff --git a/spt/utils/game_detection.cpp b/spt/utils/game_detection.cpp index f78ce9ccf..1eafc7b81 100644 --- a/spt/utils/game_detection.cpp +++ b/spt/utils/game_detection.cpp @@ -105,6 +105,15 @@ namespace utils return result; } + bool DoesGameLookLikeSteampipe() + { +#ifdef SSDK2013 + return true; +#else + return false; +#endif + } + bool DoesGameLookLikeEstranged() { static bool cached = false, result = false; diff --git a/spt/utils/game_detection.hpp b/spt/utils/game_detection.hpp index f5c8ec966..bd9c239eb 100644 --- a/spt/utils/game_detection.hpp +++ b/spt/utils/game_detection.hpp @@ -8,6 +8,7 @@ namespace utils bool DoesGameLookLikeBMSRetail(); bool DoesGameLookLikeBMSLatest(); bool DoesGameLookLikeBMSMod(); + bool DoesGameLookLikeSteampipe(); bool DoesGameLookLikeEstranged(); int DateToBuildNumber(const char* date_str); int GetBuildNumber();