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
10 changes: 10 additions & 0 deletions GeneralsMD/Code/Tools/WorldBuilder/src/wbview3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "intersec.h"
#include "W3DDevice/GameClient/W3DAssetManager.h"
#include "W3DDevice/GameClient/Module/W3DModelDraw.h"
#include "W3DDevice/GameClient/Module/W3DTreeDraw.h"
#include "agg_def.h"
#include "part_ldr.h"
#include "hanim.h"
Expand Down Expand Up @@ -1118,6 +1119,15 @@ AsciiString WbView3d::getBestModelName(const ThingTemplate* tt, const ModelCondi
{
return md->getBestModelNameForWB(c);
}

// TheSuperHackers @bugfix ViTeXFTW 15/02/2025 Fix tree objects not showing
// a preview in WB object placer. The W3DTreeDraw module stores its model name
// differently from W3DModelDraw.
const W3DTreeDrawModuleData* treeData = mdd ? mdd->getAsW3DTreeDrawModuleData() : nullptr;
if (treeData)
{
return treeData->m_modelName;
}
}
}
// removing this crash as sounds can (and should) have no model - jkmcd
Expand Down
Loading