void CHudSpectator::SetSpectatorStartPosition() { // search for info_player start if ( UTIL_FindEntityInMap( "trigger_camera", m_cameraOrigin, m_cameraAngles ) ) iJumpSpectator = 1; else if ( UTIL_FindEntityInMap( "info_player_start", m_cameraOrigin, m_cameraAngles ) ) iJumpSpectator = 1; else if ( UTIL_FindEntityInMap( "info_player_deathmatch", m_cameraOrigin, m_cameraAngles ) ) iJumpSpectator = 1; else if ( UTIL_FindEntityInMap( "info_player_coop", m_cameraOrigin, m_cameraAngles ) ) iJumpSpectator = 1; else { // jump to 0,0,0 if no better position was found VectorCopy(vec3_origin, m_cameraOrigin); VectorCopy(vec3_origin, m_cameraAngles); } VectorCopy(m_cameraOrigin, vJumpOrigin); VectorCopy(m_cameraAngles, vJumpAngles); iJumpSpectator = 1; // jump anyway }
void CHudSpectator::SetSpectatorStartPosition() { VectorCopy(vec3_origin, m_cameraOrigin); VectorCopy(vec3_origin, m_cameraAngles); // search for info_player start if (!UTIL_FindEntityInMap( "trigger_camera", m_cameraOrigin, m_cameraAngles ) ) { if (!UTIL_FindEntityInMap( "info_player_start", m_cameraOrigin, m_cameraAngles ) ) gEngfuncs.Con_Printf("Couldn't find spectator spawn point.\n"); // uh, we didn't find anything } VectorCopy(m_cameraOrigin, vJumpOrigin); VectorCopy(m_cameraAngles, vJumpAngles); iJumpSpectator = 1; }