[AssetHandler] Visual bugs fixed.
This commit is contained in:
parent
c21b3cd7a9
commit
d0663eaefc
@ -158,12 +158,16 @@ namespace Components
|
||||
|
||||
void AssetHandler::ModifyAsset(Game::XAssetType type, Game::XAssetHeader asset, std::string name)
|
||||
{
|
||||
if (Zones::Version() >= VERSION_ALPHA2)
|
||||
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && (name == "gfx_distortion_knife_trail" || name == "gfx_distortion_heat_far" || name == "gfx_distortion_ring_light" || name == "gfx_distortion_heat") && asset.material->sortKey >= 43)
|
||||
{
|
||||
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && (name == "gfx_distortion_knife_trail" || name == "gfx_distortion_heat_far" || name == "gfx_distortion_ring_light" || name == "gfx_distortion_heat") && asset.material->sortKey == 43)
|
||||
if (Zones::Version() >= VERSION_ALPHA2)
|
||||
{
|
||||
asset.material->sortKey = 44;
|
||||
}
|
||||
else
|
||||
{
|
||||
asset.material->sortKey = 43;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && (name == "wc/codo_ui_viewer_black_decal3" || name == "wc/codo_ui_viewer_black_decal2" || name == "wc/hint_arrows01" || name == "wc/hint_arrows02"))
|
||||
|
@ -570,7 +570,21 @@ namespace Components
|
||||
|
||||
Game::Font* font = Game::R_RegisterFont("fonts/consoleFont", 0); // Inlining that seems to skip xpos, no idea why xD
|
||||
float color[4] = { 1.0f, 1.0f, 1.0f, (Game::CL_IsCgameInitialized() ? 0.3f : 1.0f) };
|
||||
Game::R_AddCmdDrawText(Utils::String::VA("Loading FastFile: %s", FastFiles::Current().data()), 0x7FFFFFFF, font, 5.0f, static_cast<float>(Renderer::Height() - 5), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_NORMAL);
|
||||
|
||||
std::uint32_t FFTotalSize = *reinterpret_cast<std::uint32_t*>(0x10AA5D8);
|
||||
std::uint32_t FFCurrentOffset = *reinterpret_cast<std::uint32_t*>(0x10AA608);
|
||||
|
||||
float fastfileLoadProgress = (float(FFCurrentOffset) / float(FFTotalSize)) * 100.0f;
|
||||
if (fastfileLoadProgress == INFINITY)
|
||||
{
|
||||
fastfileLoadProgress = 100.0f;
|
||||
}
|
||||
else if (fastfileLoadProgress == NAN)
|
||||
{
|
||||
fastfileLoadProgress = 0.0f;
|
||||
}
|
||||
|
||||
Game::R_AddCmdDrawText(Utils::String::VA("Loading FastFile: %s [%0.1f%%]", FastFiles::Current().data(), fastfileLoadProgress), 0x7FFFFFFF, font, 5.0f, static_cast<float>(Renderer::Height() - 5), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_NORMAL);
|
||||
});
|
||||
|
||||
Command::Add("loadzone", [] (Command::Params* params)
|
||||
|
Loading…
Reference in New Issue
Block a user