Skip to content

Commit

Permalink
Merge pull request #453 from ASleepyCat/laser-fix
Browse files Browse the repository at this point in the history
Fix a case where auto laser time wouldn't be decremented
  • Loading branch information
Drewol authored Apr 13, 2021
2 parents 5284dcc + 9bccd23 commit afd52a9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Main/src/Scoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ void Scoring::m_UpdateGauges(ScoreHitRating rating, TickFlags flags)
return;
}


bool isLong = (flags & TickFlags::Hold) != TickFlags::None
|| ((flags & TickFlags::Laser) != TickFlags::None
&& (flags & TickFlags::Slam) == TickFlags::None);
Expand Down Expand Up @@ -1208,11 +1207,8 @@ void Scoring::m_UpdateLasers(float deltaTime)
}

positionDelta = laserTargetPositions[i] - laserPositions[i];
if (inputDir == laserDir || laserDir == 0)
{
if (fabsf(positionDelta) <= m_laserDistanceLeniency)
m_autoLaserTime[i] = m_autoLaserDuration;
}
if ((inputDir == laserDir || laserDir == 0) && fabsf(positionDelta) <= m_laserDistanceLeniency)
m_autoLaserTime[i] = m_autoLaserDuration;
else
m_autoLaserTime[i] -= deltaTime;
}
Expand Down

0 comments on commit afd52a9

Please sign in to comment.