mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 11:56:39 +00:00 
			
		
		
		
	Cleaned up logging statements.
This commit is contained in:
		
							parent
							
								
									aad13d315c
								
							
						
					
					
						commit
						2447f0f4aa
					
				
					 3 changed files with 0 additions and 82 deletions
				
			
		| 
						 | 
					@ -221,21 +221,7 @@ namespace MWMechanics
 | 
				
			||||||
                        if(tempDist < closestNode)
 | 
					                        if(tempDist < closestNode)
 | 
				
			||||||
                            index = counterThree;
 | 
					                            index = counterThree;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
#if 0
 | 
					 | 
				
			||||||
                    if(actor.getClass().getName(actor) == "Rat")
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        std::cout << "rat allowed "<< std::to_string(mAllowedNodes.size())
 | 
					 | 
				
			||||||
                            +" mDist "+std::to_string(mDistance)
 | 
					 | 
				
			||||||
                            +" pos "+std::to_string(static_cast<int>(npcPos[0]))
 | 
					 | 
				
			||||||
                            +", "+std::to_string(static_cast<int>(npcPos[1]))
 | 
					 | 
				
			||||||
                            <<std::endl;
 | 
					 | 
				
			||||||
                        for(int i=0; i<mAllowedNodes.size(); i++)
 | 
					 | 
				
			||||||
                            std::cout <<"rat "+std::to_string(mAllowedNodes[i].mX)
 | 
					 | 
				
			||||||
                                +", "+std::to_string(mAllowedNodes[i].mY)<<std::endl;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
                    mCurrentNode = mAllowedNodes[index];
 | 
					                    mCurrentNode = mAllowedNodes[index];
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    mAllowedNodes.erase(mAllowedNodes.begin() + index);
 | 
					                    mAllowedNodes.erase(mAllowedNodes.begin() + index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    mStoredAvailableNodes = true; // set only if successful in finding allowed nodes
 | 
					                    mStoredAvailableNodes = true; // set only if successful in finding allowed nodes
 | 
				
			||||||
| 
						 | 
					@ -310,9 +296,6 @@ namespace MWMechanics
 | 
				
			||||||
                mIdleNow = false;
 | 
					                mIdleNow = false;
 | 
				
			||||||
                mMoveNow = true;
 | 
					                mMoveNow = true;
 | 
				
			||||||
                mTrimCurrentNode = false; // just in case
 | 
					                mTrimCurrentNode = false; // just in case
 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
                std::cout << "idle door \""+actor.getClass().getName(actor)+"\" "<< std::endl;
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -408,17 +391,7 @@ namespace MWMechanics
 | 
				
			||||||
                    mAllowedNodes.erase(mAllowedNodes.begin() + randNode);
 | 
					                    mAllowedNodes.erase(mAllowedNodes.begin() + randNode);
 | 
				
			||||||
                    // check if mCurrentNode was taken out of mAllowedNodes
 | 
					                    // check if mCurrentNode was taken out of mAllowedNodes
 | 
				
			||||||
                    if(mTrimCurrentNode && mAllowedNodes.size() > 1)
 | 
					                    if(mTrimCurrentNode && mAllowedNodes.size() > 1)
 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        mTrimCurrentNode = false;
 | 
					                        mTrimCurrentNode = false;
 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
                        std::cout << "deleted "<< std::to_string(mCurrentNode.mX)
 | 
					 | 
				
			||||||
                            +", "+std::to_string(mCurrentNode.mY) << std::endl;
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
                        std::cout << "allowed size "<<
 | 
					 | 
				
			||||||
                            std::to_string(mAllowedNodes.size()) << std::endl;
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    else
 | 
					                    else
 | 
				
			||||||
                        mAllowedNodes.push_back(mCurrentNode);
 | 
					                        mAllowedNodes.push_back(mCurrentNode);
 | 
				
			||||||
                    mCurrentNode = temp;
 | 
					                    mCurrentNode = temp;
 | 
				
			||||||
| 
						 | 
					@ -428,15 +401,7 @@ namespace MWMechanics
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                // Choose a different node and delete this one from possible nodes because it is uncreachable:
 | 
					                // Choose a different node and delete this one from possible nodes because it is uncreachable:
 | 
				
			||||||
                else
 | 
					                else
 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    mAllowedNodes.erase(mAllowedNodes.begin() + randNode);
 | 
					                    mAllowedNodes.erase(mAllowedNodes.begin() + randNode);
 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
                    //std::cout << "actor \""<< actor.getClass().getName(actor) << "\"" << std::endl;
 | 
					 | 
				
			||||||
                    if(actor.getClass().getName(actor) == "Rat")
 | 
					 | 
				
			||||||
                        std::cout << "erase no path "<< std::to_string(mAllowedNodes[randNode].mX)
 | 
					 | 
				
			||||||
                            +", "+std::to_string(mAllowedNodes[randNode].mY) << std::endl;
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -506,11 +471,6 @@ namespace MWMechanics
 | 
				
			||||||
        while(paths.size() >= 2)
 | 
					        while(paths.size() >= 2)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ESM::Pathgrid::Point pt = paths.back();
 | 
					            ESM::Pathgrid::Point pt = paths.back();
 | 
				
			||||||
#if 0
 | 
					 | 
				
			||||||
            std::cout << "looking for "<<
 | 
					 | 
				
			||||||
                "pt "+std::to_string(pt.mX)+", "+std::to_string(pt.mY)
 | 
					 | 
				
			||||||
                <<std::endl;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
            for(int j = 0; j < nodes.size(); j++)
 | 
					            for(int j = 0; j < nodes.size(); j++)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                // NOTE: doesn't hadle a door with the same X/Y
 | 
					                // NOTE: doesn't hadle a door with the same X/Y
 | 
				
			||||||
| 
						 | 
					@ -518,11 +478,6 @@ namespace MWMechanics
 | 
				
			||||||
                if(nodes[j].mX == pt.mX && nodes[j].mY == pt.mY)
 | 
					                if(nodes[j].mX == pt.mX && nodes[j].mY == pt.mY)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    nodes.erase(nodes.begin() + j);
 | 
					                    nodes.erase(nodes.begin() + j);
 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
                    std::cout << "deleted "<<
 | 
					 | 
				
			||||||
                        "pt "+std::to_string(pt.mX)+", "+std::to_string(pt.mY)
 | 
					 | 
				
			||||||
                        <<std::endl;
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -258,32 +258,9 @@ namespace MWMechanics
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else
 | 
					                else
 | 
				
			||||||
                    mIsPathConstructed = false;
 | 
					                    mIsPathConstructed = false;
 | 
				
			||||||
#if 0
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    mIsPathConstructed = false;
 | 
					 | 
				
			||||||
                    std::cout << "no path "<<
 | 
					 | 
				
			||||||
                        std::to_string(startPoint.mX-xCell)
 | 
					 | 
				
			||||||
                        +", "+std::to_string(startPoint.mY-yCell)
 | 
					 | 
				
			||||||
                        +", "+std::to_string(startNode)
 | 
					 | 
				
			||||||
                        +", "+std::to_string(endPoint.mX-xCell)
 | 
					 | 
				
			||||||
                        +", "+std::to_string(endPoint.mY-yCell)
 | 
					 | 
				
			||||||
                        +", "+std::to_string(endNode.first)<<std::endl;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
                mIsPathConstructed = false;
 | 
					                mIsPathConstructed = false;
 | 
				
			||||||
#if 0
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                mIsPathConstructed = false;
 | 
					 | 
				
			||||||
                std::cout << "no end "<<
 | 
					 | 
				
			||||||
                    std::to_string(startPoint.mX-xCell)
 | 
					 | 
				
			||||||
                    +", "+std::to_string(startPoint.mY-yCell)
 | 
					 | 
				
			||||||
                    +", "+std::to_string(startNode)
 | 
					 | 
				
			||||||
                    +", "+std::to_string(endPoint.mX-xCell)
 | 
					 | 
				
			||||||
                    +", "+std::to_string(endPoint.mY-yCell)<<std::endl;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            mIsPathConstructed = false;
 | 
					            mIsPathConstructed = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -206,20 +206,6 @@ namespace MWMechanics
 | 
				
			||||||
            if(mSCCPoint[v].first == -1) // undefined (haven't visited)
 | 
					            if(mSCCPoint[v].first == -1) // undefined (haven't visited)
 | 
				
			||||||
                recursiveStrongConnect(v);
 | 
					                recursiveStrongConnect(v);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
//#if 0
 | 
					 | 
				
			||||||
        // for debugging only
 | 
					 | 
				
			||||||
        if(mCell->mName == "Gnisis, Arvs-Drelen")
 | 
					 | 
				
			||||||
        for(unsigned int v = 0; v < mPathgrid->mPoints.size(); v++)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            std::cout << "SCC \"X:" <<
 | 
					 | 
				
			||||||
                          std::to_string(mPathgrid->mPoints[v].mX)
 | 
					 | 
				
			||||||
                          +", Y:"+std::to_string(mPathgrid->mPoints[v].mY)
 | 
					 | 
				
			||||||
                          +", Num:"+std::to_string(mSCCId)
 | 
					 | 
				
			||||||
                          +", Point:"+std::to_string(v)
 | 
					 | 
				
			||||||
                          +", Group:"+std::to_string(mGraph[v].componentId)
 | 
					 | 
				
			||||||
                          <<"\""<<std::endl;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
//#endif
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool PathgridGraph::isPointConnected(const int start, const int end) const
 | 
					    bool PathgridGraph::isPointConnected(const int start, const int end) const
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue