Difference between revisions of "CAmbientGeneric (CS)"

From AlliedModders Wiki
Jump to: navigation, search
(No difference)

Revision as of 06:22, 29 August 2009



W = Windows | L = Linux

Name W. Offset L. Offset L. Diff Type Description
m_flAttenuation 34 39 +5 float Attenuation value.
m_dpv.preset 35 40 +5 int None.
m_dpv.pitchrun 36 41 +5 int Pitch shift % when sound is running 0 - 255.
m_dpv.pitchstart 37 42 +5 int Pitch shift % when sound stops or starts 0 - 255.
m_dpv.spinup 38 43 +5 int Spinup time 0 - 100.
m_dpv.volrun 39 44 +5 int Volume change % when sound is running 0 - 10.
m_dpv.volstart 40 46 +5 int Volume change % when sound stops or starts 0 - 10.
m_dpv.fadein 41 46 +5 int Volume fade in time 0 - 100.
m_dpv.fadeout 42 47 +5 int Volume fade out time 0 - 100.
m_dpv.lfotype 43 48 +5 int Low Frequency Oscillator. 0) off 1) square 2) triangle 3) random.
m_dpv.lforate 44 49 +5 int Low Frequency Oscillator. 0 - 1000, how fast lfo osciallates.
m_dpv.lfomodpitch 45 50 +5 int 0-100 mod of current pitch. 0 is off.
m_dpv.lfomodvol 46 51 +5 int 0-100 mod of current volume. 0 is off.
m_dpv.cspinup 47 52 +5 int Each trigger hit increments counter and spinup pitch.
m_dpv.cspincount 48 53 +5 int None.
m_dpv.pitch 50 55 +5 int None.
m_dpv.spinupsav 51 56 +5 int None.
m_dpv.spindownsav 52 57 +5 int None.
m_dpv.cspincount 53 58 +5 int None.
m_dpv.pitchfrac 54 59 +5 int None.
m_dpv.vol 55 60 +5 int None.
m_dpv.fadeoutsav 56 61 +5 int None.
m_dpv.volfrac 57 62 +5 int None.
m_dpv.lfofrac 58 63 +5 int None.
m_dpv.lfomult 59 64 +5 int None.
m_fActive 60 65 +5 BOOL Only TRUE when the entity is playing a looping sound.
m_fLooping 61 66 +5 BOOL TRUE when the sound played will loop.


Spawn flags

#define AMBIENT_SOUND_STATIC		0  // medium radius attenuation
#define AMBIENT_SOUND_EVERYWHERE	1
#define AMBIENT_SOUND_SMALLRADIUS	2
#define AMBIENT_SOUND_MEDIUMRADIUS	4
#define AMBIENT_SOUND_LARGERADIUS	8
#define AMBIENT_SOUND_START_SILENT	16
#define AMBIENT_SOUND_NOT_LOOPING	32

Constants

// channels
#define CHAN_AUTO		0
#define CHAN_WEAPON		1
#define	CHAN_VOICE		2
#define CHAN_ITEM		3
#define	CHAN_BODY	        4
#define CHAN_STREAM		5	// allocate stream channel from the static or dynamic area
#define CHAN_STATIC		6	// allocate channel from the static area 
#define CHAN_NETWORKVOICE_BASE	7	// voice data coming across the network
#define CHAN_NETWORKVOICE_END	500     // network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END).
 
// attenuation values
#define ATTN_NONE		0
#define	ATTN_NORM		0.8
#define ATTN_IDLE		2
#define ATTN_STATIC		1.25 
 
// pitch values
#define	PITCH_NORM		100	// non-pitch shifted
#define PITCH_LOW		95	// other values are possible - 0-255, where 255 is very high
#define PITCH_HIGH		120
 
// volume values
#define VOL_NORM		1.0