mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
unlocking change and stop change
This commit is contained in:
parent
baa3f51886
commit
c8cca06b40
@ -40,7 +40,8 @@ namespace MWRender{
|
|||||||
shapeNumber = 0;
|
shapeNumber = 0;
|
||||||
std::vector<Nif::NiTriShapeCopy>::iterator allshapesiter;
|
std::vector<Nif::NiTriShapeCopy>::iterator allshapesiter;
|
||||||
for(allshapesiter = allshapes->begin(); allshapesiter != allshapes->end(); allshapesiter++)
|
for(allshapesiter = allshapes->begin(); allshapesiter != allshapes->end(); allshapesiter++)
|
||||||
{
|
|
||||||
|
{
|
||||||
|
|
||||||
Nif::NiTriShapeCopy& copy = *allshapesiter;
|
Nif::NiTriShapeCopy& copy = *allshapesiter;
|
||||||
std::vector<Ogre::Vector3> allvertices = copy.vertices;
|
std::vector<Ogre::Vector3> allvertices = copy.vertices;
|
||||||
@ -261,22 +262,10 @@ namespace MWRender{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
vbuf->unlock();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for(allshapesiter = allshapes->begin(); allshapesiter != allshapes->end(); allshapesiter++)
|
|
||||||
{
|
|
||||||
Nif::NiTriShapeCopy copy = *allshapesiter;
|
|
||||||
Ogre::HardwareVertexBufferSharedPtr vbuf = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(0);
|
|
||||||
|
|
||||||
Ogre::HardwareVertexBufferSharedPtr vbufNormal = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(1);
|
|
||||||
vbuf->unlock();
|
|
||||||
vbufNormal->unlock();
|
vbufNormal->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
bool Animation::timeIndex( float time, std::vector<float> times, int & i, int & j, float & x ){
|
bool Animation::timeIndex( float time, std::vector<float> times, int & i, int & j, float & x ){
|
||||||
int count;
|
int count;
|
||||||
|
@ -49,6 +49,11 @@ void CreatureAnimation::runAnimation(float timepassed){
|
|||||||
|
|
||||||
//Handle the shapes dependent on animation transforms
|
//Handle the shapes dependent on animation transforms
|
||||||
time += timepassed;
|
time += timepassed;
|
||||||
|
if(time > transformations->begin()->getStopTime()){
|
||||||
|
animate = false;
|
||||||
|
std::cout << "Stopping the animation\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
handleAnimationTransforms();
|
handleAnimationTransforms();
|
||||||
handleShapes(shapes, base, base->getSkeleton());
|
handleShapes(shapes, base, base->getSkeleton());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user