From fb3bf91dfb4f07c70f0e61779898d0ea5198ada7 Mon Sep 17 00:00:00 2001 From: Armin Preiml Date: Sun, 1 Aug 2010 20:46:51 +0200 Subject: [PATCH] Added inserting of NPC meshes. Only heads and bodys and not well placed for now. --- apps/openmw/mwrender/cellimp.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/openmw/mwrender/cellimp.cpp b/apps/openmw/mwrender/cellimp.cpp index 86bddb3a9..53911782e 100644 --- a/apps/openmw/mwrender/cellimp.cpp +++ b/apps/openmw/mwrender/cellimp.cpp @@ -40,6 +40,20 @@ void insertObj(CellRenderImp& cellRender, ESMS::LiveCellRef +void insertObj(CellRenderImp& cellRender, ESMS::LiveCellRef& liveRef ) +{ + std::string skinName = "meshes\\b\\B_N_" //some constants (seems so) + + liveRef.base->race + + "_" + + ((liveRef.base->flags & ESM::NPC::Female ) ? "F" : "M"); + + cellRender.insertBegin(liveRef.ref); + cellRender.insertMesh(skinName + "_Skins.nif"); + cellRender.insertMesh("meshes\\B\\" + liveRef.base->head + ".nif"); + liveRef.mData.setHandle (cellRender.insertEnd (liveRef.mData.isEnabled())); +} + template void insertCellRefList (CellRenderImp& cellRender, T& cellRefList) {