mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Match LegoOmni::GetWorldId
(#1517)
This commit is contained in:

committed by
GitHub

parent
90b5c27a8b
commit
a860e76dba
@@ -90,9 +90,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
World GetId() { return m_id; }
|
|
||||||
const char* GetKey() { return m_key; }
|
|
||||||
|
|
||||||
World m_id; // 0x00
|
World m_id; // 0x00
|
||||||
char m_key[20]; // 0x04
|
char m_key[20]; // 0x04
|
||||||
MxAtomId* m_atomId; // 0x18
|
MxAtomId* m_atomId; // 0x18
|
||||||
|
@@ -502,11 +502,15 @@ MxAtomId* LegoOmni::GetWorldAtom(LegoOmni::World p_worldId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005b490
|
// FUNCTION: LEGO1 0x1005b490
|
||||||
|
// FUNCTION: BETA10 0x1008ee69
|
||||||
LegoOmni::World LegoOmni::GetWorldId(const char* p_key)
|
LegoOmni::World LegoOmni::GetWorldId(const char* p_key)
|
||||||
{
|
{
|
||||||
for (MxS32 i = 0; i < e_numWorlds; i++) {
|
for (MxS32 i = 0; i < e_numWorlds; i++) {
|
||||||
if ((MxS32) &m_worlds[i] != -4 && !strcmpi(m_worlds[i].GetKey(), p_key)) {
|
// Note: m_key is never NULL
|
||||||
return m_worlds[i].GetId();
|
if (m_worlds[i].m_key != NULL) {
|
||||||
|
if (!strcmpi(m_worlds[i].m_key, p_key)) {
|
||||||
|
return m_worlds[i].m_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user