- removed the string constructors from FSoundID.
Due to C++ conversion rules this was a bit too volatile. There's really not enough places where being able to pass a string directly into the sound API was beneficial - the two most frequent functions now got overloaded variants.
This commit is contained in:
parent
b89c4affae
commit
65a26d6779
26 changed files with 66 additions and 70 deletions
|
|
@ -4200,23 +4200,23 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
break;
|
||||
|
||||
case APROP_SeeSound:
|
||||
actor->SeeSound = Level->Behaviors.LookupString(value);
|
||||
actor->SeeSound = S_FindSound(Level->Behaviors.LookupString(value));
|
||||
break;
|
||||
|
||||
case APROP_AttackSound:
|
||||
actor->AttackSound = Level->Behaviors.LookupString(value);
|
||||
actor->AttackSound = S_FindSound(Level->Behaviors.LookupString(value));
|
||||
break;
|
||||
|
||||
case APROP_PainSound:
|
||||
actor->PainSound = Level->Behaviors.LookupString(value);
|
||||
actor->PainSound = S_FindSound(Level->Behaviors.LookupString(value));
|
||||
break;
|
||||
|
||||
case APROP_DeathSound:
|
||||
actor->DeathSound = Level->Behaviors.LookupString(value);
|
||||
actor->DeathSound = S_FindSound(Level->Behaviors.LookupString(value));
|
||||
break;
|
||||
|
||||
case APROP_ActiveSound:
|
||||
actor->ActiveSound = Level->Behaviors.LookupString(value);
|
||||
actor->ActiveSound = S_FindSound(Level->Behaviors.LookupString(value));
|
||||
break;
|
||||
|
||||
case APROP_Species:
|
||||
|
|
@ -5623,7 +5623,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
}
|
||||
|
||||
case ACSF_Radius_Quake2:
|
||||
P_StartQuake(Level, activator, args[0], args[1], args[2], args[3], args[4], Level->Behaviors.LookupString(args[5]));
|
||||
P_StartQuake(Level, activator, args[0], args[1], args[2], args[3], args[4], S_FindSound(Level->Behaviors.LookupString(args[5])));
|
||||
break;
|
||||
|
||||
case ACSF_CheckActorClass:
|
||||
|
|
@ -5910,7 +5910,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
const char *lookup = Level->Behaviors.LookupString(args[1]);
|
||||
if (lookup != NULL)
|
||||
{
|
||||
sid = lookup;
|
||||
sid = S_FindSound(lookup);
|
||||
}
|
||||
}
|
||||
if (sid != NO_SOUND || funcIndex == ACSF_PlayActorSound)
|
||||
|
|
@ -6196,7 +6196,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
|
||||
case ACSF_QuakeEx:
|
||||
{
|
||||
return P_StartQuakeXYZ(Level, activator, args[0], args[1], args[2], args[3], args[4], args[5], args[6], Level->Behaviors.LookupString(args[7]),
|
||||
return P_StartQuakeXYZ(Level, activator, args[0], args[1], args[2], args[3], args[4], args[5], args[6], S_FindSound(Level->Behaviors.LookupString(args[7])),
|
||||
argCount > 8 ? args[8] : 0,
|
||||
argCount > 9 ? ACSToDouble(args[9]) : 1.0,
|
||||
argCount > 10 ? ACSToDouble(args[10]) : 1.0,
|
||||
|
|
@ -6737,7 +6737,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
const char* lookup = Level->Behaviors.LookupString(args[1]);
|
||||
if (lookup != nullptr)
|
||||
{
|
||||
sid = lookup;
|
||||
sid = S_FindSound(lookup);
|
||||
}
|
||||
|
||||
activator->player->SetSubtitle(logNum, sid);
|
||||
|
|
@ -8871,7 +8871,7 @@ scriptwait:
|
|||
S_Sound (
|
||||
activationline->frontsector,
|
||||
CHAN_AUTO, 0, // Not CHAN_AREA, because that'd probably break existing scripts.
|
||||
lookup,
|
||||
S_FindSound(lookup),
|
||||
(float)(STACK(1)) / 127.f,
|
||||
ATTN_NORM);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue