Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 65a31ce

Browse files
committed
Review changes
1 parent 3d6564b commit 65a31ce

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

Entities/HDFirearm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ void HDFirearm::Update()
787787
(m_Supported ? 1.0F : m_NoSupportFactor) * RandomNormalNum();
788788
tempNozzle = m_MuzzleOff.GetYFlipped(m_HFlipped);
789789
tempNozzle.DegRotate(degAimAngle + shake);
790-
roundVel.SetXY(static_cast<int>(pRound->GetFireVel()), 0);
790+
roundVel.SetXY(pRound->GetFireVel(), 0);
791791
roundVel.DegRotate(degAimAngle + shake);
792792

793793
Vector particlePos;
@@ -851,7 +851,7 @@ void HDFirearm::Update()
851851
pShell->SetPos(m_Pos + tempEject);
852852

853853
// ##@#@@$ TEMP
854-
shellVel.SetXY(static_cast<int>(pRound->GetShellVel()), 0);
854+
shellVel.SetXY(pRound->GetShellVel(), 0);
855855
shellVel.DegRotate(degAimAngle + 150 * (m_HFlipped ? -1 : 1) + shellSpread);
856856
pShell->SetVel(m_Vel + shellVel);
857857
pShell->SetRotAngle(m_Rotation.GetRadAngle());

System/Vector.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,31 @@ namespace RTE {
1717

1818
SerializableOverrideMethods
1919

20-
float m_X = 0.0F; //!< X value of this vector.
21-
float m_Y = 0.0F; //!< Y value of this vector.
20+
float m_X; //!< X value of this vector.
21+
float m_Y; //!< Y value of this vector.
2222

2323
#pragma region Creation
2424
/// <summary>
2525
/// Constructor method used to instantiate a Vector object with values (0, 0).
2626
/// </summary>
27-
Vector() {};
27+
Vector() = default;
2828

2929
/// <summary>
3030
/// Constructor method used to instantiate a Vector object from X and Y values.
3131
/// </summary>
3232
/// <param name="inputX">Float defining the initial X value of this Vector.</param>
3333
/// <param name="inputY">Float defining the initial Y value of this Vector.</param>
34-
Vector(const float inputX, const float inputY) :
35-
m_X(inputX),
36-
m_Y(inputY) {};
37-
38-
/// <summary>
39-
/// Copy constructor method used to instantiate a Vector object identical to an already existing one.
40-
/// </summary>
41-
/// <param name="reference">A Vector object which is passed in by reference.</param>
42-
Vector(const Vector &reference) = default;
34+
Vector(const float inputX, const float inputY) : m_X(inputX), m_Y(inputY) {};
4335
#pragma endregion
4436

45-
#pragma region Getters and Setters
37+
#pragma region Destruction
4638
/// <summary>
4739
/// Sets both the X and Y of this Vector to zero.
4840
/// </summary>
49-
void Reset() { m_X = 0.0F; m_Y = 0.0F; }
41+
void Reset() override { m_X = 0.0F; m_Y = 0.0F; }
42+
#pragma endregion
5043

44+
#pragma region Getters and Setters
5145
/// <summary>
5246
/// Gets the X value of this Vector.
5347
/// </summary>

0 commit comments

Comments
 (0)