Bugfix: non-active checklines did not save the previous position, resulting in
incorrect triggering later. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3742 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5f7d9db5c3
commit
ad799ed990
@ -67,10 +67,9 @@ void CheckStructure::update(float dt)
|
||||
{
|
||||
for(unsigned int i=0; i<race_manager->getNumKarts(); i++)
|
||||
{
|
||||
// Ignore all non-active checklines.
|
||||
if(!m_is_active[i]) continue;
|
||||
const Vec3 &xyz = race_manager->getKart(i)->getXYZ();
|
||||
if(isTriggered(m_previous_position[i], xyz, i))
|
||||
// Only check active checklines.
|
||||
if(m_is_active[i] && isTriggered(m_previous_position[i], xyz, i))
|
||||
{
|
||||
trigger(i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user