diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/soundscape.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/soundscape.h')
| -rw-r--r-- | mp/src/game/server/soundscape.h | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/mp/src/game/server/soundscape.h b/mp/src/game/server/soundscape.h index 688c8ddb..3e5e8267 100644 --- a/mp/src/game/server/soundscape.h +++ b/mp/src/game/server/soundscape.h @@ -1,116 +1,116 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef SOUNDSCAPE_H
-#define SOUNDSCAPE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-class CEnvSoundscape;
-
-struct ss_update_t
-{
- CBasePlayer *pPlayer;
- CEnvSoundscape *pCurrentSoundscape;
- Vector playerPosition;
- float currentDistance;
- int traceCount;
- bool bInRange;
-};
-
-class CEnvSoundscape : public CPointEntity
-{
-public:
- DECLARE_CLASS( CEnvSoundscape, CPointEntity );
- DECLARE_DATADESC();
-
- CEnvSoundscape();
- ~CEnvSoundscape();
-
- bool KeyValue( const char *szKeyName, const char *szValue );
- void Spawn( void );
- void Precache( void );
- void UpdateForPlayer( ss_update_t &update );
- void WriteAudioParamsTo( audioparams_t &audio );
- virtual int UpdateTransmitState();
- bool InRangeOfPlayer( CBasePlayer *pPlayer );
- void DrawDebugGeometryOverlays( void );
-
- void InputEnable( inputdata_t &inputdata );
- void InputDisable( inputdata_t &inputdata );
- void InputToggleEnabled( inputdata_t &inputdata );
-
- string_t GetSoundscapeName() const {return m_soundscapeName;}
-
-
-private:
-
- bool IsEnabled( void ) const;
- void Disable( void );
- void Enable( void );
-
-
-public:
- COutputEvent m_OnPlay;
- float m_flRadius;
- string_t m_soundscapeName;
- int m_soundscapeIndex;
- int m_soundscapeEntityId;
- string_t m_positionNames[NUM_AUDIO_LOCAL_SOUNDS];
-
- // If this is set, then this soundscape ignores all its parameters and uses
- // those of this soundscape.
- CHandle<CEnvSoundscape> m_hProxySoundscape;
-
-
-private:
-
- bool m_bDisabled;
-};
-
-
-class CEnvSoundscapeProxy : public CEnvSoundscape
-{
-public:
- DECLARE_CLASS( CEnvSoundscapeProxy, CEnvSoundscape );
- DECLARE_DATADESC();
-
- CEnvSoundscapeProxy();
- virtual void Activate();
-
- // Here just to stop it falling back to CEnvSoundscape's, and
- // printing bogus errors about missing soundscapes.
- virtual void Precache() { return; }
-
-private:
- string_t m_MainSoundscapeName;
-};
-
-
-class CEnvSoundscapeTriggerable : public CEnvSoundscape
-{
-friend class CTriggerSoundscape;
-
-public:
- DECLARE_CLASS( CEnvSoundscapeTriggerable, CEnvSoundscape );
- DECLARE_DATADESC();
-
- CEnvSoundscapeTriggerable();
-
- // Overrides the base class's think and prevents it from running at all.
- virtual void Think();
-
-
-private:
-
- // Passed through from CTriggerSoundscape.
- void DelegateStartTouch( CBaseEntity *pEnt );
- void DelegateEndTouch( CBaseEntity *pEnt );
-};
-
-
-#endif // SOUNDSCAPE_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef SOUNDSCAPE_H +#define SOUNDSCAPE_H +#ifdef _WIN32 +#pragma once +#endif + +class CEnvSoundscape; + +struct ss_update_t +{ + CBasePlayer *pPlayer; + CEnvSoundscape *pCurrentSoundscape; + Vector playerPosition; + float currentDistance; + int traceCount; + bool bInRange; +}; + +class CEnvSoundscape : public CPointEntity +{ +public: + DECLARE_CLASS( CEnvSoundscape, CPointEntity ); + DECLARE_DATADESC(); + + CEnvSoundscape(); + ~CEnvSoundscape(); + + bool KeyValue( const char *szKeyName, const char *szValue ); + void Spawn( void ); + void Precache( void ); + void UpdateForPlayer( ss_update_t &update ); + void WriteAudioParamsTo( audioparams_t &audio ); + virtual int UpdateTransmitState(); + bool InRangeOfPlayer( CBasePlayer *pPlayer ); + void DrawDebugGeometryOverlays( void ); + + void InputEnable( inputdata_t &inputdata ); + void InputDisable( inputdata_t &inputdata ); + void InputToggleEnabled( inputdata_t &inputdata ); + + string_t GetSoundscapeName() const {return m_soundscapeName;} + + +private: + + bool IsEnabled( void ) const; + void Disable( void ); + void Enable( void ); + + +public: + COutputEvent m_OnPlay; + float m_flRadius; + string_t m_soundscapeName; + int m_soundscapeIndex; + int m_soundscapeEntityId; + string_t m_positionNames[NUM_AUDIO_LOCAL_SOUNDS]; + + // If this is set, then this soundscape ignores all its parameters and uses + // those of this soundscape. + CHandle<CEnvSoundscape> m_hProxySoundscape; + + +private: + + bool m_bDisabled; +}; + + +class CEnvSoundscapeProxy : public CEnvSoundscape +{ +public: + DECLARE_CLASS( CEnvSoundscapeProxy, CEnvSoundscape ); + DECLARE_DATADESC(); + + CEnvSoundscapeProxy(); + virtual void Activate(); + + // Here just to stop it falling back to CEnvSoundscape's, and + // printing bogus errors about missing soundscapes. + virtual void Precache() { return; } + +private: + string_t m_MainSoundscapeName; +}; + + +class CEnvSoundscapeTriggerable : public CEnvSoundscape +{ +friend class CTriggerSoundscape; + +public: + DECLARE_CLASS( CEnvSoundscapeTriggerable, CEnvSoundscape ); + DECLARE_DATADESC(); + + CEnvSoundscapeTriggerable(); + + // Overrides the base class's think and prevents it from running at all. + virtual void Think(); + + +private: + + // Passed through from CTriggerSoundscape. + void DelegateStartTouch( CBaseEntity *pEnt ); + void DelegateEndTouch( CBaseEntity *pEnt ); +}; + + +#endif // SOUNDSCAPE_H |