1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00

actor physics again

This commit is contained in:
Jason Hooks 2012-01-07 23:21:19 -05:00
parent a615369189
commit 7fde576dd9
3 changed files with 14 additions and 2 deletions

View File

@ -47,7 +47,7 @@ namespace MWClass
const std::string &model = ref->base->model;
assert (ref->base != NULL);
if(!model.empty()){
physics.insertObjectPhysics(ptr, "meshes\\" + model);
physics.insertActorPhysics(ptr, "meshes\\" + model);
}
}

View File

@ -53,7 +53,7 @@ namespace MWClass
std::string smodel = "meshes\\base_anim.nif";
if(beast)
smodel = "meshes\\base_animkna.nif";
physics.insertObjectPhysics(ptr, smodel);
physics.insertActorPhysics(ptr, smodel);
}

View File

@ -224,6 +224,18 @@ void NpcAnimation::insertFreePart(const std::string &mesh, const std::string suf
NIFLoader::load(meshNumbered);
Ogre::Entity* ent = mRend.getScene()->createEntity(meshNumbered);
/*MaterialPtr material = ent->getSubEntity(0)->getMaterial();
material->removeAllTechniques();
Ogre::Technique* tech = material->createTechnique();
Pass* pass2 = tech->createPass();
pass2->setVertexProgram("Ogre/HardwareSkinningTwoWeights");
pass2->setColourWriteEnabled(false);
//tech->setSchemeName("blahblah");*/
insert->attachObject(ent);
entityparts.push_back(ent);
shapes = ((NIFLoader::getSingletonPtr())->getShapes(mesh + "0000" + suffix));