Disjointed free part fix

actorid
Jason Hooks 13 years ago
parent 41769f202c
commit e35aee0f89

@ -9,11 +9,15 @@ namespace MWRender{
std::string Animation::getUniqueID(std::string mesh){ std::string Animation::getUniqueID(std::string mesh){
int counter; int counter;
if(mUniqueIDs.find(mesh) == mUniqueIDs.end()){ std::string copy = mesh;
counter = mUniqueIDs[mesh] = 0; std::transform(copy.begin(), copy.end(), copy.begin(), ::tolower);
if(mUniqueIDs.find(copy) == mUniqueIDs.end()){
counter = mUniqueIDs[copy] = 0;
}
else{
mUniqueIDs[copy] = mUniqueIDs[copy] + 1;
counter = mUniqueIDs[copy];
} }
else
counter = mUniqueIDs[mesh]++;
std::stringstream out; std::stringstream out;
if(counter > 99 && counter < 1000) if(counter > 99 && counter < 1000)
@ -463,7 +467,7 @@ namespace MWRender{
base->getAllAnimationStates()->_notifyDirty(); base->getAllAnimationStates()->_notifyDirty();
//base->_updateAnimation(); //base->_updateAnimation();
base->_notifyMoved(); base->_notifyMoved();
for(unsigned int i = 0; i < entityparts.size(); i++){ for(unsigned int i = 0; i < entityparts.size(); i++){
Ogre::SkeletonInstance* skel = entityparts[i]->getSkeleton(); Ogre::SkeletonInstance* skel = entityparts[i]->getSkeleton();

@ -233,13 +233,11 @@ void RenderingManager::toggleLight()
void RenderingManager::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, void RenderingManager::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName,
int mode, int number) int mode, int number)
{ {
std::cout<<"play animation " << groupName << ", " << mode << ", " << number << std::endl;
mActors.playAnimationGroup(ptr, groupName, mode, number); mActors.playAnimationGroup(ptr, groupName, mode, number);
} }
void RenderingManager::skipAnimation (const MWWorld::Ptr& ptr) void RenderingManager::skipAnimation (const MWWorld::Ptr& ptr)
{ {
std::cout<<"skip animation"<<std::endl;
mActors.skipAnimation(ptr); mActors.skipAnimation(ptr);
} }
void RenderingManager::addTime(){ void RenderingManager::addTime(){

Loading…
Cancel
Save