/* * ================= * PF_sound * * Each entity can have eight independant sound sources, like voice, * weapon, feet, etc. * * Channel 0 is an auto-allocate channel, the others override anything * allready running on that entity/channel pair. * * An attenuation of 0 will play full volume everywhere in the level. * Larger attenuations will drop off. * * ================= */ static void PF_sound() { edict_t entity = GetEdict(OFS.OFS_PARM0); int channel = (int)GetFloat(OFS.OFS_PARM1); string sample = GetString(OFS.OFS_PARM2); int volume = (int)(GetFloat(OFS.OFS_PARM3) * 255); float attenuation = GetFloat(OFS.OFS_PARM4); Server.StartSound(entity, channel, sample, volume, attenuation); }