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

Commit b5f1d96

Browse files
committed
Review changes
1 parent d9dd256 commit b5f1d96

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Entities/ACrab.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,12 @@ class ACrab :
264264
/// <returns>The rate at which the jetpack is replenished.</returns>
265265
float GetJetReplenishRate() const { return m_JetReplenishRate; }
266266

267-
268267
/// <summary>
269268
/// Sets the rate at which this ACrab's jetpack is replenished during downtime.
270269
/// </summary>
271270
/// <param name="newValue">The rate at which the jetpack is replenished.</param>
272271
void SetJetReplenishRate(float newValue) { m_JetReplenishRate = newValue; }
273272

274-
275273
/// <summary>
276274
/// Gets the scalar ratio at which this jetpack's thrust angle follows the aim angle of the user.
277275
/// </summary>

Entities/AHuman.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,6 @@ void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
18091809
if (m_Controller.IsState(BODY_JUMP)) {
18101810
m_WalkAngle[whichLayer] = Matrix(c_QuarterPI * GetFlipFactor());
18111811
} else {
1812-
// Cast rays to calculate the approximate shape of terrain.
18131812
int rayCount = 4;
18141813
float rayLength = 10.0F;
18151814
Vector hipPos = m_Pos;
@@ -1820,15 +1819,15 @@ void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
18201819
rayLength += m_pBGLeg->GetMaxLength();
18211820
hipPos += RotateOffset(m_pBGLeg->GetParentOffset());
18221821
}
1823-
float traceRotation = rayCount > 1 ? c_HalfPI / static_cast<float>(rayCount - 1) * GetFlipFactor() : 0;
1822+
float traceRotation = c_HalfPI / static_cast<float>(rayCount - 1) * GetFlipFactor();
18241823
Vector hitPos;
18251824
Vector terrainVector(0, rayLength);
18261825
Vector trace(0, rayLength);
18271826
for (int i = 0; i < rayCount; i++) {
18281827
if (g_SceneMan.CastStrengthRay(hipPos, trace, 10.0F, hitPos, 4, g_MaterialGrass)) {
18291828
terrainVector += trace - g_SceneMan.ShortestDistance(hipPos, hitPos, g_SceneMan.SceneWrapsX());
18301829
} else {
1831-
// Reinforce focus on previously assumed terrain.
1830+
// Since no terrain was found, reinforce the existing terrain direction Vector, so any terrain found in future affects it less.
18321831
terrainVector *= 1.5F;
18331832
}
18341833
trace.RadRotate(traceRotation);
@@ -3630,15 +3629,15 @@ void AHuman::Update()
36303629
}
36313630
bool climbing = m_ArmClimbing[FGROUND] || m_ArmClimbing[BGROUND];
36323631

3633-
if (restarted) {
3632+
if (restarted) {
36343633
if (!climbing) {
36353634
if (m_StrideSound) { m_StrideSound->Play(m_Pos); }
36363635
RunScriptedFunctionInAppropriateScripts("OnStride");
36373636
} else {
36383637
m_WalkAngle[FGROUND] = Matrix();
36393638
m_WalkAngle[BGROUND] = Matrix();
36403639
}
3641-
}
3640+
}
36423641

36433642
////////////////////////////////////////
36443643
// Arm Climbing if the leg paths failed to find clear spot to restart

Entities/AHuman.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,6 @@ ClassInfoGetters;
779779
/// <param name="whichLayer">The Layer in question.</param>
780780
void UpdateWalkAngle(AHuman::Layer whichLayer);
781781

782-
783782
/// <summary>
784783
/// Sets the walk path rotation for the specified Layer.
785784
/// </summary>

0 commit comments

Comments
 (0)