Skip to content

Commit

Permalink
Revert "Merge pull request #454 from ASleepyCat/laser-fix-2"
Browse files Browse the repository at this point in the history
This reverts commit cd86945, reversing
changes made to afd52a9.
  • Loading branch information
Drewol committed Sep 17, 2022
1 parent c6ecc7f commit fb239f1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Main/src/Scoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,6 @@ void Scoring::m_UpdateLasers(float deltaTime)
{
MapTime mapTime = m_playback->GetLastTime() + m_laserOffset;
bool currentlySlamNextSegmentStraight[2] = { false };

// Check for new laser segments in laser queue
for (auto it = m_laserSegmentQueue.begin(); it != m_laserSegmentQueue.end();)
{
Expand Down Expand Up @@ -1570,6 +1569,7 @@ void Scoring::m_UpdateLasers(float deltaTime)
float positionDelta = laserTargetPositions[i] - laserPositions[i];
float laserDir = currentSegment->GetDirection();
float input = m_laserInput[i];
float inputDir = Math::Sign(input);

if (inputDir != 0)
{
Expand Down Expand Up @@ -1605,14 +1605,8 @@ void Scoring::m_UpdateLasers(float deltaTime)
timeSinceLaserUsed[i] += deltaTime;

// Always snap laser to start sections
auto incomingLaser = m_GetLaserObjectWithinTwoBeats(i);
if (incomingLaser)
{
laserPositions[i] = incomingLaser->points[0];
m_autoLaserTime[i] = inputDir == incomingLaser->GetDirection() || inputDir == 0
? m_autoLaserDuration
: 0;
}
if (m_GetLaserObjectWithinTwoBeats(i))
m_autoLaserTime[i] = m_autoLaserDuration;
}

if (currentlySlamNextSegmentStraight[i])
Expand Down

0 comments on commit fb239f1

Please sign in to comment.