diff --git a/source/ps/Loader.h b/source/ps/Loader.h index 10c01ebbaf..0fcd9c3a48 100644 --- a/source/ps/Loader.h +++ b/source/ps/Loader.h @@ -60,8 +60,9 @@ but yields significant advantages: * input is important, since we want to be able to abort long loads or even exit the game immediately. -Examples of tasks that take so long, and typical 'coroutine' (more correcly -'generator') implementations may be seen in MapReader.cpp. +We therefore go with the 'coroutine' (more correctly 'generator') approach. +Examples of tasks that take so long and typical implementations may +be seen in MapReader.cpp. Intended Use diff --git a/source/simulation/EntityHandles.cpp b/source/simulation/EntityHandles.cpp index d49f120390..567a4b8004 100755 --- a/source/simulation/EntityHandles.cpp +++ b/source/simulation/EntityHandles.cpp @@ -67,7 +67,7 @@ void HEntity::addRef() { if( m_handle != INVALID_HANDLE ) { - assert( m_handle < 4096 ); + assert( m_handle < MAX_HANDLES ); g_EntityManager.m_entities[m_handle].m_refcount++; } } @@ -118,7 +118,7 @@ const u8 *HEntity::Deserialize(const u8 *buffer, const u8 *end) { Deserialize_int_2(buffer, m_handle); // We can't let addRef assert just because someone sent us bogus data - if (m_handle < 4096 && m_handle != INVALID_HANDLE) + if (m_handle < MAX_HANDLES && m_handle != INVALID_HANDLE) addRef(); return buffer; }