prvm_edict_t *entity;
float volume;
float attenuation;
+ vec3_t org;
VM_SAFEPARMCOUNT(5, VM_CL_sound);
return;
}
- S_StartSound(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), entity->fields.client->origin, volume, attenuation);
+ CL_VM_GetEntitySoundOrigin(PRVM_NUM_FOR_EDICT(entity), org);
+ S_StartSound(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), org, volume, attenuation);
}
// #483 void(vector origin, string sample, float volume, float attenuation) pointsound
if (ch->entnum == entnum && (ch->entchannel == entchannel || entchannel == -1) )
{
S_SetChannelVolume(ch_idx, fvol);
- ch->dist_mult = attenuation / (64.0f * snd_soundradius.value);
+ ch->dist_mult = attenuation / snd_soundradius.value;
+ SND_Spatialize(ch_idx, false);
return ch_idx;
}
}