[QuickPatch] added debug testfunc for random testing stuff

This commit is contained in:
TheApadayo 2016-12-29 21:46:06 -05:00
parent 8fb9ae08c1
commit d9eb9a273b
2 changed files with 24 additions and 0 deletions

View File

@ -180,6 +180,23 @@ namespace Components
}, nullptr, false);
}
void QuickPatch::testFunc()
{
Game::DB_EnumXAssets(Game::XAssetType::ASSET_TYPE_CLIPMAP_PVS, [](Game::XAssetHeader header, void* /*unused*/)
{
Game::clipMap_t* map = header.clipMap;
for (int i = 0; i < map->numCBrushSides; ++i)
{
if (map->cBrushSides[i].texInfo > map->numMaterials)
{
__debugbreak();
}
}
}, nullptr, false);
}
QuickPatch::QuickPatch()
{
// protocol version (workaround for hacks)
@ -448,6 +465,11 @@ namespace Components
QuickPatch::CompareMaterialStateBits();
});
Command::Add("test", [](Command::Params*)
{
QuickPatch::testFunc();
});
// Dvars
Dvar::Register<bool>("ui_streamFriendly", 0, Game::DVAR_FLAG_SAVED, "Stream friendly UI");

View File

@ -33,5 +33,7 @@ namespace Components
static void CL_HandleRelayPacketCheck(Game::msg_t* msg, int client);
static void CompareMaterialStateBits();
static void testFunc();
};
}