From: <lpa...@us...> - 2012-09-25 15:42:28
|
Revision: 8451 http://planeshift.svn.sourceforge.net/planeshift/?rev=8451&view=rev Author: lpancallo Date: 2012-09-25 15:42:18 +0000 (Tue, 25 Sep 2012) Log Message: ----------- Moved CS_ASSERT(sector) to the right place. At it was now, it was always failing when server is compiled in debug mode and a killed NPC had to respawn. Modified Paths: -------------- trunk/src/server/spawnmanager.cpp Modified: trunk/src/server/spawnmanager.cpp =================================================================== --- trunk/src/server/spawnmanager.cpp 2012-09-24 23:08:04 UTC (rev 8450) +++ trunk/src/server/spawnmanager.cpp 2012-09-25 15:42:18 UTC (rev 8451) @@ -838,6 +838,8 @@ { sector = psserver->entitymanager->GetEngine()->GetSectors()->FindByName(sectorName); + CS_ASSERT(sector); + csArray<gemObject*> nearlist = psserver->entitymanager->GetGEM()->FindNearbyEntities(sector, pos, spawnRule->GetMinSpawnSpacingDistance(), false); if (nearlist.IsEmpty()) { @@ -849,8 +851,6 @@ } - CS_ASSERT(sector); - Debug1(LOG_SPAWN,0,"Position accepted"); Respawn(chardata, instance, pos, angle, sectorName); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |