From: Andy D. <kha...@us...> - 2004-12-15 17:55:28
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19630/src/server Modified Files: gem.cpp spawnmanager.cpp Log Message: Fixed occasional crash when despawning NPC. Index: gem.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/gem.cpp,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** gem.cpp 14 Dec 2004 10:06:02 -0000 1.139 --- gem.cpp 15 Dec 2004 17:54:46 -0000 1.140 *************** *** 286,290 **** { gemObject *obj = (gemObject *)iter.Next(); ! if (obj->GetSuperclientID() == superclientID) { CPrintf(CON_DEBUG, " Deactivating %s...\n",obj->GetName() ); --- 286,290 ---- { gemObject *obj = (gemObject *)iter.Next(); ! if (obj->GetSuperclientID() == superclientID && obj->GetActorPtr()->IsAlive()) { CPrintf(CON_DEBUG, " Deactivating %s...\n",obj->GetName() ); Index: spawnmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/spawnmanager.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** spawnmanager.cpp 14 Dec 2004 19:41:44 -0000 1.83 --- spawnmanager.cpp 15 Dec 2004 17:54:47 -0000 1.84 *************** *** 253,260 **** void psSpawnManager::KillNPC(gemObject *obj,int killer_cnum) { - csString status; - status.Format("KillNPC: %s Pointer: %p", obj->GetName(), obj); - psserver->GetLogCSV()->Write(CSV_STATUS, status); - Debug2(LOG_SPAWN,"KillNPC:%s",obj->GetName() ); --- 253,256 ---- *************** *** 318,332 **** Notify3(LOG_SPAWN,"Scheduled NPC %s to be removed in %1.1f seconds.",obj->GetName(),(float)delay/1000.0); - status.Format("Scheduled NPC %s to be removed in %u ticks. Pointer: %p", obj->GetName(), delay, obj); - psserver->GetLogCSV()->Write(CSV_STATUS, status); - } void psSpawnManager::RemoveNPC(gemObject *obj) { - csString status; - status.Format("RemoveNPC: %s Pointer: %p", obj->GetName(), obj); - psserver->GetLogCSV()->Write(CSV_STATUS, status); - Debug2(LOG_SPAWN,"RemoveNPC:%s\n",obj->GetName() ); --- 314,321 ---- |