Ejemplo n.º 1
0
//-------------------------------------------------------------------------------------		
void ClientApp::finalise(void)
{
	// 结束通知脚本
	PyObject* pyResult = PyObject_CallMethod(getEntryScript().get(), 
										const_cast<char*>("onFinish"),
										const_cast<char*>(""));

	if(pyResult != NULL)
	{
		Py_DECREF(pyResult);
	}
	else
	{
		SCRIPT_ERROR_CHECK();
	}

	if(pServerChannel_ && pServerChannel_->pEndPoint())
	{
		pServerChannel_->stopSend();
		networkInterface().dispatcher().deregisterReadFileDescriptor(*pServerChannel_->pEndPoint());
		networkInterface().deregisterChannel(pServerChannel_);
	}

	pServerChannel_->pPacketSender(NULL);
	SAFE_RELEASE(pTCPPacketSender_);
	SAFE_RELEASE(pTCPPacketReceiver_);
	
	gameTimer_.cancel();
	threadPool_.finalise();
	ClientObjectBase::finalise();
	Network::finalise();

	uninstallPyModules();
	uninstallPyScript();
}
Ejemplo n.º 2
0
//-------------------------------------------------------------------------------------
void PythonApp::finalise(void)
{
	gameTickTimerHandle_.cancel();
	scriptTimers_.cancelAll();
	ScriptTimers::finalise(*this);

	uninstallPyScript();
	ServerApp::finalise();
}
Ejemplo n.º 3
0
void EntityApp<E>::finalise(void)
{
	gameTimer_.cancel();

	WATCH_FINALIZE;

	ScriptTimers::finalise(*this);
	pEntities_->finalise();
	
	uninstallPyScript();
	EntityDef::finalise();

	ServerApp::finalise();
}
Ejemplo n.º 4
0
//-------------------------------------------------------------------------------------		
void ClientApp::finalise(void)
{
	if(pServerChannel_ && pServerChannel_->endpoint())
		getNetworkInterface().deregisterChannel(pServerChannel_);

	SAFE_RELEASE(pTCPPacketReceiver_);

	gameTimer_.cancel();
	threadPool_.finalise();
	ClientObjectBase::finalise();

	uninstallPyModules();
	uninstallPyScript();
}
Ejemplo n.º 5
0
void EntityApp<E>::finalise(void)
{
	gameTimer_.cancel();

	WATCH_FINALIZE;
	
	pyCallbackMgr_.finalise();
	ScriptTimers::finalise(*this);

	if(pEntities_)
		pEntities_->finalise();
	
	uninstallPyScript();

	ServerApp::finalise();
}
Ejemplo n.º 6
0
//-------------------------------------------------------------------------------------
void PythonApp::finalise(void)
{
	uninstallPyScript();

	ServerApp::finalise();
}
Ejemplo n.º 7
0
void EntityApp<E>::finalise(void)
{
	gameTimer_.cancel();
	uninstallPyScript();
	ServerApp::finalise();
}