CScriptMidi: Update for CEntity getters

Former-commit-id: d4601c22b0
This commit is contained in:
Luke Street 2022-10-22 12:00:11 -04:00
parent 3df1cc45b6
commit b7d74c3237
2 changed files with 5 additions and 4 deletions

View File

@ -29,6 +29,7 @@ public:
}
TUniqueId GetUniqueId() const { return x8_uid; }
TEditorId GetEditorId() const { return xc_editorId; }
const rstl::string& GetDebugName() const { return x10_name; }
TAreaId GetAreaId() const;
TAreaId GetCurrentAreaId() const { return x4_areaId; }
bool GetActive() const { return x30_24_active; }

View File

@ -43,9 +43,9 @@ void CScriptMidi::Play(CStateManager& mgr, float fadeTime) {
short volume = x48_volume;
const CWorld* wld = mgr.GetWorld();
const CGameArea& area = wld->GetAreaAlways(GetAreaIdAlways());
const CGameArea& area = wld->GetAreaAlways(GetCurrentAreaId());
rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
wld->GetWorldAssetId(), area.GetAreaAssetId(), x10_name);
wld->GetWorldAssetId(), area.GetAreaAssetId(), GetDebugName());
if (gpTweakManager->HasTweakValue(twkName)) {
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) {
const CWorld* wld = mgr.GetWorld();
const CGameArea& area = wld->GetAreaAlways(GetAreaIdAlways());
const CGameArea& area = wld->GetAreaAlways(GetCurrentAreaId());
const rstl::string twkName = CInGameTweakManager::GetIdentifierForMidiEvent(
wld->GetWorldAssetId(), area.GetAreaAssetId(), x10_name);
wld->GetWorldAssetId(), area.GetAreaAssetId(), GetDebugName());
if (gpTweakManager->HasTweakValue(twkName)) {
const CTweakValue::Audio& audio = gpTweakManager->GetTweakValue(twkName)->GetAudio();