Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/ObjectEntry.cpp
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | for (const CObjectBase::Prop& prop : props) | ||||
const SPropPoint* proppoint = modeldef->FindPropPoint(ppn.c_str()); | const SPropPoint* proppoint = modeldef->FindPropPoint(ppn.c_str()); | ||||
if (proppoint) | if (proppoint) | ||||
{ | { | ||||
CModelAbstract* propmodel = oe->m_Model->Clone(); | CModelAbstract* propmodel = oe->m_Model->Clone(); | ||||
if (isAmmo) | if (isAmmo) | ||||
model->AddAmmoProp(proppoint, propmodel, oe); | model->AddAmmoProp(proppoint, propmodel, oe); | ||||
else | else | ||||
model->AddProp(proppoint, propmodel, oe, prop.m_minHeight, prop.m_maxHeight, prop.m_selectable); | { | ||||
bool hidden = prop.m_RenderPrio > g_RenderingOptions.m_PropRenderPriority; | |||||
Stan: Can't you just not add it, instead of marking as hidden ? :) Or does that allow you to do… | |||||
Done Inline ActionsCould be done. Hiding them would allow us to change it at runtime easier I guess, thought that's unimplemented so far. wraitii: Could be done. Hiding them would allow us to change it at runtime easier I guess, thought… | |||||
Not Done Inline ActionsWhen is this code called ? Stan: When is this code called ? | |||||
model->AddProp(proppoint, propmodel, oe, prop.m_minHeight, prop.m_maxHeight, prop.m_selectable, hidden); | |||||
} | |||||
if (propmodel->ToCModel()) | if (propmodel->ToCModel()) | ||||
propmodel->ToCModel()->SetAnimation(oe->GetRandomAnimation("idle")); | propmodel->ToCModel()->SetAnimation(oe->GetRandomAnimation("idle")); | ||||
} | } | ||||
else | else | ||||
LOGERROR("Failed to find matching prop point called \"%s\" in model \"%s\" for actor \"%s\"", ppn, m_ModelName.string8(), utf8_from_wstring(m_Base->m_ShortName)); | LOGERROR("Failed to find matching prop point called \"%s\" in model \"%s\" for actor \"%s\"", ppn, m_ModelName.string8(), utf8_from_wstring(m_Base->m_ShortName)); | ||||
} | } | ||||
// setup flags | // setup flags | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Can't you just not add it, instead of marking as hidden ? :) Or does that allow you to do reenable them without restarting the game ?