return block;
}
-MapBlock * MapSector::getBlockNoCreate(s16 y)
+MapBlock * MapSector::getBlockNoCreateNoEx(s16 y)
{
JMutexAutoLock lock(m_mutex);
- MapBlock *block = getBlockBuffered(y);
+ return getBlockBuffered(y);
+}
+
+MapBlock * MapSector::getBlockNoCreate(s16 y)
+{
+ MapBlock *block = getBlockNoCreateNoEx(y);
if(block == NULL)
throw InvalidPositionException();
if(n != NULL)
{
- dstream<<"deSerializing existent sectors not supported "
+ dstream<<"WARNING: deSerializing existent sectors not supported "
"at the moment, because code hasn't been tested."
<<std::endl;
- assert(0);
+
+ //assert(0);
+ MapSector *sector = n->getValue();
+ assert(sector->getId() == MAPSECTOR_SERVER);
+ return (ServerMapSector*)sector;
+
// NOTE: At least hm_split mismatch would have to be checked
//sector = n->getValue();
return sector;
}
+#ifndef SERVER
/*
ClientMapSector
*/
m_corners[2] = c2;
m_corners[3] = c3;
}
+#endif // !SERVER
//END