Fix incorrect getChecklineTriggering on CheckCannon after using 3D check planes

This commit is contained in:
Benau 2021-09-07 11:04:33 +08:00
parent a699982bfa
commit 88d8799498

View File

@ -224,7 +224,10 @@ int CheckManager::getChecklineTriggering(const Vec3 &from,
CheckStructure* c = getCheckStructure(i);
// FIXME: why is the lapline skipped?
if (dynamic_cast<CheckLap*>(c) != NULL) continue;
// CheckCannon is skipped because after using 3D check planes,
// sometimes getChecklineTriggering will return true for CheckCannon
if (dynamic_cast<CheckLap*>(c) != NULL ||
dynamic_cast<CheckCannon*>(c) != NULL) continue;
if (c->isTriggered(from, to, -1 /* kart id */))
return i;