Use consistent Extension call pattern in legoentity and legoworld

Use 'using namespace Extensions' and value_or() instead of verbose
fully-qualified names and has_value()/value(), matching the pattern
used in legotextureinfo.cpp.
This commit is contained in:
Christian Semmler 2026-03-01 10:40:17 -08:00
parent 762a5f3941
commit 6da036a933
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
2 changed files with 5 additions and 4 deletions

View File

@ -21,6 +21,8 @@
#include <stdio.h>
using namespace Extensions;
DECOMP_SIZE_ASSERT(LegoEntity, 0x68)
// FUNCTION: LEGO1 0x100105f0
@ -484,8 +486,7 @@ MxLong LegoEntity::Notify(MxParam& p_param)
InvokeAction(m_actionType, MxAtomId(m_siFile, e_lowerCase2), m_targetEntityId, this);
}
else {
auto handled = Extensions::Extension<Extensions::MultiplayerExt>::Call(Extensions::HandleEntityNotify, this);
if (handled.has_value() && handled.value()) {
if (Extension<MultiplayerExt>::Call(HandleEntityNotify, this).value_or(FALSE)) {
return 1;
}

View File

@ -755,7 +755,7 @@ void LegoWorld::Enable(MxBool p_enable)
SetIsWorldActive(TRUE);
#endif
Extensions::Extension<Extensions::MultiplayerExt>::Call(Extensions::HandleWorldEnable, this, TRUE);
Extension<MultiplayerExt>::Call(HandleWorldEnable, this, TRUE);
}
else if (!p_enable && m_disabledObjects.size() == 0) {
MxPresenter* presenter;
@ -819,7 +819,7 @@ void LegoWorld::Enable(MxBool p_enable)
GetViewManager()->RemoveAll(NULL);
Extensions::Extension<Extensions::MultiplayerExt>::Call(Extensions::HandleWorldEnable, this, FALSE);
Extension<MultiplayerExt>::Call(HandleWorldEnable, this, FALSE);
}
}