[QuickPatch] added debug testfunc for random testing stuff
This commit is contained in:
parent
8fb9ae08c1
commit
d9eb9a273b
@ -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");
|
||||
|
||||
|
@ -33,5 +33,7 @@ namespace Components
|
||||
static void CL_HandleRelayPacketCheck(Game::msg_t* msg, int client);
|
||||
|
||||
static void CompareMaterialStateBits();
|
||||
|
||||
static void testFunc();
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user