forked from teamnwah/openmw-tes3coop
actor physics again
This commit is contained in:
parent
a615369189
commit
7fde576dd9
3 changed files with 14 additions and 2 deletions
|
@ -47,7 +47,7 @@ namespace MWClass
|
||||||
const std::string &model = ref->base->model;
|
const std::string &model = ref->base->model;
|
||||||
assert (ref->base != NULL);
|
assert (ref->base != NULL);
|
||||||
if(!model.empty()){
|
if(!model.empty()){
|
||||||
physics.insertObjectPhysics(ptr, "meshes\\" + model);
|
physics.insertActorPhysics(ptr, "meshes\\" + model);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace MWClass
|
||||||
std::string smodel = "meshes\\base_anim.nif";
|
std::string smodel = "meshes\\base_anim.nif";
|
||||||
if(beast)
|
if(beast)
|
||||||
smodel = "meshes\\base_animkna.nif";
|
smodel = "meshes\\base_animkna.nif";
|
||||||
physics.insertObjectPhysics(ptr, smodel);
|
physics.insertActorPhysics(ptr, smodel);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,6 +224,18 @@ void NpcAnimation::insertFreePart(const std::string &mesh, const std::string suf
|
||||||
NIFLoader::load(meshNumbered);
|
NIFLoader::load(meshNumbered);
|
||||||
|
|
||||||
Ogre::Entity* ent = mRend.getScene()->createEntity(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);
|
insert->attachObject(ent);
|
||||||
entityparts.push_back(ent);
|
entityparts.push_back(ent);
|
||||||
shapes = ((NIFLoader::getSingletonPtr())->getShapes(mesh + "0000" + suffix));
|
shapes = ((NIFLoader::getSingletonPtr())->getShapes(mesh + "0000" + suffix));
|
||||||
|
|
Loading…
Reference in a new issue