In 1109 a couple of things changed regarding HLTV. here is a list of minimum changes you need to apply to get it running with HLTV again. For a complete list of changes for the next SDK release. if you have problems integration HLTV in your MOD or something in this quick guide is not clear, please email me: martin@slipgate.de. Visit www.slipgate.de for latest updates. SERVER SIDE CHANGES ------------------- util.h: // #define SVC_HLTV 50 // not needed anymore #define SVC_DIRECTOR 51 // messsage for director module in proxy // sub commands of svc_director: #define DRC_CMD_NONE 0 // NULL director command #define DRC_CMD_START 1 // start director mode #define DRC_CMD_EVENT 2 // informs about director event #define DRC_CMD_MODE 3 // switches camera modes #define DRC_CMD_CAMERA 4 // sets camera registers #define DRC_CMD_TIMESCALE 5 // sets time scale #define DRC_CMD_MESSAGE 6 // send HUD centerprint #define DRC_CMD_SOUND 7 // plays a particular sound #define DRC_CMD_STATUS 8 // status info about broadcast #define DRC_CMD_BANNER 9 // banner file name for HLTV gui #define DRC_CMD_FADE 10 // send screen fade command #define DRC_CMD_SHAKE 11 // send screen shake command #define DRC_CMD_STUFFTEXT 12 // like the normal svc_stufftext but as director command #define DRC_CMD_LAST 12 // HLTV_EVENT event flags #define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important) #define DRC_FLAG_SIDE (1<<4) // #define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene #define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo #define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc) #define DRC_FLAG_INTRO (1<<8) // is a introduction scene #define DRC_FLAG_FINAL (1<<9) // is a final scene #define DRC_FLAG_NO_RANDOM (1<<10) // don't randomize event data a director message is now svc_director (not svc_hltv), also a length byte was added: // send director message, that something important happed here MESSAGE_BEGIN( MSG_SPEC, SVC_DIRECTOR ); WRITE_BYTE ( 9 ); // command length in bytes = (1+2+2+4) WRITE_BYTE ( DRC_CMD_EVENT ); // bomb explode WRITE_SHORT( ENTINDEX(this->edict()) ); // index number of primary entity WRITE_SHORT( 0 ); // index number of secondary entity WRITE_LONG( 15 | DRC_FLAG_DRAMATIC ); // eventflags (priority and flags) MESSAGE_END(); CLIENT SIDE CHANGES ------------------- these are just some code examples, copy & paste will not work. the client interface function HUD_DirectorEvent() is now HUD_DirectorMessage(), cdll_int.cpp: extern "C" { int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ); int DLLEXPORT HUD_VidInit( void ); int DLLEXPORT HUD_Init( void ); int DLLEXPORT HUD_Redraw( float flTime, int intermission ); int DLLEXPORT HUD_UpdateClientData( client_data_t *cdata, float flTime ); int DLLEXPORT HUD_Reset ( void ); void DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server ); void DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove ); char DLLEXPORT HUD_PlayerMoveTexture( char *name ); int DLLEXPORT HUD_ConnectionlessPacket( struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size ); int DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs ); void DLLEXPORT HUD_Frame( double time ); void DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking); void DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf ); } ... /* ========================== HUD_DirectorMessage Called when a director event message was received ========================== */ void DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf ) { gHUD.m_Spectator.DirectorMessage( iSize, pbuf ); } ... void CHudSpectator::DirectorMessage( int iSize, void *pbuf ) { float value; char * string; BEGIN_READ( pbuf, iSize ); int cmd = READ_BYTE(); switch ( cmd ) // director command byte { case DRC_CMD_START : // now we have to do some things clientside, since the proxy doesn't know our mod g_iPlayerClass = 0; g_iTeamNumber = 0; // fake a InitHUD & ResetHUD message gHUD.MsgFunc_InitHUD(NULL,0, NULL); gHUD.MsgFunc_ResetHUD(NULL, 0, NULL); // put all init stuff in break; case DRC_CMD_EVENT : m_lastPrimaryObject = READ_WORD(); m_lastSecondaryObject = READ_WORD(); m_iObserverFlags = READ_LONG(); if ( m_autoDirector->value ) { if ( (g_iUser2 != m_lastPrimaryObject) || (g_iUser3 != m_lastSecondaryObject) ) V_ResetChaseCam(); g_iUser2 = m_lastPrimaryObject; g_iUser3 = m_lastSecondaryObject; } // gEngfuncs.Con_Printf("Director Camera: %i %i\n", firstObject, secondObject); break; case DRC_CMD_TIMESCALE : value = READ_FLOAT(); // if timescale was changed by slow motion effect break; case DRC_CMD_STATUS: READ_LONG(); // total number of spectator slots m_iSpectatorNumber = READ_LONG(); // total number of spectator READ_WORD(); // total number of relay proxies gViewPort->UpdateSpectatorPanel(); break; case DRC_CMD_BANNER: // gEngfuncs.Con_DPrintf("GUI: Banner %s\n",READ_STRING() ); // name of banner tga eg gfx/temp/7454562234563475.tga gViewPort->m_pSpectatorPanel->m_TopBanner->LoadImage( READ_STRING() ); gViewPort->UpdateSpectatorPanel(); break; default : gEngfuncs.Con_DPrintf("CHudSpectator::DirectorMessage: unknown command %i.\n", cmd ); } } void CHudSpectator::Reset() { // Reset HUD if ( strcmp( m_OverviewData.map, gEngfuncs.pfnGetLevelName() ) ) { // update level overview if level changed ParseOverviewFile(); LoadMapSprites(); } memset( &m_OverviewEntities, 0, sizeof(m_OverviewEntities)); SetSpectatorStartPosition(); } void CHudSpectator::InitHUDData() { m_lastPrimaryObject = m_lastSecondaryObject = 0; m_flNextObserverInput = 0.0f; m_lastHudMessage = 0; m_iSpectatorNumber = 0; iJumpSpectator = 0; g_iUser1 = g_iUser2 = 0; memset( &m_OverviewData, 0, sizeof(m_OverviewData)); memset( &m_OverviewEntities, 0, sizeof(m_OverviewEntities)); if ( gEngfuncs.IsSpectateOnly() || gEngfuncs.pDemoAPI->IsPlayingback() ) m_autoDirector->value = 1.0f; else m_autoDirector->value = 0.0f; Reset(); SetModes( OBS_CHASE_FREE, INSET_OFF ); g_iUser2 = 0; // fake not target until first camera command // reset HUD FOV gHUD.m_iFOV = CVAR_GET_FLOAT("default_fov"); }