mirror of
https://github.com/ENSL/NS.git
synced 2024-11-22 12:41:33 +00:00
4f13237895
Change CRLF to LF in repo.
77 lines
1.5 KiB
C++
77 lines
1.5 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 1999, 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.
|
|
*
|
|
****/
|
|
//
|
|
// hud_msg.cpp
|
|
//
|
|
|
|
#include "hud.h"
|
|
#include "cl_util.h"
|
|
#include "common/r_efx.h"
|
|
#include "mod/AvHNetworkMessages.h"
|
|
|
|
// : duck toggle
|
|
extern bool g_bDuckToggled;
|
|
// :
|
|
|
|
#define MAX_CLIENTS 32
|
|
|
|
#if !defined( _TFC )
|
|
extern BEAM *pBeam;
|
|
extern BEAM *pBeam2;
|
|
#endif
|
|
/// USER-DEFINED SERVER MESSAGE HANDLERS
|
|
|
|
int CHud :: MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf )
|
|
{
|
|
NetMsg_ResetHUD( pbuf, iSize );
|
|
|
|
// clear all hud data
|
|
HUDLIST *pList = m_pHudList;
|
|
|
|
while ( pList )
|
|
{
|
|
if ( pList->p )
|
|
pList->p->Reset();
|
|
pList = pList->pNext;
|
|
}
|
|
|
|
// reset sensitivity
|
|
m_flMouseSensitivity = 0;
|
|
|
|
// : duck toggle
|
|
g_bDuckToggled = false;
|
|
// :
|
|
|
|
return 0;
|
|
}
|
|
|
|
void CAM_ToFirstPerson(void);
|
|
void CHud :: MsgFunc_ViewMode( const char *pszName, int iSize, void *pbuf )
|
|
{
|
|
CAM_ToFirstPerson();
|
|
}
|
|
|
|
void CHud :: MsgFunc_InitHUD( const char *pszName, int iSize, void *pbuf )
|
|
{
|
|
// prepare all hud data
|
|
HUDLIST *pList = m_pHudList;
|
|
|
|
while (pList)
|
|
{
|
|
if ( pList->p )
|
|
pList->p->InitHUDData();
|
|
pList = pList->pNext;
|
|
}
|
|
}
|