Merge pull request #35 from Dss0/dss0_fixes
Fixes to image decryption check, the game crashing with mods loaded and the latest steam update causing the game to crash
This commit is contained in:
commit
5294bc424a
@ -2908,24 +2908,15 @@ namespace Components
|
|||||||
|
|
||||||
// check if file should be skipped
|
// check if file should be skipped
|
||||||
auto skipFile = false;
|
auto skipFile = false;
|
||||||
if (!strncmp(&file[strlen(file) - 4], ".iwi", 4))
|
|
||||||
{
|
if (strlen(file) > 5 && ((strncmp(&file[strlen(file) - 4], ".iwi", 4) != 0)))
|
||||||
if (readSize > 3 && !memcmp(&fileBuffer[0], "IWi", 3))
|
|
||||||
{
|
{
|
||||||
skipFile = true;
|
skipFile = true;
|
||||||
}
|
}
|
||||||
}
|
else if (readSize >= 3 && (!memcmp(&fileBuffer[0], "IWi", 3)))
|
||||||
else if (strstr(file, "weapons"))
|
|
||||||
{
|
{
|
||||||
skipFile = true;
|
skipFile = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (readSize > 8 && *reinterpret_cast<std::uint32_t*>(&fileBuffer[4]) == 0xe9c9c447)
|
|
||||||
{
|
|
||||||
skipFile = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the header seems encrypted...
|
// if the header seems encrypted...
|
||||||
if (fileBuffer.size() > 4 && readSize == retval && !skipFile)
|
if (fileBuffer.size() > 4 && readSize == retval && !skipFile)
|
||||||
|
@ -175,11 +175,11 @@ namespace Steam
|
|||||||
size_t expectedParams = Proxy::ClientUser.paramSize("SpawnProcess");
|
size_t expectedParams = Proxy::ClientUser.paramSize("SpawnProcess");
|
||||||
if (expectedParams == 40) // Release
|
if (expectedParams == 40) // Release
|
||||||
{
|
{
|
||||||
Proxy::ClientUser.invoke<bool>("SpawnProcess", ourPath, cmdline.data(), 0, ourDirectory, gameID.bits, mod.data(), Proxy::AppId, 0, 0);
|
Proxy::ClientUser.invoke<bool>("SpawnProcess", ourPath, cmdline.data(), ourDirectory, gameID.bits, mod.data(), Proxy::AppId, 0, 0);
|
||||||
}
|
}
|
||||||
else if (expectedParams == 36) // Beta
|
else if (expectedParams == 36) // Beta
|
||||||
{
|
{
|
||||||
Proxy::ClientUser.invoke<bool>("SpawnProcess", ourPath, cmdline.data(), 0, ourDirectory, gameID.bits, mod.data(), 0, 0);
|
Proxy::ClientUser.invoke<bool>("SpawnProcess", ourPath, cmdline.data(), ourDirectory, gameID.bits, mod.data(), Proxy::AppId, 0, 0);
|
||||||
}
|
}
|
||||||
else if (expectedParams == 48) // Legacy, expects VAC blob
|
else if (expectedParams == 48) // Legacy, expects VAC blob
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user