From: Anders R. <ma...@us...> - 2007-02-18 18:19:25
|
Update of /cvsroot/planeshift/planeshift/src/common/engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3419/src/common/engine Modified Files: psworld.cpp Log Message: - Fixed loading of worlds in server to not exclude portals nodes. This nodes are needed to calculate the correct warpspace for portals that are put into portals child nodes in the sector. Index: psworld.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/engine/psworld.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** psworld.cpp 17 Feb 2007 22:11:54 -0000 1.12 --- psworld.cpp 18 Feb 2007 18:19:19 -0000 1.13 *************** *** 314,317 **** --- 314,320 ---- { const csSet<csPtrKey<iMeshWrapper> >& portals = engine->GetSectors()->Get(i)->GetPortalMeshes(); + Debug3(LOG_STARTUP,0," %d portal meshes for %s",portals.GetSize(), + engine->GetSectors()->Get(i)->QueryObject()->GetName()); + csSet<csPtrKey<iMeshWrapper> >::GlobalIterator it = portals.GetIterator (); while (it.HasNext ()) *************** *** 555,559 **** } ! // Copy the portals csRef<iDocumentNodeIterator> nodes = sector->GetNodes("portal"); --- 558,562 ---- } ! // Copy the portal csRef<iDocumentNodeIterator> nodes = sector->GetNodes("portal"); *************** *** 565,568 **** --- 568,582 ---- } + // Copy the portals + csRef<iDocumentNodeIterator> portalsItr = sector->GetNodes("portals"); + + while(portalsItr->HasNext()) + { + csRef<iDocumentNode> portals = portalsItr->Next(); + csRef<iDocumentNode> cleanedportals = cleanedSector->CreateNodeBefore(CS_NODE_ELEMENT); + CloneNode(portals, cleanedportals); + } + + } |