Skip to content

Commit

Permalink
Fix build error on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkrupinski committed Nov 14, 2024
1 parent 81d5570 commit 4d0ab32
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Source/GameClasses/BaseEntity.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ class BaseEntity {
void applySpawnProtectionEffect(cs2::Color color) const noexcept
{
renderComponent().sceneObjectUpdaters().forEachSceneObject([this, color](auto&& sceneObject) {
#if IS_WIN64()
const auto unknownEntityAttribute = getAttributeInt(0x8AD232BC, 0); // todo: find out the attribute name
#else
const auto unknownEntityAttribute = 0;
#endif
const auto unknownEntityAttribute = getAttributeInt(0x8AD232BC, 0); // probably checks if entity is a charm being currently applied, most likely redundant
if (unknownEntityAttribute == 0) {
auto&& sceneObjectAttributes = sceneObject.attributes();
sceneObjectAttributes.setAttributeFloat(0x244EC9B0, 1.0f); // "SpawnInvulnerability"
Expand Down Expand Up @@ -129,10 +125,12 @@ class BaseEntity {
}

private:
[[nodiscard]] int getAttributeInt(unsigned int attributeNameHash, int defaultValue) const noexcept
[[nodiscard]] int getAttributeInt([[maybe_unused]] unsigned int attributeNameHash, int defaultValue) const noexcept
{
#if IS_WIN64()
if (entity)
return hookContext.clientPatternSearchResults().template get<GetEntityAttributeInt>()(entity, attributeNameHash, defaultValue, nullptr);
#endif
return defaultValue;
}

Expand Down

0 comments on commit 4d0ab32

Please sign in to comment.