Add updateGraphics for track object presentation

This commit is contained in:
Benau 2018-10-11 16:23:20 +08:00
parent 19e2baed74
commit 510d221fbc
3 changed files with 8 additions and 6 deletions

View File

@ -528,6 +528,7 @@ void TrackObject::resetEnabled()
*/
void TrackObject::updateGraphics(float dt)
{
if (m_presentation) m_presentation->updateGraphics(dt);
if (m_physical_object) m_physical_object->updateGraphics(dt);
} // update

View File

@ -719,7 +719,7 @@ TrackObjectPresentationSound::TrackObjectPresentationSound(
} // TrackObjectPresentationSound
// ----------------------------------------------------------------------------
void TrackObjectPresentationSound::update(float dt)
void TrackObjectPresentationSound::updateGraphics(float dt)
{
if (m_sound != NULL && m_enabled)
{
@ -820,7 +820,7 @@ TrackObjectPresentationBillboard::TrackObjectPresentationBillboard(
} // TrackObjectPresentationBillboard
// ----------------------------------------------------------------------------
void TrackObjectPresentationBillboard::update(float dt)
void TrackObjectPresentationBillboard::updateGraphics(float dt)
{
if (ProfileWorld::isNoGraphics()) return;
#ifndef SERVER_ONLY
@ -934,7 +934,7 @@ TrackObjectPresentationParticles::~TrackObjectPresentationParticles()
} // ~TrackObjectPresentationParticles
// ----------------------------------------------------------------------------
void TrackObjectPresentationParticles::update(float dt)
void TrackObjectPresentationParticles::updateGraphics(float dt)
{
if (m_emitter != NULL)
{

View File

@ -87,6 +87,7 @@ public:
{
Log::warn("TrackObjectPresentation", "setEnable unimplemented for this presentation type");
}
virtual void updateGraphics(float dt) {}
virtual void update(float dt) {}
virtual void move(const core::vector3df& xyz, const core::vector3df& hpr,
const core::vector3df& scale, bool isAbsoluteCoord) {}
@ -290,7 +291,7 @@ public:
bool disable_for_multiplayer);
virtual ~TrackObjectPresentationSound();
virtual void onTriggerItemApproached() OVERRIDE;
virtual void update(float dt) OVERRIDE;
virtual void updateGraphics(float dt) OVERRIDE;
virtual void move(const core::vector3df& xyz, const core::vector3df& hpr,
const core::vector3df& scale, bool isAbsoluteCoord) OVERRIDE;
void triggerSound(bool loop);
@ -320,7 +321,7 @@ public:
TrackObjectPresentationBillboard(const XMLNode& xml_node,
scene::ISceneNode* parent);
virtual ~TrackObjectPresentationBillboard();
virtual void update(float dt) OVERRIDE;
virtual void updateGraphics(float dt) OVERRIDE;
}; // TrackObjectPresentationBillboard
@ -342,7 +343,7 @@ public:
scene::ISceneNode* parent);
virtual ~TrackObjectPresentationParticles();
virtual void update(float dt) OVERRIDE;
virtual void updateGraphics(float dt) OVERRIDE;
void triggerParticles();
void stop();
void stopIn(double delay);