Fix unwanted model culling during character generation

This commit is contained in:
Vsevolod Kremianskii 2021-05-07 16:34:05 +07:00
parent edabf403d3
commit df7939de1a
3 changed files with 3 additions and 0 deletions

View file

@ -377,6 +377,7 @@ shared_ptr<ModelSceneNode> CharacterGeneration::getCharacterModel(SceneGraph &sc
creature->setAppearance(_character.appearance);
creature->equip("g_a_clothes01");
creature->loadAppearance();
creature->getModelSceneNode()->setCullable(false);
creature->updateModelAnimation();
auto model = make_shared<ModelSceneNode>(ModelUsage::GUI, Models::instance().get("cgbody_light"), &sceneGraph);

View file

@ -148,6 +148,7 @@ shared_ptr<ModelSceneNode> ClassSelection::getCharacterModel(int appearance, Sce
character->setAppearance(appearance);
character->equip("g_a_clothes01");
character->loadAppearance();
character->getModelSceneNode()->setCullable(false);
character->updateModelAnimation();
auto model = make_shared<ModelSceneNode>(ModelUsage::GUI, Models::instance().get("cgbody_light"), &sceneGraph);

View file

@ -106,6 +106,7 @@ shared_ptr<ModelSceneNode> PortraitSelection::getCharacterModel(SceneGraph &scen
creature->setAppearance(getAppearanceFromCurrentPortrait());
creature->equip("g_a_clothes01");
creature->loadAppearance();
creature->getModelSceneNode()->setCullable(false);
creature->updateModelAnimation();
// Attach creature model to the root scene node