mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-02 02:23:56 +00:00
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:
parent
762a5f3941
commit
6da036a933
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user