2019-01-16 12:18:28 -08: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 09:50:48 -08:00
|
|
|
|
2018-06-10 02:40:44 -07:00
|
|
|
void CSQC_ambient_generic( string sSample, float fVolume, float fAttenuation, float fLoop, float lFORate ) {
|
2019-03-13 14:03:57 -07: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 02:40:44 -07: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 02:13:49 -08:00
|
|
|
/*if ( fLoop ) {
|
2018-06-10 02:40:44 -07:00
|
|
|
sound( self, CHAN_VOICE, sSample, fVolume, fAttenuation, 0, SOUNDFLAG_FORCELOOP );
|
2019-01-10 02:13:49 -08:00
|
|
|
} else {*/
|
2018-06-10 02:40:44 -07:00
|
|
|
sound( self, CHAN_VOICE, sSample, fVolume, fAttenuation, 0, 0 );
|
2019-01-10 02:13:49 -08:00
|
|
|
//}
|
2017-06-21 05:50:02 -07:00
|
|
|
}
|
2016-12-13 11:15:09 -08:00
|
|
|
|
2016-12-04 06:04:30 -08:00
|
|
|
/*
|
|
|
|
=================
|
|
|
|
CSQC_Ent_Remove
|
|
|
|
|
|
|
|
Self explanatory
|
|
|
|
=================
|
|
|
|
*/
|
2016-12-01 09:50:48 -08:00
|
|
|
void CSQC_Ent_Remove( void ) {
|
2017-06-24 05:36:36 -07:00
|
|
|
if ( self.eGunModel ) {
|
|
|
|
remove( self.eGunModel );
|
|
|
|
}
|
|
|
|
|
2016-12-06 22:00:28 -08:00
|
|
|
soundupdate( self, CHAN_VOICE, "", -1, ATTN_IDLE, 0, 0, 0 );
|
|
|
|
remove( self );
|
2016-12-01 09:50:48 -08:00
|
|
|
}
|
|
|
|
|