Don't call setLastTriggeredCheckline for check cannon
It will override the track check line
This commit is contained in:
@@ -913,6 +913,8 @@ void IrrDriver::applyResolutionSettings()
|
||||
// above) - this happens dynamically when the tracks are loaded.
|
||||
GUIEngine::reshowCurrentScreen();
|
||||
MessageQueue::updatePosition();
|
||||
// Preload the explosion effects (explode.png)
|
||||
ParticleKindManager::get()->getParticles("explosion.xml");
|
||||
#endif // !SERVER_ONLY
|
||||
} // applyResolutionSettings
|
||||
|
||||
|
||||
@@ -134,6 +134,8 @@ ParticleKind::ParticleKind(const std::string &file)
|
||||
delete xml;
|
||||
throw std::runtime_error("[ParticleKind] <material> tag has invalid 'file' attribute");
|
||||
}
|
||||
// Preload textures
|
||||
getMaterial();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -1461,6 +1461,8 @@ void initRest()
|
||||
|
||||
race_manager->setTrack(UserConfigParams::m_last_track);
|
||||
|
||||
// Preload the explosion effects (explode.png)
|
||||
ParticleKindManager::get()->getParticles("explosion.xml");
|
||||
} // initRest
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
virtual void trigger(unsigned int kart_index) OVERRIDE;
|
||||
virtual void changeDebugColor(bool is_active) OVERRIDE;
|
||||
virtual void update(float dt) OVERRIDE;
|
||||
|
||||
virtual bool triggeringCheckline() const { return false; }
|
||||
void addFlyable(Flyable *flyable);
|
||||
void removeFlyable(Flyable *flyable);
|
||||
}; // CheckLine
|
||||
|
||||
@@ -234,7 +234,7 @@ bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||
if (result)
|
||||
{
|
||||
LinearWorld* lw = dynamic_cast<LinearWorld*>(w);
|
||||
if (lw != NULL)
|
||||
if (triggeringCheckline() && lw != NULL)
|
||||
lw->setLastTriggeredCheckline(kart_index, m_index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
virtual void reset(const Track &track);
|
||||
virtual void resetAfterKartMove(unsigned int kart_index);
|
||||
virtual void changeDebugColor(bool is_active);
|
||||
virtual bool triggeringCheckline() const { return true; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the actual line data for this checkpoint. */
|
||||
const core::line2df &getLine2D() const {return m_line;}
|
||||
|
||||
Reference in New Issue
Block a user