Minor refactor SkateBoard setter in Pizza (#874)

This commit is contained in:
Christian Semmler
2024-05-01 07:49:47 -04:00
committed by GitHub
parent 84b789ef9e
commit 6c89cd3315
3 changed files with 22 additions and 20 deletions

View File

@@ -42,10 +42,10 @@ MxResult SkateBoard::Create(MxDSAction& p_dsAction)
if (result == SUCCESS) {
m_world = CurrentWorld();
m_world->Add(this);
// The type `Pizza` is an educated guesss, inferred from VTable0xe4() below
Pizza* findResult = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
if (findResult) {
findResult->SetUnknown0x84((undefined*) this);
Pizza* pizza = (Pizza*) CurrentWorld()->Find(*g_isleScript, IsleScript::c_Pizza_Actor);
if (pizza) {
pizza->SetSkateboard(this);
}
}