Rename SetSoundAmbience
to SetSoundEnvironment
This commit is contained in:
parent
7ceada702f
commit
2ad5074d9c
@ -132,12 +132,12 @@ namespace spades {
|
||||
}
|
||||
|
||||
// IWeaponSkin2
|
||||
protected float ambienceRoom;
|
||||
protected float ambienceSize;
|
||||
protected float environmentRoom;
|
||||
protected float environmentSize;
|
||||
|
||||
void SetSoundAmbience(float room, float size, float distance) {
|
||||
ambienceRoom = room;
|
||||
ambienceSize = size;
|
||||
void SetSoundEnvironment(float room, float size, float distance) {
|
||||
environmentRoom = room;
|
||||
environmentSize = size;
|
||||
}
|
||||
|
||||
protected Renderer@ renderer;
|
||||
|
@ -32,9 +32,9 @@
|
||||
private float reloadProgress;
|
||||
private int ammo, clipSize;
|
||||
|
||||
private float ambienceRoom;
|
||||
private float ambienceSize;
|
||||
private float ambienceDistance;
|
||||
private float environmentRoom;
|
||||
private float environmentSize;
|
||||
private float environmentDistance;
|
||||
|
||||
float SprintState {
|
||||
set { sprintState = value; }
|
||||
@ -82,10 +82,10 @@
|
||||
}
|
||||
|
||||
// IWeaponSkin2
|
||||
void SetSoundAmbience(float room, float size, float distance) {
|
||||
ambienceRoom = room;
|
||||
ambienceSize = size;
|
||||
ambienceDistance = distance;
|
||||
void SetSoundEnvironment(float room, float size, float distance) {
|
||||
environmentRoom = room;
|
||||
environmentSize = size;
|
||||
environmentDistance = distance;
|
||||
}
|
||||
|
||||
private Renderer@ renderer;
|
||||
@ -133,8 +133,8 @@
|
||||
param.volume = 20.f;
|
||||
audioDevice.Play(fireSounds[GetRandom(fireSounds.length)], origin, param);
|
||||
|
||||
param.volume = 20.f * ambienceRoom;
|
||||
if (ambienceSize < 0.5f) {
|
||||
param.volume = 20.f * environmentRoom;
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.Play(fireSmallReverbSound, origin, param);
|
||||
} else {
|
||||
audioDevice.Play(fireLargeReverbSound, origin, param);
|
||||
|
@ -76,8 +76,8 @@
|
||||
param.volume = 8.f;
|
||||
audioDevice.PlayLocal(fireSound, origin, param);
|
||||
|
||||
param.volume = 8.f * ambienceRoom;
|
||||
if (ambienceSize < 0.5f) {
|
||||
param.volume = 8.f * environmentRoom;
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.PlayLocal(fireSmallReverbSound, origin, param);
|
||||
} else {
|
||||
audioDevice.PlayLocal(fireLargeReverbSound, origin, param);
|
||||
|
@ -32,9 +32,9 @@
|
||||
private float reloadProgress;
|
||||
private int ammo, clipSize;
|
||||
|
||||
private float ambienceRoom;
|
||||
private float ambienceSize;
|
||||
private float ambienceDistance;
|
||||
private float environmentRoom;
|
||||
private float environmentSize;
|
||||
private float environmentDistance;
|
||||
|
||||
float SprintState {
|
||||
set { sprintState = value; }
|
||||
@ -82,10 +82,10 @@
|
||||
}
|
||||
|
||||
// IWeaponSkin2
|
||||
void SetSoundAmbience(float room, float size, float distance) {
|
||||
ambienceRoom = room;
|
||||
ambienceSize = size;
|
||||
ambienceDistance = distance;
|
||||
void SetSoundEnvironment(float room, float size, float distance) {
|
||||
environmentRoom = room;
|
||||
environmentSize = size;
|
||||
environmentDistance = distance;
|
||||
}
|
||||
|
||||
private Renderer@ renderer;
|
||||
@ -152,9 +152,9 @@
|
||||
param.volume = 9.f;
|
||||
audioDevice.Play(fireMediumSounds[GetRandom(fireMediumSounds.length)], origin, param);
|
||||
|
||||
param.volume = 8.f * ambienceRoom;
|
||||
param.volume = 8.f * environmentRoom;
|
||||
param.referenceDistance = 10.f;
|
||||
if (ambienceSize < 0.5f) {
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.Play(fireSmallReverbSounds[GetRandom(fireSmallReverbSounds.length)], origin, param);
|
||||
} else {
|
||||
audioDevice.Play(fireLargeReverbSounds[GetRandom(fireLargeReverbSounds.length)], origin, param);
|
||||
|
@ -99,8 +99,8 @@
|
||||
param.volume = 8.f;
|
||||
audioDevice.PlayLocal(fireSounds[GetRandom(fireSounds.length)], origin, param);
|
||||
|
||||
param.volume = 8.f * ambienceRoom;
|
||||
if (ambienceSize < 0.5f) {
|
||||
param.volume = 8.f * environmentRoom;
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.PlayLocal(fireSmallReverbSounds[GetRandom(fireSmallReverbSounds.length)], origin, param);
|
||||
} else {
|
||||
audioDevice.PlayLocal(fireLargeReverbSounds[GetRandom(fireLargeReverbSounds.length)], origin, param);
|
||||
|
@ -32,9 +32,9 @@
|
||||
private float reloadProgress;
|
||||
private int ammo, clipSize;
|
||||
|
||||
private float ambienceRoom;
|
||||
private float ambienceSize;
|
||||
private float ambienceDistance;
|
||||
private float environmentRoom;
|
||||
private float environmentSize;
|
||||
private float environmentDistance;
|
||||
|
||||
float SprintState {
|
||||
set { sprintState = value; }
|
||||
@ -82,10 +82,10 @@
|
||||
}
|
||||
|
||||
// IWeaponSkin2
|
||||
void SetSoundAmbience(float room, float size, float distance) {
|
||||
ambienceRoom = room;
|
||||
ambienceSize = size;
|
||||
ambienceDistance = distance;
|
||||
void SetSoundEnvironment(float room, float size, float distance) {
|
||||
environmentRoom = room;
|
||||
environmentSize = size;
|
||||
environmentDistance = distance;
|
||||
}
|
||||
|
||||
private Renderer@ renderer;
|
||||
@ -133,8 +133,8 @@
|
||||
param.volume = 8.f;
|
||||
audioDevice.Play(fireSound, origin, param);
|
||||
|
||||
param.volume = 8.f * ambienceRoom;
|
||||
if (ambienceSize < 0.5f) {
|
||||
param.volume = 8.f * environmentRoom;
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.Play(fireSmallReverbSound, origin, param);
|
||||
} else {
|
||||
audioDevice.Play(fireLargeReverbSound, origin, param);
|
||||
|
@ -79,8 +79,8 @@
|
||||
param.volume = 8.f;
|
||||
audioDevice.PlayLocal(fireSound, origin, param);
|
||||
|
||||
param.volume = 8.f * ambienceRoom;
|
||||
if (ambienceSize < 0.5f) {
|
||||
param.volume = 8.f * environmentRoom;
|
||||
if (environmentSize < 0.5f) {
|
||||
audioDevice.PlayLocal(fireSmallReverbSound, origin, param);
|
||||
} else {
|
||||
audioDevice.PlayLocal(fireLargeReverbSound, origin, param);
|
||||
|
@ -1236,7 +1236,7 @@ namespace spades {
|
||||
{
|
||||
ScriptIWeaponSkin2 interface(skin);
|
||||
if (interface.ImplementsInterface()) {
|
||||
interface.SetSoundAmbience(ambience.room, ambience.size, ambience.distance);
|
||||
interface.SetSoundEnvironment(ambience.room, ambience.size, ambience.distance);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,10 +157,10 @@ namespace spades{
|
||||
return obj->GetObjectType()->Implements(obj->GetEngine()->GetTypeInfoByName("IWeaponSkin2"));
|
||||
}
|
||||
|
||||
void ScriptIWeaponSkin2::SetSoundAmbience(float room, float size, float distance) {
|
||||
void ScriptIWeaponSkin2::SetSoundEnvironment(float room, float size, float distance) {
|
||||
SPADES_MARK_FUNCTION_DEBUG();
|
||||
static ScriptFunction func("IWeaponSkin2",
|
||||
"void SetSoundAmbience(float, float, float)");
|
||||
"void SetSoundEnvironment(float, float, float)");
|
||||
ScriptContextHandle ctx = func.Prepare();
|
||||
int r;
|
||||
r = ctx->SetObject((void *)obj);
|
||||
@ -221,7 +221,7 @@ namespace spades{
|
||||
manager->CheckError(r);
|
||||
|
||||
r = eng->RegisterInterfaceMethod("IWeaponSkin2",
|
||||
"void SetSoundAmbience(float, float, float)");
|
||||
"void SetSoundEnvironment(float, float, float)");
|
||||
manager->CheckError(r);
|
||||
break;
|
||||
default:
|
||||
|
@ -47,7 +47,7 @@ namespace spades {
|
||||
public:
|
||||
ScriptIWeaponSkin2(asIScriptObject *obj);
|
||||
bool ImplementsInterface();
|
||||
void SetSoundAmbience(float room, float size, float distance);
|
||||
void SetSoundEnvironment(float room, float size, float distance);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user