int CObjectTeleporter::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { CObjectTeleporter *pMatch = GetMatchingTeleporter(); char tempstr[512]; // match Q_snprintf( tempstr, sizeof( tempstr ), "Match Found: %s", ( pMatch != NULL ) ? "Yes" : "No" ); EntityText(text_offset,tempstr,0); text_offset++; // state Q_snprintf( tempstr, sizeof( tempstr ), "State: %d", m_iState ); EntityText(text_offset,tempstr,0); text_offset++; // recharge time if ( gpGlobals->curtime < m_flRechargeTime ) { float flPercent = ( m_flRechargeTime - gpGlobals->curtime ) / g_flTeleporterRechargeTimes[ GetUpgradeLevel() - 1 ]; Q_snprintf( tempstr, sizeof( tempstr ), "Recharging: %.1f", flPercent ); EntityText(text_offset,tempstr,0); text_offset++; } } return text_offset; }
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- int CBaseButton::DrawDebugTextOverlays() { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { static const char *pszStates[] = { "Pressed", "Unpressed", "Pressing...", "Unpressing...", "<UNKNOWN STATE>", }; char tempstr[255]; int nState = m_toggle_state; if ( ( nState < 0 ) || ( nState > 3 ) ) { nState = 4; } Q_snprintf( tempstr, sizeof(tempstr), "State: %s", pszStates[nState] ); EntityText( text_offset, tempstr, 0 ); text_offset++; Q_snprintf( tempstr, sizeof(tempstr), "%s", m_bLocked ? "Locked" : "Unlocked" ); EntityText( text_offset, tempstr, 0 ); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Returns current text offset from the top //----------------------------------------------------------------------------- int CEnvShake::DrawDebugTextOverlays( void ) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; // print amplitude Q_snprintf(tempstr,sizeof(tempstr)," magnitude: %f", m_Amplitude); EntityText(text_offset,tempstr,0); text_offset++; // print frequency Q_snprintf(tempstr,sizeof(tempstr)," frequency: %f", m_Frequency); EntityText(text_offset,tempstr,0); text_offset++; // print duration Q_snprintf(tempstr,sizeof(tempstr)," duration: %f", m_Duration); EntityText(text_offset,tempstr,0); text_offset++; // print radius Q_snprintf(tempstr,sizeof(tempstr)," radius: %f", m_Radius); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CFuncTank::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { // -------------- // State // -------------- char tempstr[255]; if (IsActive()) { Q_strncpy(tempstr,"State: Active",sizeof(tempstr)); } else { Q_strncpy(tempstr,"State: Inactive",sizeof(tempstr)); } EntityText(text_offset,tempstr,0); text_offset++; // ------------------- // Print Firing Speed // -------------------- Q_snprintf(tempstr,sizeof(tempstr),"Fire Rate: %f",m_fireRate); EntityText(text_offset,tempstr,0); text_offset++; // -------------- // Print Target // -------------- if (m_hTarget!=NULL) { Q_snprintf(tempstr,sizeof(tempstr),"Target: %s",m_hTarget->GetDebugName()); } else { Q_snprintf(tempstr,sizeof(tempstr),"Target: - "); } EntityText(text_offset,tempstr,0); text_offset++; // -------------- // Target Pos // -------------- if (m_spawnflags & SF_TANK_AIM_AT_POS) { Q_snprintf(tempstr,sizeof(tempstr),"Aim Pos: %3.0f %3.0f %3.0f",m_vTargetPosition.x,m_vTargetPosition.y,m_vTargetPosition.z); } else { Q_snprintf(tempstr,sizeof(tempstr),"Aim Pos: - "); } EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int CPointAngleSensor::DrawDebugTextOverlays(void) { int nOffset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { float flDot; bool bFacing = IsFacingWithinTolerance(m_hTargetEntity, m_hLookAtEntity, m_flDotTolerance, &flDot); char tempstr[512]; Q_snprintf(tempstr, sizeof(tempstr), "delta ang (dot) : %.2f (%f)", RAD2DEG(acos(flDot)), flDot); EntityText( nOffset, tempstr, 0); nOffset++; Q_snprintf(tempstr, sizeof(tempstr), "tolerance ang (dot): %.2f (%f)", RAD2DEG(acos(m_flDotTolerance)), m_flDotTolerance); EntityText( nOffset, tempstr, 0); nOffset++; Q_snprintf(tempstr, sizeof(tempstr), "facing: %s", bFacing ? "yes" : "no"); EntityText( nOffset, tempstr, 0); nOffset++; } return nOffset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CMomentaryRotButton::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[255]; Q_snprintf(tempstr,sizeof(tempstr),"QAngle: %.2f %.2f %.2f", GetLocalAngles()[0], GetLocalAngles()[1], GetLocalAngles()[2]); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"AVelocity: %.2f %.2f %.2f", GetLocalAngularVelocity()[0], GetLocalAngularVelocity()[1], GetLocalAngularVelocity()[2]); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"Target Pos: %3.3f",m_IdealYaw); EntityText(text_offset,tempstr,0); text_offset++; float flCurPos = GetPos(GetLocalAngles()); Q_snprintf(tempstr,sizeof(tempstr),"Current Pos: %3.3f",flCurPos); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"Direction: %s",(m_direction == 1) ? "Forward" : "Backward"); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CBreakable::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { if ( GetMaxHealth() ) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr),"Health: %i",GetHealth()); EntityText(text_offset,tempstr,0); text_offset++; } if ( m_iszBasePropData != NULL_STRING ) { char tempstr[512]; Q_snprintf(tempstr, sizeof(tempstr),"Base PropData: %s", STRING(m_iszBasePropData) ); EntityText( text_offset, tempstr, 0); text_offset++; } } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CScriptedTarget::DrawDebugTextOverlays(void) { // Skip AIClass debug overlays int text_offset = CBaseEntity::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { // -------------- // Print State // -------------- char tempstr[512]; if (m_iDisabled) { Q_strncpy(tempstr,"State: Off",sizeof(tempstr)); } else { Q_strncpy(tempstr,"State: On",sizeof(tempstr)); } EntityText(text_offset,tempstr,0); text_offset++; // ----------------- // Print Next Entity // ----------------- CBaseEntity *pTarget = GetNextTarget(); if (pTarget) { Q_snprintf(tempstr,sizeof(tempstr),"Next: %s",pTarget->GetDebugName() ); } else { Q_strncpy(tempstr,"Next: -NONE-",sizeof(tempstr)); } EntityText(text_offset,tempstr,0); text_offset++; // -------------- // Print Target // -------------- if (GetTarget()!=NULL) { Q_snprintf(tempstr,sizeof(tempstr),"User: %s",GetTarget()->GetDebugName() ); } else if (m_iDisabled) { Q_strncpy(tempstr,"User: -NONE-",sizeof(tempstr)); } else { Q_strncpy(tempstr,"User: -LOOKING-",sizeof(tempstr)); } EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
int CASW_Simple_Alien::DrawDebugTextOverlays() { int text_offset = 0; text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; // health Q_snprintf(tempstr,sizeof(tempstr),"Health: %i", m_iHealth ); EntityText(text_offset,tempstr,0); text_offset++; // state static const char *pStateNames[] = { "Idling", "Attacking" }; if ( m_iState < ARRAYSIZE(pStateNames) ) { Q_snprintf(tempstr,sizeof(tempstr),"State: %s, ", pStateNames[m_iState] ); EntityText(text_offset,tempstr,0); text_offset++; } // enemy if (GetEnemy()) { Q_snprintf(tempstr,sizeof(tempstr),"Enemy: %d %s", GetEnemy()->entindex(), GetEnemy()->GetClassname() ); EntityText(text_offset,tempstr,0); text_offset++; } else { Q_snprintf(tempstr,sizeof(tempstr),"Enemy: NONE" ); EntityText(text_offset,tempstr,0); text_offset++; } // alien orders static const char *pOrderNames[] = { "SpreadThenHibernate", "MoveTo", "MoveToIgnoring", "MoveToNearestM", "None" }; if ( (int)m_AlienOrders < ARRAYSIZE(pOrderNames) ) { Q_snprintf(tempstr,sizeof(tempstr),"Orders: %s, ", pOrderNames[m_iState] ); EntityText(text_offset,tempstr,0); text_offset++; } // moving Q_snprintf(tempstr,sizeof(tempstr),"Moving: %s, ", m_bMoving ? "Yes" : "No" ); EntityText(text_offset,tempstr,0); text_offset++; // sleeping Q_snprintf(tempstr,sizeof(tempstr),"Sleeping: %s, ", m_bSleeping ? "Yes" : "No" ); EntityText(text_offset,tempstr,0); text_offset++; // collision Q_snprintf(tempstr,sizeof(tempstr),"Col Group: %d, ", GetCollisionGroup()); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int CTeamControlPoint::DrawDebugTextOverlays( void ) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[1024]; Q_snprintf(tempstr, sizeof(tempstr), "INDEX: (%d)", GetPointIndex() ); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf( tempstr, sizeof(tempstr), "Red Previous Points: "); for ( int i = 0; i < MAX_PREVIOUS_POINTS; i++ ) { if ( m_TeamData[2].iszPreviousPoint[i] != NULL_STRING ) { Q_strncat( tempstr, STRING(m_TeamData[2].iszPreviousPoint[i]), 1024, COPY_ALL_CHARACTERS ); Q_strncat( tempstr, ", ", 1024, COPY_ALL_CHARACTERS ); } } EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf( tempstr, sizeof(tempstr), "Blue Previous Points: " ); for ( int i = 0; i < MAX_PREVIOUS_POINTS; i++ ) { if ( m_TeamData[3].iszPreviousPoint[i] != NULL_STRING ) { Q_strncat( tempstr, STRING(m_TeamData[3].iszPreviousPoint[i]), 1024, COPY_ALL_CHARACTERS ); Q_strncat( tempstr, ", ", 1024, COPY_ALL_CHARACTERS ); } } EntityText(text_offset,tempstr,0); text_offset++; for ( int i = 0; i < MAX_CONTROL_POINT_TEAMS; i++ ) { if ( ObjectiveResource()->GetBaseControlPointForTeam(i) == GetPointIndex() ) { Q_snprintf(tempstr, sizeof(tempstr), "Base Control Point for Team %d", i ); EntityText(text_offset,tempstr,0); text_offset++; } } } return text_offset; }
void DrawDebugGeometryOverlays(void) { if (m_debugOverlays & OVERLAY_BBOX_BIT) { if ( m_lastDamage > gpGlobals->curtime && m_flHeatAbsorb > 0 ) { NDebugOverlay::EntityBounds(this, 88, 255, 128, 0 ,0); char tempstr[512]; Q_snprintf( tempstr, sizeof(tempstr), "Heat: %.1f", m_flHeatAbsorb ); EntityText(1,tempstr, 0); } else if ( !IsBurning() ) { NDebugOverlay::EntityBounds(this, 88, 88, 128, 0 ,0); } if ( IsBurning() ) { Vector mins, maxs; if ( GetFireDimensions( &mins, &maxs ) ) { NDebugOverlay::Box(GetAbsOrigin(), mins, maxs, 128, 0, 0, 10, 0); } } } BaseClass::DrawDebugGeometryOverlays(); }
int CDirectorSpawn::DrawDebugTextOverlays() { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char message[512]; Q_snprintf(message, sizeof(message), "NPC's creados: %i", Childs); if ( !InGameRules()->IsMultiplayer() ) { CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); if ( pPlayer ) { // Calculamos la distancia del creador al jugador. Vector distToMaker = GetAbsOrigin() - pPlayer->GetAbsOrigin(); float dist = VectorNormalize(distToMaker); Q_snprintf(message, sizeof(message), "Distancia: %i", dist); } } EntityText(text_offset++, message, 0); } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CRagdollProp::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { if (m_ragdoll.listCount) { float mass = 0; for ( int i = 0; i < m_ragdoll.listCount; i++ ) { if ( m_ragdoll.list[i].pObject != NULL ) { mass += m_ragdoll.list[i].pObject->GetMass(); } } char tempstr[512]; Q_snprintf(tempstr, sizeof(tempstr),"Mass: %.2f kg / %.2f lb (%s)", mass, kg2lbs(mass), GetMassEquivalent(mass) ); EntityText( text_offset, tempstr, 0); text_offset++; } } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Input : // Output : Current text offset from the top //----------------------------------------------------------------------------- int CTFTeamSpawn::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr),"TeamNumber: %d", GetTeamNumber() ); EntityText(text_offset,tempstr,0); text_offset++; color32 teamcolor = g_aTeamColors[ GetTeamNumber() ]; teamcolor.a = 0; if ( m_bDisabled ) { Q_snprintf(tempstr,sizeof(tempstr),"DISABLED" ); EntityText(text_offset,tempstr,0); text_offset++; teamcolor.a = 255; } // Make sure it's empty Vector mins = g_pGameRules->GetViewVectors()->m_vHullMin; Vector maxs = g_pGameRules->GetViewVectors()->m_vHullMax; Vector vTestMins = GetAbsOrigin() + mins; Vector vTestMaxs = GetAbsOrigin() + maxs; // First test the starting origin. if ( UTIL_IsSpaceEmpty( NULL, vTestMins, vTestMaxs ) ) { NDebugOverlay::Box( GetAbsOrigin(), mins, maxs, teamcolor.r, teamcolor.g, teamcolor.b, teamcolor.a, 0.1); } else { NDebugOverlay::Box( GetAbsOrigin(), mins, maxs, 0,255,0, 0, 0.1); } if ( m_hControlPoint ) { NDebugOverlay::Line( GetAbsOrigin(), m_hControlPoint->GetAbsOrigin(), teamcolor.r, teamcolor.g, teamcolor.b, false, 0.1 ); } } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CNPC_Launcher::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr),"State: %s", (m_pfnThink) ? "On" : "Off" ); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"LOS: %s", (FBitSet (m_spawnflags, SF_LAUNCHER_CHECK_LOS)) ? "On" : "Off" ); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CFogController::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr),"State: %s",(m_fog.enable)?"On":"Off"); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"Start: %3.0f",m_fog.start.Get()); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"End : %3.0f",m_fog.end.Get()); EntityText(text_offset,tempstr,0); text_offset++; color32 color = m_fog.colorPrimary; Q_snprintf(tempstr,sizeof(tempstr),"1) Red : %i",color.r); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"1) Green: %i",color.g); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"1) Blue : %i",color.b); EntityText(text_offset,tempstr,0); text_offset++; color = m_fog.colorSecondary; Q_snprintf(tempstr,sizeof(tempstr),"2) Red : %i",color.r); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"2) Green: %i",color.g); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr,sizeof(tempstr),"2) Blue : %i",color.b); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------------------------------- int CFuncNavBlocker::DrawDebugTextOverlays( void ) { int offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { CFmtStr str; // FIRST_GAME_TEAM skips TEAM_SPECTATOR and TEAM_UNASSIGNED, so we can print // useful team names in a non-game-specific fashion. for ( int i=FIRST_GAME_TEAM; i<FIRST_GAME_TEAM + MAX_NAV_TEAMS; ++i ) { if ( IsBlockingNav( i ) ) { CTeam *team = GetGlobalTeam( i ); if ( team ) { EntityText( offset++, str.sprintf( "blocking team %s", team->GetName() ), 0 ); } else { EntityText( offset++, str.sprintf( "blocking team %d", i ), 0 ); } } } NavAreaCollector collector( true ); Extent extent; extent.Init( this ); TheNavMesh->ForAllAreasOverlappingExtent( collector, extent ); for ( int i=0; i<collector.m_area.Count(); ++i ) { CNavArea *area = collector.m_area[i]; Extent areaExtent; area->GetExtent( &areaExtent ); debugoverlay->AddBoxOverlay( vec3_origin, areaExtent.lo, areaExtent.hi, vec3_angle, 0, 255, 0, 10, NDEBUG_PERSIST_TILL_NEXT_SERVER ); } } return offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CEnvFade::DrawDebugTextOverlays( void ) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; // print duration Q_snprintf(tempstr,sizeof(tempstr)," duration: %f", m_Duration); EntityText(text_offset,tempstr,0); text_offset++; // print hold time Q_snprintf(tempstr,sizeof(tempstr)," hold time: %f", m_HoldTime); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
int CAI_GoalEntity::DrawDebugTextOverlays() { char tempstr[512]; int offset = BaseClass::DrawDebugTextOverlays(); Q_snprintf( tempstr, sizeof(tempstr), "Active: %s", IsActive() ? "yes" : "no" ); EntityText( offset, tempstr, 0 ); offset++; return offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CFuncMoveLinear::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; float flTravelDist = (m_vecPosition1 - m_vecPosition2).Length(); float flCurDist = (m_vecPosition1 - GetLocalOrigin()).Length(); Q_snprintf(tempstr,sizeof(tempstr),"Current Pos: %3.3f",flCurDist/flTravelDist); EntityText(text_offset,tempstr,0); text_offset++; float flTargetDist = (m_vecPosition1 - m_vecFinalDest).Length(); Q_snprintf(tempstr,sizeof(tempstr),"Target Pos: %3.3f",flTargetDist/flTravelDist); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Debug infos //----------------------------------------------------------------------------- int CObjectSentrygun::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf( tempstr, sizeof( tempstr ), "Level: %d", m_iUpgradeLevel ); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf( tempstr, sizeof( tempstr ), "Shells: %d / %d", m_iAmmoShells, m_iMaxAmmoShells ); EntityText(text_offset,tempstr,0); text_offset++; if ( m_iUpgradeLevel == 3 ) { Q_snprintf( tempstr, sizeof( tempstr ), "Rockets: %d / %d", m_iAmmoRockets, m_iMaxAmmoRockets ); EntityText(text_offset,tempstr,0); text_offset++; } Q_snprintf( tempstr, sizeof( tempstr ), "Upgrade metal %d", m_iUpgradeMetal ); EntityText(text_offset,tempstr,0); text_offset++; Vector vecSrc = EyePosition(); Vector forward; // m_vecCurAngles AngleVectors( m_vecCurAngles, &forward ); NDebugOverlay::Line( vecSrc, vecSrc + forward * 200, 0, 255, 0, false, 0.1 ); // m_vecGoalAngles AngleVectors( m_vecGoalAngles, &forward ); NDebugOverlay::Line( vecSrc, vecSrc + forward * 200, 0, 0, 255, false, 0.1 ); } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int CNPC_Crow::DrawDebugTextOverlays( void ) { int nOffset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf( tempstr, sizeof( tempstr ), "morale: %d", m_nMorale ); EntityText( nOffset, tempstr, 0 ); nOffset++; if ( GetEnemy() != NULL ) { Q_snprintf( tempstr, sizeof( tempstr ), "enemy (dist): %s (%g)", GetEnemy()->GetClassname(), ( double )m_flEnemyDist ); EntityText( nOffset, tempstr, 0 ); nOffset++; } } return nOffset; }
//--------------------------------------------------------- //--------------------------------------------------------- int CBlobElement::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr), "Element #:%d", m_iElementNumber ); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//--------------------------------------------------------- //--------------------------------------------------------- int CBounceBomb::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr), pszMineStateNames[m_iMineState] ); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Think function to move the ghost //----------------------------------------------------------------------------- void GhostEntity::Think( void ) { CBaseAnimating::Think(); if (Q_strlen(m_gName) != 0) { if (!IsEffectActive(EF_NODRAW)) EntityText(0, m_gName, 0); updateStep(); HandleGhost(); } else { EndRun(); } SetNextThink( gpGlobals->curtime + 0.01f ); }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays. // Output : Returns the new text offset from the top. //----------------------------------------------------------------------------- int CBeam::DrawDebugTextOverlays(void) { #if !defined( CLIENT_DLL ) int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { // Print state char tempstr[512]; Q_snprintf(tempstr, sizeof(tempstr), "start: (%.2f,%.2f,%.2f)", GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z); EntityText(text_offset,tempstr,0); text_offset++; Q_snprintf(tempstr, sizeof(tempstr), "end : (%.2f,%.2f,%.2f)", m_vecEndPos.GetX(), m_vecEndPos.GetY(), m_vecEndPos.GetZ()); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; #else return 0; #endif }
int CNewRecharge::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr),"Charge left: %i", m_iJuice ); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int CFuncBrush::DrawDebugTextOverlays( void ) { int nOffset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf( tempstr,sizeof(tempstr), "angles: %g %g %g", (double)GetLocalAngles()[PITCH], (double)GetLocalAngles()[YAW], (double)GetLocalAngles()[ROLL] ); EntityText( nOffset, tempstr, 0 ); nOffset++; } return nOffset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Output : Current text offset from the top //----------------------------------------------------------------------------- int CEnvExplosion::DrawDebugTextOverlays( void ) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf(tempstr,sizeof(tempstr)," magnitude: %i", m_iMagnitude); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }
//----------------------------------------------------------------------------- // Purpose: Draw any debug text overlays // Input : // Output : Current text offset from the top //----------------------------------------------------------------------------- int CFuncRotating::DrawDebugTextOverlays(void) { int text_offset = BaseClass::DrawDebugTextOverlays(); if (m_debugOverlays & OVERLAY_TEXT_BIT) { char tempstr[512]; Q_snprintf( tempstr, sizeof( tempstr ),"Speed cur (target): %3.2f (%3.2f)", GetMoveSpeed( m_flSpeed ), GetMoveSpeed( m_flTargetSpeed ) ); EntityText(text_offset,tempstr,0); text_offset++; } return text_offset; }