diff --git a/SHADE_Managed/src/Engine/GameObject.cxx b/SHADE_Managed/src/Engine/GameObject.cxx index de4c614e..da9343c4 100644 --- a/SHADE_Managed/src/Engine/GameObject.cxx +++ b/SHADE_Managed/src/Engine/GameObject.cxx @@ -139,8 +139,8 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* Constructors */ /*---------------------------------------------------------------------------------*/ - GameObject::GameObject(EntityID entity) - : entity { entity } + GameObject::GameObject(const SHEntity& entity) + : entity { entity.GetEID() } {} GameObject::GameObject(Entity entity) diff --git a/SHADE_Managed/src/Engine/GameObject.hxx b/SHADE_Managed/src/Engine/GameObject.hxx index 780b2957..723d9cec 100644 --- a/SHADE_Managed/src/Engine/GameObject.hxx +++ b/SHADE_Managed/src/Engine/GameObject.hxx @@ -207,7 +207,7 @@ namespace SHADE /// /// The ECS Entity that this GameObject should represent. /// - GameObject(SHEntity entity); + GameObject(const SHEntity& entity); /// /// Constructor for the GameObject. /// diff --git a/SHADE_Managed/src/Math/Vector2.cxx b/SHADE_Managed/src/Math/Vector2.cxx index 276c6ea8..d12ec72a 100644 --- a/SHADE_Managed/src/Math/Vector2.cxx +++ b/SHADE_Managed/src/Math/Vector2.cxx @@ -204,11 +204,11 @@ namespace SHADE return target; // Calculate new position - const Vector2 DELTA = (target - current).GetNormalised() * maxDistanceDelta; + Vector2 DELTA = (target - current).GetNormalised() * maxDistanceDelta; Vector2 newPos = current + DELTA; // Check if check if is behind or ahead of target - const Vector2 DIFF = target - newPos; + Vector2 DIFF = target - newPos; if (Dot(DELTA, DIFF) < 0.0) { newPos = target; diff --git a/SHADE_Managed/src/Math/Vector2.hxx b/SHADE_Managed/src/Math/Vector2.hxx index c19828f4..fc01595d 100644 --- a/SHADE_Managed/src/Math/Vector2.hxx +++ b/SHADE_Managed/src/Math/Vector2.hxx @@ -37,37 +37,37 @@ namespace SHADE /// /// Shorthand for writing Vector2(0, -1). /// - static const Vector2 Down = Vector2(0.0, -1.0); + static Vector2 Down = Vector2(0.0, -1.0); /// /// Shorthand for writing Vector2(-1, 0). /// - static const Vector2 Left = Vector2(-1.0, 0.0); + static Vector2 Left = Vector2(-1.0, 0.0); /// /// Shorthand for writing Vector2(double.NegativeInfinity, /// double.NegativeInfinity). /// - static const Vector2 NegativeInfinity = Vector2(std::numeric_limits::lowest(), std::numeric_limits::lowest()); + static Vector2 NegativeInfinity = Vector2(std::numeric_limits::lowest(), std::numeric_limits::lowest()); /// /// Shorthand for writing Vector2(1, 1). /// - static const Vector2 One = Vector2(1.0, 1.0); + static Vector2 One = Vector2(1.0, 1.0); /// /// Shorthand for writing Vector2(double.PositiveInfinity, /// double.PositiveInfinity). /// - static const Vector2 PositiveInfinity = Vector2(std::numeric_limits::max(), std::numeric_limits::max()); + static Vector2 PositiveInfinity = Vector2(std::numeric_limits::max(), std::numeric_limits::max()); /// /// Shorthand for writing Vector2(1, 0). /// - static const Vector2 Right = Vector2(1.0, 0.0); + static Vector2 Right = Vector2(1.0, 0.0); /// /// Shorthand for writing Vector2(0, 1). /// - static const Vector2 Up = Vector2(0.0, 1.0); + static Vector2 Up = Vector2(0.0, 1.0); /// /// Shorthand for writing Vector2(0, 0). /// - static const Vector2 Zero = Vector2(0.0, 0.0); + static Vector2 Zero = Vector2(0.0, 0.0); #pragma endregion /*-----------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Math/Vector3.cxx b/SHADE_Managed/src/Math/Vector3.cxx index 4f8ea8b0..e8dc2c2f 100644 --- a/SHADE_Managed/src/Math/Vector3.cxx +++ b/SHADE_Managed/src/Math/Vector3.cxx @@ -201,11 +201,11 @@ namespace SHADE return target; // Calculate new position - const Vector3 DELTA = (target - current).GetNormalised() * maxDistanceDelta; + Vector3 DELTA = (target - current).GetNormalised() * maxDistanceDelta; Vector3 newPos = current + DELTA; // Check if check if is behind or ahead of target - const Vector3 DIFF = target - newPos; + Vector3 DIFF = target - newPos; if (Dot(DELTA, DIFF) < 0.0) { newPos = target;