Merge pull request #178 from diamante0018/cleanup-project-folder
README + Cleanup project folder
This commit is contained in:
@ -78,21 +78,9 @@ namespace Components
|
||||
|
||||
//Exception::SuspendProcess();
|
||||
|
||||
bool doFullDump = Flags::HasFlag("bigdumps") || Flags::HasFlag("reallybigdumps");
|
||||
/*if (!doFullDump)
|
||||
{
|
||||
if (MessageBoxA(nullptr,
|
||||
Utils::String::VA("%s\n\n" // errorStr
|
||||
"Would you like to create a full crash dump for the developers (this can be 100mb or more)?\nNo will create small dumps that are automatically uploaded.", errorStr),
|
||||
"IW4x Error!", MB_YESNO | MB_ICONERROR) == IDYES)
|
||||
{
|
||||
doFullDump = true;
|
||||
}
|
||||
}*/
|
||||
|
||||
MessageBoxA(nullptr, errorStr.data(), "ERROR", MB_ICONERROR);
|
||||
|
||||
if (doFullDump)
|
||||
if ( Flags::HasFlag("bigminidumps"))
|
||||
{
|
||||
Exception::SetMiniDumpType(true, false);
|
||||
}
|
||||
|
@ -111,8 +111,8 @@ namespace Components
|
||||
|
||||
Friends::SortList();
|
||||
|
||||
int notify = Dvar::Var("cl_notifyFriendState").get<int>();
|
||||
if (gotOnline && (notify == -1 || (notify == 1 && !Game::CL_IsCgameInitialized())) && !Dvar::Var("ui_streamFriendly").get<bool>())
|
||||
const auto notify = Dvar::Var("cl_notifyFriendState").get<bool>();
|
||||
if (gotOnline && (!notify || (notify && !Game::CL_IsCgameInitialized())) && !Dvar::Var("ui_streamFriendly").get<bool>())
|
||||
{
|
||||
Game::Material* material = Friends::CreateAvatar(user);
|
||||
Toast::Show(material, entry->name, "is playing IW4x", 3000, [material]()
|
||||
@ -578,14 +578,19 @@ namespace Components
|
||||
|
||||
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled() || Monitor::IsEnabled()) return;
|
||||
|
||||
Dvar::Register<bool>("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "");
|
||||
Dvar::Register<int>("cl_notifyFriendState", 1, -1, 1, Game::DVAR_FLAG_SAVED, "");
|
||||
Dvar::Register<bool>("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "Enable invisible mode for Steam");
|
||||
Dvar::Register<bool>("cl_notifyFriendState", true, Game::DVAR_FLAG_SAVED, "Update friends about current game status");
|
||||
|
||||
Command::Add("addFriend", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() <= 1) return;
|
||||
if (params->length() < 2u)
|
||||
{
|
||||
Logger::Print("Usage: %s <Steam ID in hexadecimal format>\n", params->get(0));
|
||||
return;
|
||||
}
|
||||
|
||||
SteamID id;
|
||||
id.bits = atoll(params->get(1));
|
||||
id.bits = std::strtoull(params->get(1), nullptr, 16);
|
||||
|
||||
Friends::AddFriend(id);
|
||||
});
|
||||
|
@ -241,14 +241,13 @@ namespace Components
|
||||
{
|
||||
if (Flags::HasFlag("dump"))
|
||||
{
|
||||
Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString);
|
||||
Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString, true);
|
||||
}
|
||||
|
||||
static std::string mapEntities;
|
||||
FileSystem::File ents(name + ".ents");
|
||||
if (ents.exists())
|
||||
{
|
||||
mapEntities = ents.getBuffer();
|
||||
const auto& mapEntities = ents.getBuffer();
|
||||
asset.mapEnts->entityString = const_cast<char*>(mapEntities.data());
|
||||
asset.mapEnts->numEntityChars = mapEntities.size() + 1;
|
||||
}
|
||||
|
@ -156,13 +156,13 @@ namespace Steam
|
||||
gameID.type = 1; // k_EGameIDTypeGameMod
|
||||
gameID.appID = Proxy::AppId & 0xFFFFFF;
|
||||
|
||||
char* modId = const_cast<char*>("IW4x");
|
||||
gameID.modID = *reinterpret_cast<unsigned int*>(modId) | 0x80000000;
|
||||
const char* modId = "IW4x";
|
||||
gameID.modID = *reinterpret_cast<const unsigned int*>(modId) | 0x80000000;
|
||||
|
||||
Interface clientUtils(Proxy::ClientEngine->GetIClientUtils(Proxy::SteamPipe));
|
||||
clientUtils.invoke<void>("SetAppIDForCurrentPipe", Proxy::AppId, false);
|
||||
|
||||
char ourPath[MAX_PATH] = { 0 };
|
||||
char ourPath[MAX_PATH] = {0};
|
||||
GetModuleFileNameA(GetModuleHandle(nullptr), ourPath, sizeof(ourPath));
|
||||
|
||||
char ourDirectory[MAX_PATH] = { 0 };
|
||||
|
Reference in New Issue
Block a user