Skip to content

Commit

Permalink
Skip rendering attachments at joint positions
Browse files Browse the repository at this point in the history
Since we aren't yet handling the joint location correctly, attachments to
joints show up in weird positions (such as weapon appearing in front of an AI's
feet). For now we just skip rendering attachments altogether if they have a
"joint" parameter set.
  • Loading branch information
Matthew Mott committed Feb 11, 2021
1 parent df126d9 commit 2e35762
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions radiantcore/entity/EntityNode.cpp
Expand Up @@ -122,6 +122,11 @@ void EntityNode::createAttachedEntities()
_spawnArgs.forEachAttachment(
[this](const Entity::Attachment& a)
{
// Since we can't yet handle joint positions, ignore this attachment
// if it is attached to a joint
if (!a.joint.empty())
return;

// Check this is a valid entity class
auto cls = GlobalEntityClassManager().findClass(a.eclass);
if (!cls)
Expand Down

0 comments on commit 2e35762

Please sign in to comment.