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

Commit 85ab9af

Browse files
committed
Fixed comment in Controller.h.
Minor formatting changes and replaced an inline if with boolean evaluation for Controller.cpp
1 parent d001dae commit 85ab9af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

System/Controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ namespace RTE {
7777
cursorPos += GetMouseMovement() * moveScale;
7878
altered = true;
7979

80-
// See if there's other analog input, only if the mouse isn't active (or the cursor will float if mouse is used!)
80+
// See if there's other analog input, only if the mouse isn't active (or the cursor will float if mouse is used!)
8181
} else if (GetAnalogCursor().GetLargest() > 0.1 && !IsMouseControlled()) {
8282
// See how much to accelerate the joystick input based on how long the stick has been pushed around
8383
float acceleration = 0.5 + MIN(m_JoyAccelTimer.GetElapsedRealTimeS(), 0.5) * 6;
8484
cursorPos += GetAnalogCursor() * 10 * moveScale * acceleration;
8585
altered = true;
8686

87-
// Digital movement
87+
// Digital movement
8888
} else {
8989
// See how much to accelerate the keyboard input based on how long any key has been pressed
9090
float acceleration = 0.25 + MIN(m_KeyAccelTimer.GetElapsedRealTimeS(), 0.75) * 6;
@@ -335,7 +335,7 @@ namespace RTE {
335335
}
336336

337337
// Translate analog aim input into sharp aim constrol state
338-
if (m_AnalogAim.GetMagnitude() > 0.1 && !m_ControlStates[PIE_MENU_ACTIVE]) { m_ControlStates[AIM_SHARP] = true; }
338+
m_ControlStates[AIM_SHARP] = m_AnalogAim.GetMagnitude() > 0.1 && !m_ControlStates[PIE_MENU_ACTIVE];
339339

340340
// Disable sharp aim while moving - this also helps with keyboard vs mouse fighting when moving and aiming in opposite directions
341341
if (m_ControlStates[PRESS_RIGHT] || m_ControlStates[PRESS_LEFT] || m_ControlStates[BODY_JUMPSTART] || (m_ControlStates[PIE_MENU_ACTIVE] && !m_ControlStates[SECONDARY_ACTION])) {

System/Controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ namespace RTE {
241241
bool IsMouseControlled() const;
242242

243243
/// <summary>
244-
/// Gets the relative movement of the mouse since last update. Only returns true if this' player is actually set up to be using the mouse.
244+
/// Gets the relative movement of the mouse since last update.
245245
/// </summary>
246246
/// <returns>The relative mouse movements, in both axes.</returns>
247247
const Vector & GetMouseMovement() const { return m_MouseMovement; }

0 commit comments

Comments
 (0)