From 229a6b7a162fc9a428a7c8183506ee61bd93c485 Mon Sep 17 00:00:00 2001 From: janwas Date: Mon, 9 May 2005 04:37:36 +0000 Subject: [PATCH] Loader: reword comment EntityHandles.cpp: 4096 -> MAX_HANDLES This was SVN commit r2259. --- source/ps/Loader.h | 5 +++-- source/simulation/EntityHandles.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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; }