|
@@ -55,10 +55,8 @@ CTypeList typeList;
|
|
|
|
|
|
void CConnection::init()
|
|
|
{
|
|
|
- CISer<CConnection>::smartPointerSerialization = false;
|
|
|
- COSer<CConnection>::smartPointerSerialization = false;
|
|
|
- CISer<CConnection>::sendStackInstanceByIds = true;
|
|
|
- COSer<CConnection>::sendStackInstanceByIds = true;
|
|
|
+ enableSmartPointerSerializatoin();
|
|
|
+ disableStackSendingByID();
|
|
|
registerTypes(static_cast<CISer<CConnection>&>(*this));
|
|
|
registerTypes(static_cast<COSer<CConnection>&>(*this));
|
|
|
#ifdef LIL_ENDIAN
|
|
@@ -250,6 +248,30 @@ void CConnection::sendPackToServer(const CPack &pack, ui8 player, ui32 requestID
|
|
|
*this << player << requestID << &pack; //packs has to be sent as polymorphic pointers!
|
|
|
}
|
|
|
|
|
|
+void CConnection::disableStackSendingByID()
|
|
|
+{
|
|
|
+ CISer<CConnection>::sendStackInstanceByIds = false;
|
|
|
+ COSer<CConnection>::sendStackInstanceByIds = false;
|
|
|
+}
|
|
|
+
|
|
|
+void CConnection::enableStackSendingByID()
|
|
|
+{
|
|
|
+ CISer<CConnection>::sendStackInstanceByIds = true;
|
|
|
+ COSer<CConnection>::sendStackInstanceByIds = true;
|
|
|
+}
|
|
|
+
|
|
|
+void CConnection::disableSmartPointerSerialization()
|
|
|
+{
|
|
|
+ CISer<CConnection>::smartPointerSerialization = false;
|
|
|
+ COSer<CConnection>::smartPointerSerialization = false;
|
|
|
+}
|
|
|
+
|
|
|
+void CConnection::enableSmartPointerSerializatoin()
|
|
|
+{
|
|
|
+ CISer<CConnection>::smartPointerSerialization = true;
|
|
|
+ COSer<CConnection>::smartPointerSerialization = true;
|
|
|
+}
|
|
|
+
|
|
|
CSaveFile::CSaveFile( const std::string &fname )
|
|
|
{
|
|
|
registerTypes(*this);
|