2019-01-16 20:18:28 +00:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
|
|
*
|
|
|
|
****/
|
2016-12-01 17:50:48 +00:00
|
|
|
|
2018-06-10 09:40:44 +00:00
|
|
|
void CSQC_ambient_generic( string sSample, float fVolume, float fAttenuation, float fLoop, float lFORate ) {
|
2019-03-13 21:03:57 +00:00
|
|
|
//print( sprintf( "SOUND: %s, %f, %d\n%d %d %d", sSample, fVolume, fAttenuation, self.origin[0], self.origin[1], self.origin[2] ) );
|
2018-06-10 09:40:44 +00:00
|
|
|
static void LFOHack (void) {
|
|
|
|
sound( self, CHAN_VOICE, self.classname, self.movetype, self.style, 0, 0 );
|
|
|
|
self.nextthink = self.solid + time;
|
|
|
|
}
|
|
|
|
// Hack
|
|
|
|
if ( lFORate ) {
|
|
|
|
self.classname = sSample;
|
|
|
|
self.movetype = fVolume;
|
|
|
|
self.style = fAttenuation;
|
|
|
|
self.think = LFOHack;
|
|
|
|
self.solid = lFORate / 10;
|
|
|
|
self.nextthink = self.solid + time;
|
|
|
|
fLoop = FALSE;
|
|
|
|
}
|
|
|
|
|
2019-01-10 10:13:49 +00:00
|
|
|
/*if ( fLoop ) {
|
2018-06-10 09:40:44 +00:00
|
|
|
sound( self, CHAN_VOICE, sSample, fVolume, fAttenuation, 0, SOUNDFLAG_FORCELOOP );
|
2019-01-10 10:13:49 +00:00
|
|
|
} else {*/
|
2018-06-10 09:40:44 +00:00
|
|
|
sound( self, CHAN_VOICE, sSample, fVolume, fAttenuation, 0, 0 );
|
2019-01-10 10:13:49 +00:00
|
|
|
//}
|
2017-06-21 12:50:02 +00:00
|
|
|
}
|
2016-12-13 19:15:09 +00:00
|
|
|
|
2016-12-04 14:04:30 +00:00
|
|
|
/*
|
|
|
|
=================
|
|
|
|
CSQC_Ent_Remove
|
|
|
|
|
|
|
|
Self explanatory
|
|
|
|
=================
|
|
|
|
*/
|
2016-12-01 17:50:48 +00:00
|
|
|
void CSQC_Ent_Remove( void ) {
|
2017-06-24 12:36:36 +00:00
|
|
|
if ( self.eGunModel ) {
|
|
|
|
remove( self.eGunModel );
|
|
|
|
}
|
|
|
|
|
2016-12-07 06:00:28 +00:00
|
|
|
soundupdate( self, CHAN_VOICE, "", -1, ATTN_IDLE, 0, 0, 0 );
|
|
|
|
remove( self );
|
2016-12-01 17:50:48 +00:00
|
|
|
}
|
|
|
|
|