void ListServer_End() { if ( listServerFields[5] == "localhost" ) return; if (!lsConnected) return; listServer.closeSock(); }
void ListServer_End() { if (!lsConnected) return; listServer.closeSock(); }
void shutdownServer( int signal ) { if(hasShutdown) return; hasShutdown = true; serverRunning = false; if(lsConnected) ListServer_End(); errorOut("serverlog.txt", "Server shutdown."); serverSock.closeSock(); saveWeapons("weapons.txt"); serverFlags.save("serverflags.txt"); for(int i = playerList.count()-1; i >= 0; i--) delete ((CPlayer*)playerList[i]); for(int i = 0; i < levelList.count(); i++) { CLevel* level = (CLevel*)levelList[i]; level->saveNpcs(); delete level; } for(int i = 0; i < CMap::mapList.count(); i++) delete((CMap*)CMap::mapList[i]); for(int i = 0; i < weaponList.count(); i++) delete ((CWeapon*)weaponList[i]); #ifdef PSPSDK sceKernelExitGame(); #endif }