Made Entity direction functions const

This commit is contained in:
Andrei Abrudan 2022-08-06 13:48:43 +01:00
parent a51869dc7b
commit b99aef834c
2 changed files with 12 additions and 12 deletions

View File

@ -229,7 +229,7 @@ namespace cheat::game
SAFE_END();
}
app::Vector3 Entity::forward()
app::Vector3 Entity::forward() const
{
if (m_RawEntity == nullptr)
return {};
@ -237,12 +237,12 @@ namespace cheat::game
return app::MoleMole_BaseEntity_GetForward(m_RawEntity, nullptr);
}
app::Vector3 Entity::back()
app::Vector3 Entity::back() const
{
return -forward();
}
app::Vector3 Entity::right()
app::Vector3 Entity::right() const
{
if (m_RawEntity == nullptr)
return {};
@ -250,12 +250,12 @@ namespace cheat::game
return app::MoleMole_BaseEntity_GetRight(m_RawEntity, nullptr);
}
app::Vector3 Entity::left()
app::Vector3 Entity::left() const
{
return -right();
}
app::Vector3 Entity::up()
app::Vector3 Entity::up() const
{
if (m_RawEntity == nullptr)
return {};
@ -263,7 +263,7 @@ namespace cheat::game
return app::MoleMole_BaseEntity_GetUp(m_RawEntity, nullptr);
}
app::Vector3 Entity::down()
app::Vector3 Entity::down() const
{
return -up();
}

View File

@ -39,12 +39,12 @@ namespace cheat::game
app::Rigidbody* rigidbody();
app::Animator* animator();
app::Vector3 forward();
app::Vector3 back();
app::Vector3 right();
app::Vector3 left();
app::Vector3 up();
app::Vector3 down();
app::Vector3 forward() const;
app::Vector3 back() const;
app::Vector3 right() const;
app::Vector3 left() const;
app::Vector3 up() const;
app::Vector3 down() const;
template<class T>
T* plugin(void* pClass)