ns/main/source/cl_dll/hud_msg.cpp
tankefugl cbd7e95495 Reverted changes to revision 45.
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@76 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-04-13 22:50:14 +00:00

69 lines
No EOL
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"
#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;
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;
}
}