示例#1
0
void CRateOfDeathHelper_Target::DebugDraw( float& drawPosY )
{
	IRenderer* pRenderer = gEnv->pRenderer;
	const float color[ 4 ] = { 1, 1, 1, 1 };

	if ( m_pTarget )
	{
		pRenderer->Draw2dLabel( 10, drawPosY, 1.2f, color, false, "Target '%s'", m_pTarget->GetName() );
	}
	else
	{
		pRenderer->Draw2dLabel( 10, drawPosY, 1.2f, color, false, "No Target" );
	}
	drawPosY += 15;

	pRenderer->Draw2dLabel( 15, drawPosY, 1.2f, color, false, "Stance: %s", GetStanceName( m_stance ) );
	drawPosY += 15;

	pRenderer->Draw2dLabel( 15, drawPosY, 1.2f, color, false, "Zone: %s", GetZoneName( m_zone ) );
	drawPosY += 15;

	pRenderer->Draw2dLabel( 15, drawPosY, 1.2f, color, false, "In vehicle: %s", m_isInVehicle ? "yes" : "no" );
	drawPosY += 15;

	pRenderer->Draw2dLabel( 15, drawPosY, 1.2f, color, false, "Stay alive time factor: %f", m_stayAliveTimeFactor );
	drawPosY += 15;

	m_healthThresholdHelper.DebugDraw( drawPosY );
	drawPosY += 5;
}
示例#2
0
文件: api.cpp 项目: bwRavencl/X-fr24
// thread function that handels the update process
static void *UpdateThreadFunction(void *ptr)
{
    srand(time(NULL));

    while (true)
    {
        pthread_mutex_lock(&positionMutex);
        double latitude = userLatitude, longitude = userLongitude;
        pthread_mutex_unlock(&positionMutex);

        char *balancerUrl = GetBalancerUrl();
//        printf("URL -> %s\n", balancerUrl);
        if (balancerUrl != NULL)
        {
            char *zoneName = GetZoneName(latitude, longitude);
            if (zoneName != NULL)
            {
//                printf("ZONE -> %s\n", zoneName);
                UpdatePlanes(balancerUrl, zoneName, latitude, longitude);
                free(zoneName);
                zoneName = NULL;
            }

            free(balancerUrl);
            balancerUrl = NULL;
        }

        sleep(3);
    }
}
示例#3
0
std::wstring MapNameTextTable::GetZoneName(TBLIDX tblidx)
{
	std::wstring wstrText;

	GetZoneName(tblidx, &wstrText);

	return wstrText;
}