Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -932,16 +932,20 @@ class GenericObjectCreationNugget : public ObjectCreationNugget

if (!m_nameAreObjects)
{
for (DrawModule** dm = obj->getDrawable()->getDrawModules(); *dm; ++dm)
Drawable* draw = obj->getDrawable();
if (draw)
{
DebrisDrawInterface* di = (*dm)->getDebrisDrawInterface();
if (di)
for (DrawModule** dm = draw->getDrawModules(); *dm; ++dm)
{
di->setModelName(modelName, m_okToChangeModelColor ? obj->getIndicatorColor() : 0, m_shadowType);
if (!m_animSets.empty())
DebrisDrawInterface* di = (*dm)->getDebrisDrawInterface();
if (di)
{
Int which = GameLogicRandomValue(0, m_animSets.size()-1);
di->setAnimNames(m_animSets[which].m_animInitial, m_animSets[which].m_animFlying, m_animSets[which].m_animFinal, m_fxFinal);
di->setModelName(modelName, m_okToChangeModelColor ? obj->getIndicatorColor() : 0, m_shadowType);
if (!m_animSets.empty())
{
Int which = GameLogicRandomValue(0, m_animSets.size()-1);
di->setAnimNames(m_animSets[which].m_animInitial, m_animSets[which].m_animFlying, m_animSets[which].m_animFinal, m_fxFinal);
}
}
}
}
Expand Down Expand Up @@ -1328,15 +1332,17 @@ class GenericObjectCreationNugget : public ObjectCreationNugget
AudioEventRTS fadeAudioEvent(m_fadeSoundName);
fadeAudioEvent.setObjectID(sourceObj->getID());
TheAudio->addAudioEvent(&fadeAudioEvent);
debris->getDrawable()->fadeIn(m_fadeFrames);
if (debris->getDrawable())
debris->getDrawable()->fadeIn(m_fadeFrames);
}

if (m_fadeOut)
{
AudioEventRTS fadeAudioEvent(m_fadeSoundName);
fadeAudioEvent.setObjectID(sourceObj->getID());
TheAudio->addAudioEvent(&fadeAudioEvent);
debris->getDrawable()->fadeOut(m_fadeFrames);
if (debris->getDrawable())
debris->getDrawable()->fadeOut(m_fadeFrames);
}
}

Expand Down
Loading