More cleanup
This commit is contained in:
parent
83d6ab2d6b
commit
39110c9db7
@ -300,5 +300,11 @@ namespace Components
|
|||||||
Logger::MessageMutex.lock();
|
Logger::MessageMutex.lock();
|
||||||
Logger::MessageQueue.clear();
|
Logger::MessageQueue.clear();
|
||||||
Logger::MessageMutex.unlock();
|
Logger::MessageMutex.unlock();
|
||||||
|
|
||||||
|
// Flush the console log
|
||||||
|
if (int fh = *reinterpret_cast<int*>(0x1AD8F28))
|
||||||
|
{
|
||||||
|
Game::FS_FCloseFile(fh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,15 @@ namespace Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == Game::XAssetType::ASSET_TYPE_STRINGTABLE)
|
||||||
|
{
|
||||||
|
if (FastFiles::Current() == "mp_cross_fire")
|
||||||
|
{
|
||||||
|
*restrict = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type == Game::XAssetType::ASSET_TYPE_MAP_ENTS)
|
if (type == Game::XAssetType::ASSET_TYPE_MAP_ENTS)
|
||||||
{
|
{
|
||||||
static std::string mapEntities;
|
static std::string mapEntities;
|
||||||
@ -117,7 +126,7 @@ namespace Components
|
|||||||
format = "maps/%s.d3dbsp";
|
format = "maps/%s.d3dbsp";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_strnicmp("mp_", mapname, 3) || mapname == "mp_nuked"s || mapname == "mp_bloc"s)
|
if (_strnicmp("mp_", mapname, 3) || mapname == "mp_nuked"s || mapname == "mp_bloc"s || mapname == "mp_cargoship"s || mapname == "mp_cross_fire"s)
|
||||||
{
|
{
|
||||||
// Adjust pointer to GameMap_Data
|
// Adjust pointer to GameMap_Data
|
||||||
Utils::Hook::Set<Game::GameMap_Data**>(0x4D90B7, &(Game::DB_XAssetPool[Game::XAssetType::ASSET_TYPE_GAME_MAP_SP].gameMapSP[0].data));
|
Utils::Hook::Set<Game::GameMap_Data**>(0x4D90B7, &(Game::DB_XAssetPool[Game::XAssetType::ASSET_TYPE_GAME_MAP_SP].gameMapSP[0].data));
|
||||||
@ -240,6 +249,9 @@ namespace Components
|
|||||||
Maps::AddDependency("co_hunted", "mp_storm");
|
Maps::AddDependency("co_hunted", "mp_storm");
|
||||||
Maps::AddDependency("mp_nuked", "iw4x_dependencies_mp");
|
Maps::AddDependency("mp_nuked", "iw4x_dependencies_mp");
|
||||||
Maps::AddDependency("mp_bloc", "iw4x_dependencies_mp");
|
Maps::AddDependency("mp_bloc", "iw4x_dependencies_mp");
|
||||||
|
Maps::AddDependency("mp_bloc", "iw4x_dependencies_mp");
|
||||||
|
Maps::AddDependency("mp_cargoship", "iw4x_dependencies_mp");
|
||||||
|
Maps::AddDependency("mp_cross_fire", "iw4x_dependencies_mp");
|
||||||
Maps::AddDependency("^(?!mp_).*", "iw4x_dependencies_mp"); // All maps not starting with "mp_"
|
Maps::AddDependency("^(?!mp_).*", "iw4x_dependencies_mp"); // All maps not starting with "mp_"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace Components
|
|||||||
{
|
{
|
||||||
// varXString = (varFxEffect + 256)
|
// varXString = (varFxEffect + 256)
|
||||||
//*(DWORD*)0x112B340 = (*(DWORD*)0x112B018) + 256;
|
//*(DWORD*)0x112B340 = (*(DWORD*)0x112B018) + 256;
|
||||||
DWORD thisFX = *(DWORD*)0x112B018;
|
//DWORD thisFX = *(DWORD*)0x112B018;
|
||||||
|
|
||||||
/*if (*(char*)(thisFX + 176) == 0 || *(char*)(thisFX + 176) == 4)
|
/*if (*(char*)(thisFX + 176) == 0 || *(char*)(thisFX + 176) == 4)
|
||||||
{
|
{
|
||||||
@ -354,7 +354,7 @@ namespace Components
|
|||||||
//#define Load_XStringPtr(x) Load_XStringPtr_(x); DBG(("wF: %s\n", **(DWORD**)varXString))
|
//#define Load_XStringPtr(x) Load_XStringPtr_(x); DBG(("wF: %s\n", **(DWORD**)varXString))
|
||||||
#define Load_XStringPtr Load_XStringPtr_
|
#define Load_XStringPtr Load_XStringPtr_
|
||||||
|
|
||||||
void Load_WeaponDef_CodC(int doLoad)
|
void Load_WeaponDef_CodC(int /*doLoad*/)
|
||||||
{
|
{
|
||||||
// setup structures we use
|
// setup structures we use
|
||||||
DWORD varWeaponDef = *(DWORD*)0x112A9F4;//*(DWORD*)0x112AE14;
|
DWORD varWeaponDef = *(DWORD*)0x112A9F4;//*(DWORD*)0x112AE14;
|
||||||
@ -825,7 +825,7 @@ namespace Components
|
|||||||
|
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
DWORD* varXString = (DWORD*)0x112B340;
|
//DWORD* varXString = (DWORD*)0x112B340;
|
||||||
|
|
||||||
if (varStuff[1] < 16 || varStuff[1] == 39)
|
if (varStuff[1] < 16 || varStuff[1] == 39)
|
||||||
{
|
{
|
||||||
@ -870,7 +870,7 @@ namespace Components
|
|||||||
AssetHandler::Relocate((DWORD)buffer + 172, 232, (DWORD)buffer + 168);
|
AssetHandler::Relocate((DWORD)buffer + 172, 232, (DWORD)buffer + 168);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Load_WeaponAttach(int doLoad)
|
void Load_WeaponAttach(int /*doLoad*/)
|
||||||
{
|
{
|
||||||
// setup structures we use
|
// setup structures we use
|
||||||
DWORD varWeaponAttach = *(DWORD*)0x112ADE0;//*(DWORD*)0x112AE14;
|
DWORD varWeaponAttach = *(DWORD*)0x112ADE0;//*(DWORD*)0x112AE14;
|
||||||
@ -894,7 +894,7 @@ namespace Components
|
|||||||
|
|
||||||
Utils::Hook gameWorldSpIntHook;
|
Utils::Hook gameWorldSpIntHook;
|
||||||
|
|
||||||
void GameWorldSpIntHookFunc(int doLoad)
|
void GameWorldSpIntHookFunc(int /*doLoad*/)
|
||||||
{
|
{
|
||||||
memset(*(void**)0x112AD7C, 0, 40);
|
memset(*(void**)0x112AD7C, 0, 40);
|
||||||
}
|
}
|
||||||
@ -980,17 +980,6 @@ namespace Components
|
|||||||
{
|
{
|
||||||
ffVersion = fileVersion;
|
ffVersion = fileVersion;
|
||||||
|
|
||||||
// patch the expected version
|
|
||||||
int version = (iw5) ? 316 : 276;
|
|
||||||
|
|
||||||
if (iw5 && fileVersion >= 318)
|
|
||||||
{
|
|
||||||
version = fileVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
*(DWORD*)0x4158F4 = version;
|
|
||||||
*(DWORD*)0x4158FB = version;
|
|
||||||
|
|
||||||
// physpreset size
|
// physpreset size
|
||||||
*(BYTE*)0x49CE0A = (iw5) ? 68 : 44;
|
*(BYTE*)0x49CE0A = (iw5) ? 68 : 44;
|
||||||
|
|
||||||
@ -1088,9 +1077,17 @@ namespace Components
|
|||||||
void Zones::InstallPatches(int version)
|
void Zones::InstallPatches(int version)
|
||||||
{
|
{
|
||||||
Zones::ZoneVersion = version;
|
Zones::ZoneVersion = version;
|
||||||
AssetHandler::ClearRelocations();
|
// AssetHandler::ClearRelocations();
|
||||||
|
//
|
||||||
PatchMW2_FifthInfinityApply(version, version >= 316);
|
// if (Zones::ZoneVersion == VERSION_ALPHA2 || Zones::ZoneVersion == VERSION_ALPHA3 || Zones::ZoneVersion == XFILE_VERSION)
|
||||||
|
// {
|
||||||
|
// Utils::Hook::Set<DWORD>(0x4158F4, version);
|
||||||
|
// Utils::Hook::Set<DWORD>(0x4158FB, version);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// PatchMW2_FifthInfinityApply(version, version >= 316);
|
||||||
|
//
|
||||||
|
// AntiCheat::EmptyHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
Zones::Zones()
|
Zones::Zones()
|
||||||
|
@ -27,7 +27,6 @@ namespace Utils
|
|||||||
{
|
{
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
OutputDebugStringA(Utils::String::VA("Free: %X\n", (DWORD)data));
|
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user