diff --git a/src/ZoneLoading/Game/IW3/XAssets/gfximage/gfximage_actions.cpp b/src/ZoneLoading/Game/IW3/XAssets/gfximage/gfximage_actions.cpp index ce2a4144..f90cbd14 100644 --- a/src/ZoneLoading/Game/IW3/XAssets/gfximage/gfximage_actions.cpp +++ b/src/ZoneLoading/Game/IW3/XAssets/gfximage/gfximage_actions.cpp @@ -17,15 +17,8 @@ void Actions_GfxImage::OnImageLoaded(GfxImage* image) const void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const { - if (loadDef->resourceSize > 0) - { - const size_t loadDefSize = offsetof(IW3::GfxImageLoadDef, data) + loadDef->resourceSize; + const size_t loadDefSize = offsetof(IW3::GfxImageLoadDef, data) + loadDef->resourceSize; - image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize)); - memcpy(image->texture.loadDef, loadDef, loadDefSize); - } - else - { - image->texture.loadDef = nullptr; - } + image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize)); + memcpy(image->texture.loadDef, loadDef, loadDefSize); } diff --git a/src/ZoneLoading/Game/IW4/XAssets/gfximage/gfximage_actions.cpp b/src/ZoneLoading/Game/IW4/XAssets/gfximage/gfximage_actions.cpp index a4e7d317..726b33e2 100644 --- a/src/ZoneLoading/Game/IW4/XAssets/gfximage/gfximage_actions.cpp +++ b/src/ZoneLoading/Game/IW4/XAssets/gfximage/gfximage_actions.cpp @@ -17,15 +17,8 @@ void Actions_GfxImage::OnImageLoaded(GfxImage* image) const void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const { - if (loadDef->resourceSize > 0) - { - const size_t loadDefSize = offsetof(IW4::GfxImageLoadDef, data) + loadDef->resourceSize; + const size_t loadDefSize = offsetof(IW4::GfxImageLoadDef, data) + loadDef->resourceSize; - image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize)); - memcpy(image->texture.loadDef, loadDef, loadDefSize); - } - else - { - image->texture.loadDef = nullptr; - } + image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize)); + memcpy(image->texture.loadDef, loadDef, loadDefSize); } diff --git a/src/ZoneLoading/Game/T6/XAssets/gfximage/gfximage_actions.cpp b/src/ZoneLoading/Game/T6/XAssets/gfximage/gfximage_actions.cpp index f0142acc..8c047c00 100644 --- a/src/ZoneLoading/Game/T6/XAssets/gfximage/gfximage_actions.cpp +++ b/src/ZoneLoading/Game/T6/XAssets/gfximage/gfximage_actions.cpp @@ -17,14 +17,6 @@ void Actions_GfxImage::OnImageLoaded(GfxImage* image) const void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const { - // if(loadDef->resourceSize > 0) - // { - // - // } - // else - // { - // image->texture.loadDef = nullptr; - // } const size_t loadDefSize = offsetof(T6::GfxImageLoadDef, data) + loadDef->resourceSize; image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize));