Skip to content

Commit

Permalink
--add missing fields to AssetInfo comparator; (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner65 authored May 19, 2022
1 parent b0d9c1f commit 5944ba2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/esp/assets/Asset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,23 @@ 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;
}

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
3 changes: 3 additions & 0 deletions src/esp/assets/Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5944ba2

Please sign in to comment.