mirror of https://github.com/PrimeDecomp/prime.git
parent
3df1cc45b6
commit
b7d74c3237
|
@ -29,6 +29,7 @@ public:
|
||||||
}
|
}
|
||||||
TUniqueId GetUniqueId() const { return x8_uid; }
|
TUniqueId GetUniqueId() const { return x8_uid; }
|
||||||
TEditorId GetEditorId() const { return xc_editorId; }
|
TEditorId GetEditorId() const { return xc_editorId; }
|
||||||
|
const rstl::string& GetDebugName() const { return x10_name; }
|
||||||
TAreaId GetAreaId() const;
|
TAreaId GetAreaId() const;
|
||||||
TAreaId GetCurrentAreaId() const { return x4_areaId; }
|
TAreaId GetCurrentAreaId() const { return x4_areaId; }
|
||||||
bool GetActive() const { return x30_24_active; }
|
bool GetActive() const { return x30_24_active; }
|
||||||
|
|
|
@ -43,9 +43,9 @@ void CScriptMidi::Play(CStateManager& mgr, float fadeTime) {
|
||||||
short volume = x48_volume;
|
short volume = x48_volume;
|
||||||
|
|
||||||
const CWorld* wld = mgr.GetWorld();
|
const CWorld* wld = mgr.GetWorld();
|
||||||
const CGameArea& area = wld->GetAreaAlways(GetAreaIdAlways());
|
const CGameArea& area = wld->GetAreaAlways(GetCurrentAreaId());
|
||||||
rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
|
rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
|
||||||
wld->GetWorldAssetId(), area.GetAreaAssetId(), x10_name);
|
wld->GetWorldAssetId(), area.GetAreaAssetId(), GetDebugName());
|
||||||
|
|
||||||
if (gpTweakManager->HasTweakValue(twkName)) {
|
if (gpTweakManager->HasTweakValue(twkName)) {
|
||||||
const CTweakValue::Audio& audio = gpTweakManager->GetTweakValue(twkName)->GetAudio();
|
const CTweakValue::Audio& audio = gpTweakManager->GetTweakValue(twkName)->GetAudio();
|
||||||
|
@ -59,9 +59,9 @@ void CScriptMidi::Play(CStateManager& mgr, float fadeTime) {
|
||||||
|
|
||||||
void CScriptMidi::Stop(CStateManager& mgr, float fadeTime) {
|
void CScriptMidi::Stop(CStateManager& mgr, float fadeTime) {
|
||||||
const CWorld* wld = mgr.GetWorld();
|
const CWorld* wld = mgr.GetWorld();
|
||||||
const CGameArea& area = wld->GetAreaAlways(GetAreaIdAlways());
|
const CGameArea& area = wld->GetAreaAlways(GetCurrentAreaId());
|
||||||
const rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
|
const rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
|
||||||
wld->GetWorldAssetId(), area.GetAreaAssetId(), x10_name);
|
wld->GetWorldAssetId(), area.GetAreaAssetId(), GetDebugName());
|
||||||
|
|
||||||
if (gpTweakManager->HasTweakValue(twkName)) {
|
if (gpTweakManager->HasTweakValue(twkName)) {
|
||||||
const CTweakValue::Audio& audio = gpTweakManager->GetTweakValue(twkName)->GetAudio();
|
const CTweakValue::Audio& audio = gpTweakManager->GetTweakValue(twkName)->GetAudio();
|
||||||
|
|
Loading…
Reference in New Issue