Exemple #1
0
String FileLog::MakeLogFileName( const String& fileName )
{
	CONSOLE_DECLAREVAR( g_logDirectory );

	String logDir = "Logs//";
	if( g_logDirectory->HasVal() )
	{
		//overwrite log dir
		logDir = g_logDirectory->GetStringVal();
	}

	return logDir + fileName + ".log";
}
Exemple #2
0
void PathFinder::Render()
{
	CONSOLE_DECLAREVAR( ai_drawpath );
	if( ai_drawpath->GetIntVal() == 0 )
		return;
	if( _currentPath.size() > 0 )
	{
		Vector2 lastPt;

		glColor3f(0,0,1.f);
		for ( int i = 0; i < _currentPath.size(); i++ )
		{
			Vector2 curPt = _currentPath[i];
			if( lastPt != Vector2(0) )
			{
				DrawLine( curPt, lastPt );
			}
			lastPt = curPt;
		}

		if( _currentPathIndex >= 0 && _currentPathIndex < _currentPath.size() )
		{
			glColor3f(1,0,1.f);
			
			DrawLine( _currentPath[_currentPathIndex], _currentPos );
			DrawPoint( _currentPath[_currentPathIndex], 0.1f );
		}
		DrawPoint( _currentPath[_currentPath.size()-1], 0.1f );
	}

	String currentState = GetCurrentState()->GetName();

	Vector2 screenCenter = MathUtil::WorldToScreen( _currentPos.X, _currentPos.Y );
	//Print some vals
	glColor3f(0,1.f,1.f);
	DrawGameText( currentState + String(" ") + IntToString(_currentPathIndex), "ConsoleSmall", (int)screenCenter.X, (int)screenCenter.Y );

}