From 5944ba299e29d40c767cebe22c4c04a9f87a58f2 Mon Sep 17 00:00:00 2001 From: John Turner <7strbass@gmail.com> Date: Thu, 19 May 2022 15:23:47 -0400 Subject: [PATCH] --add missing fields to AssetInfo comparator; (#1757) --- src/esp/assets/Asset.cpp | 11 +++++++++++ src/esp/assets/Asset.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/esp/assets/Asset.cpp b/src/esp/assets/Asset.cpp index cbea1fc111..4ee19959a8 100644 --- a/src/esp/assets/Asset.cpp +++ b/src/esp/assets/Asset.cpp @@ -35,6 +35,8 @@ bool operator==(const AssetInfo& a, const AssetInfo& b) { a.shaderTypeToUse == b.shaderTypeToUse && a.hasSemanticTextures == b.hasSemanticTextures && a.virtualUnitToMeters == b.virtualUnitToMeters && + a.splitInstanceMesh == b.splitInstanceMesh && + a.overridePhongMaterial == b.overridePhongMaterial && a.forceFlatShading == b.forceFlatShading; } @@ -42,5 +44,14 @@ bool operator!=(const AssetInfo& a, const AssetInfo& b) { return !(a == b); } +bool operator==(const PhongMaterialColor& a, const PhongMaterialColor& b) { + return a.ambientColor == b.ambientColor && a.diffuseColor == b.diffuseColor && + a.specularColor == b.specularColor; +} + +bool operator!=(const PhongMaterialColor& a, const PhongMaterialColor& b) { + return !(a == b); +} + } // namespace assets } // namespace esp diff --git a/src/esp/assets/Asset.h b/src/esp/assets/Asset.h index acfe807e34..06158622ce 100644 --- a/src/esp/assets/Asset.h +++ b/src/esp/assets/Asset.h @@ -38,6 +38,9 @@ struct PhongMaterialColor { Magnum::Color4 specularColor{0.2}; }; +bool operator==(const PhongMaterialColor& a, const PhongMaterialColor& b); +bool operator!=(const PhongMaterialColor& a, const PhongMaterialColor& b); + //! AssetInfo stores information necessary to identify and load an Asset struct AssetInfo { AssetType type = AssetType::UNKNOWN;