From e51f93a5b4788f6a7d9bb04b3e6ccba16973e055 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 26 Feb 2026 04:40:54 +0500 Subject: [PATCH] engine: remove unused hltv.h --- common/hltv.h | 59 ------------------------------------- engine/client/cl_debug.c | 1 - engine/client/cl_parse.c | 20 +++++-------- engine/client/cl_parse_gs.c | 1 - engine/client/cl_qparse.c | 1 - engine/common/protocol.h | 10 +++++++ 6 files changed, 18 insertions(+), 74 deletions(-) delete mode 100644 common/hltv.h diff --git a/common/hltv.h b/common/hltv.h deleted file mode 100644 index b09c6001..00000000 --- a/common/hltv.h +++ /dev/null @@ -1,59 +0,0 @@ -/*** -* -* Copyright (c) 1996-2002, Valve LLC. All rights reserved. -* -* This product contains software technology licensed from Id -* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. -* All Rights Reserved. -* -* Use, distribution, and modification of this source code and/or resulting -* object code is restricted to non-commercial enhancements to products from -* Valve LLC. All other use, distribution, or modification is prohibited -* without written permission from Valve LLC. -* -****/ - -#ifndef HLTV_H -#define HLTV_H - -#define TYPE_CLIENT 0 // client is a normal HL client (default) -#define TYPE_PROXY 1 // client is another proxy -#define TYPE_COMMENTATOR 3 // client is a commentator -#define TYPE_DEMO 4 // client is a demo file - -// sub commands of svc_hltv: -#define HLTV_ACTIVE 0 // tells client that he's an spectator and will get director commands -#define HLTV_STATUS 1 // send status infos about proxy -#define HLTV_LISTEN 2 // tell client to listen to a multicast stream - -// 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 command -#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 - -#define MAX_DIRECTOR_CMD_PARAMETERS 4 -#define MAX_DIRECTOR_CMD_STRING 128 - -#endif//HLTV_H diff --git a/engine/client/cl_debug.c b/engine/client/cl_debug.c index e56d90d6..b2307445 100644 --- a/engine/client/cl_debug.c +++ b/engine/client/cl_debug.c @@ -19,7 +19,6 @@ GNU General Public License for more details. #include "particledef.h" #include "cl_tent.h" #include "shake.h" -#include "hltv.h" #include "input.h" #define MSG_COUNT 32 // last 32 messages parsed diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 4f2b4c5a..27ed16c1 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -19,7 +19,6 @@ GNU General Public License for more details. #include "particledef.h" #include "cl_tent.h" #include "shake.h" -#include "hltv.h" #include "input.h" #if XASH_LOW_MEMORY != 2 int CL_UPDATE_BACKUP = SINGLEPLAYER_BACKUP; @@ -1990,6 +1989,8 @@ CL_ParseHLTV spectator message (hltv) sended from game.dll + +normal client ignores any of HLTV messages ============== */ void CL_ParseHLTV( sizebuf_t *msg ) @@ -2001,21 +2002,16 @@ void CL_ParseHLTV( sizebuf_t *msg ) cls.spectator = true; break; case HLTV_STATUS: - MSG_ReadLong( msg ); - MSG_ReadShort( msg ); - MSG_ReadWord( msg ); - MSG_ReadLong( msg ); - MSG_ReadLong( msg ); - MSG_ReadWord( msg ); + MSG_ReadLong( msg ); + MSG_ReadShort( msg ); + MSG_ReadWord( msg ); + MSG_ReadLong( msg ); + MSG_ReadLong( msg ); + MSG_ReadWord( msg ); break; case HLTV_LISTEN: cls.signon = SIGNONS; -#if 1 MSG_ReadString( msg ); -#else - NET_StringToAdr( MSG_ReadString( msg ), &cls.hltv_listen_address ); - NET_JoinGroup( cls.netchan.sock, cls.hltv_listen_address ); -#endif SCR_EndLoadingPlaque(); break; default: diff --git a/engine/client/cl_parse_gs.c b/engine/client/cl_parse_gs.c index ed74757c..a8f9e9d7 100644 --- a/engine/client/cl_parse_gs.c +++ b/engine/client/cl_parse_gs.c @@ -19,7 +19,6 @@ GNU General Public License for more details. #include "particledef.h" #include "cl_tent.h" #include "shake.h" -#include "hltv.h" #include "input.h" #include "server.h" diff --git a/engine/client/cl_qparse.c b/engine/client/cl_qparse.c index d72538fa..feadd1f3 100644 --- a/engine/client/cl_qparse.c +++ b/engine/client/cl_qparse.c @@ -19,7 +19,6 @@ GNU General Public License for more details. #include "particledef.h" #include "cl_tent.h" #include "shake.h" -#include "hltv.h" #include "input.h" #include "base_cmd.h" diff --git a/engine/common/protocol.h b/engine/common/protocol.h index b060ef41..f93492ca 100644 --- a/engine/common/protocol.h +++ b/engine/common/protocol.h @@ -371,4 +371,14 @@ extern const char *const svc_goldsrc_strings[svc_lastmsg+1]; // from master to any #define M2A_SERVERSLIST "f" +// +// HLTV messages +// +enum +{ + HLTV_ACTIVE = 0, + HLTV_STATUS, + HLTV_LISTEN, +}; + #endif//NET_PROTOCOL_H