forked from mirror/openmw-tes3mp
NPC bounded parts
This commit is contained in:
parent
5c48d8fc1e
commit
39338f4be1
2 changed files with 55 additions and 5 deletions
|
@ -109,6 +109,60 @@ void Actors::insertNPC(const MWWorld::Ptr& ptr){
|
|||
insertBoundedPart("meshes\\" + foot->model + "*|", "Left Foot", base);
|
||||
}
|
||||
}
|
||||
if(groin){
|
||||
insertBoundedPart("meshes\\" + groin->model, "Groin", base);
|
||||
}
|
||||
if(knee)
|
||||
{
|
||||
insertBoundedPart("meshes\\" + knee->model + "*|", "Left Knee", base); //e
|
||||
insertBoundedPart("meshes\\" + knee->model, "Right Knee", base); //e
|
||||
|
||||
}
|
||||
if(ankle){
|
||||
|
||||
insertBoundedPart("meshes\\" + ankle->model + "*|", "Left Ankle", base); //Ogre::Quaternion(Ogre::Radian(3.14 / 4), Ogre::Vector3(1, 0, 0)),blank); //1,0,0, blank);
|
||||
insertBoundedPart("meshes\\" + ankle->model, "Right Ankle", base);
|
||||
}
|
||||
if (armr){
|
||||
insertBoundedPart("meshes\\" + armr->model, "Right Upper Arm", base);
|
||||
}
|
||||
if(arml){
|
||||
insertBoundedPart("meshes\\" + arml->model + "*|", "Left Upper Arm", base);
|
||||
}
|
||||
|
||||
if (forearmr)
|
||||
{
|
||||
insertBoundedPart("meshes\\" + forearmr->model, "Right Forearm", base);
|
||||
}
|
||||
if(forearml)
|
||||
insertBoundedPart("meshes\\" + forearml->model + "*|", "Left Forearm", base);
|
||||
|
||||
if (wristr)
|
||||
{
|
||||
insertBoundedPart("meshes\\" + wristr->model, "Right Wrist", base);
|
||||
}
|
||||
|
||||
if(wristl)
|
||||
insertBoundedPart("meshes\\" + wristl->model + "*|", "Left Wrist", base);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*if(claviclel)
|
||||
insertBoundedPart("meshes\\" + claviclel->model + "*|", "Left Clavicle", base);
|
||||
if(clavicler)
|
||||
insertBoundedPart("meshes\\" + clavicler->model , "Right Clavicle", base);*/
|
||||
|
||||
|
||||
if(neck)
|
||||
{
|
||||
insertBoundedPart("meshes\\" + neck->model, "Neck", base);
|
||||
}
|
||||
if(head)
|
||||
insertBoundedPart("meshes\\" + head->model, "Head", base);
|
||||
if(hair)
|
||||
insertBoundedPart("meshes\\" + hair->model, "Head", base);
|
||||
}
|
||||
void Actors::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){
|
||||
Ogre::SceneNode* cellnode;
|
||||
|
|
|
@ -343,7 +343,6 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
|||
{
|
||||
float *datamod = new float[data->vertices.length];
|
||||
//std::cout << "Shape" << shape->name.toString() << "\n";
|
||||
//std::cout << "MTransform" << mTransform << "\n";
|
||||
for(int i = 0; i < numVerts; i++)
|
||||
{
|
||||
int index = i * 3;
|
||||
|
@ -368,7 +367,6 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
|||
vbuf->writeData(0, vbuf->getSizeInBytes(), data->vertices.ptr, false);
|
||||
}
|
||||
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), data->vertices.ptr, true);
|
||||
|
||||
VertexBufferBinding* bind = sub->vertexData->vertexBufferBinding;
|
||||
bind->setBinding(nextBuf++, vbuf);
|
||||
|
@ -476,7 +474,6 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
|||
HardwareBuffer::HBU_STATIC_WRITE_ONLY, true);
|
||||
|
||||
if(flip && mFlipVertexWinding && sub->indexData->indexCount % 3 == 0){
|
||||
std::cout << "INTHEWINDING\n";
|
||||
sub->indexData->indexBuffer = ibuf;
|
||||
|
||||
uint16 *datamod = new uint16[numFaces];
|
||||
|
@ -939,6 +936,7 @@ void NIFLoader::calculateTransform()
|
|||
// Calculate transform
|
||||
Matrix4 transform = Matrix4::IDENTITY;
|
||||
transform = Matrix4::getScale(vector) * transform;
|
||||
|
||||
// Check whether we have to flip vertex winding.
|
||||
// We do have to, if we changed our right hand base.
|
||||
// We can test it by using the cross product from X and Y and see, if it is a non-negative
|
||||
|
@ -953,7 +951,6 @@ void NIFLoader::calculateTransform()
|
|||
}
|
||||
|
||||
mTransform = transform;
|
||||
|
||||
}
|
||||
void NIFLoader::handleNode(Nif::Node *node, int flags,
|
||||
const Transformation *trafo, BoundsFinder &bounds, Ogre::Bone *parentBone, std::vector<std::string> boneSequence)
|
||||
|
@ -1184,7 +1181,6 @@ void NIFLoader::loadResource(Resource *resource)
|
|||
}
|
||||
if(flip)
|
||||
{
|
||||
std::cout << "Flipping";
|
||||
calculateTransform();
|
||||
}
|
||||
// Set up the VFS if it hasn't been done already
|
||||
|
|
Loading…
Reference in a new issue