mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-30 14:09:19 +00:00
upload "kind" alien swarm
This commit is contained in:
+17
-36
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Implements visual effects entities: sprites, beams, bubbles, etc.
|
||||
//
|
||||
@@ -14,8 +14,6 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#define SF_HUDHINT_ALLPLAYERS 0x0001
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -28,8 +26,6 @@ public:
|
||||
void Precache( void );
|
||||
|
||||
private:
|
||||
inline bool AllPlayers( void ) { return (m_spawnflags & SF_HUDHINT_ALLPLAYERS) != 0; }
|
||||
|
||||
void InputShowHudHint( inputdata_t &inputdata );
|
||||
void InputHideHudHint( inputdata_t &inputdata );
|
||||
string_t m_iszMessage;
|
||||
@@ -72,26 +68,19 @@ void CEnvHudHint::Precache( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
void CEnvHudHint::InputShowHudHint( inputdata_t &inputdata )
|
||||
{
|
||||
if ( AllPlayers() )
|
||||
CBaseEntity *pPlayer = NULL;
|
||||
|
||||
if ( inputdata.pActivator && inputdata.pActivator->IsPlayer() )
|
||||
{
|
||||
CReliableBroadcastRecipientFilter user;
|
||||
UserMessageBegin( user, "KeyHintText" );
|
||||
WRITE_BYTE( 1 ); // one message
|
||||
WRITE_STRING( STRING(m_iszMessage) );
|
||||
MessageEnd();
|
||||
pPlayer = inputdata.pActivator;
|
||||
}
|
||||
else
|
||||
{
|
||||
CBaseEntity *pPlayer = NULL;
|
||||
if ( inputdata.pActivator && inputdata.pActivator->IsPlayer() )
|
||||
{
|
||||
pPlayer = inputdata.pActivator;
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
|
||||
if ( pPlayer )
|
||||
{
|
||||
if ( !pPlayer || !pPlayer->IsNetClient() )
|
||||
return;
|
||||
|
||||
@@ -108,27 +97,19 @@ void CEnvHudHint::InputShowHudHint( inputdata_t &inputdata )
|
||||
//-----------------------------------------------------------------------------
|
||||
void CEnvHudHint::InputHideHudHint( inputdata_t &inputdata )
|
||||
{
|
||||
if ( AllPlayers() )
|
||||
CBaseEntity *pPlayer = NULL;
|
||||
|
||||
if ( inputdata.pActivator && inputdata.pActivator->IsPlayer() )
|
||||
{
|
||||
CReliableBroadcastRecipientFilter user;
|
||||
UserMessageBegin( user, "KeyHintText" );
|
||||
WRITE_BYTE( 1 ); // one message
|
||||
WRITE_STRING( STRING(NULL_STRING) );
|
||||
MessageEnd();
|
||||
pPlayer = inputdata.pActivator;
|
||||
}
|
||||
else
|
||||
{
|
||||
CBaseEntity *pPlayer = NULL;
|
||||
|
||||
if ( inputdata.pActivator && inputdata.pActivator->IsPlayer() )
|
||||
{
|
||||
pPlayer = inputdata.pActivator;
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
|
||||
if ( pPlayer )
|
||||
{
|
||||
if ( !pPlayer || !pPlayer->IsNetClient() )
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user