GameServer - Misc

This commit is contained in:
dean11 2014-02-20 09:14:42 +01:00
parent 9e26095dd0
commit d93d900d40
4 changed files with 7 additions and 5 deletions

View File

@ -22,10 +22,12 @@ using namespace GameLogic;
//Physics::ICustomBody::SubscriptMessage
void Player::PlayerCollision(Oyster::Physics::ICustomBody *rigidBodyPlayer, Oyster::Physics::ICustomBody *obj, Oyster::Math::Float kineticEnergyLoss)
{
Player *player = ((Player*)(rigidBodyPlayer->GetCustomTag()));
Object *realObj = (Object*)obj->GetCustomTag(); //needs to be changed?
if(!realObj) return;
if(!player) return;
switch (realObj->GetObjectType())
{
case ObjectSpecialType::ObjectSpecialType_Generic:

View File

@ -61,18 +61,16 @@ using namespace DanBias;
switch (e.args.type)
{
case NetworkClient::ClientEventArgs::EventType_Disconnect:
//printf("\t(%i : %s) - EventType_Disconnect\n", cl->GetClient()->GetID(), e.sender->GetIpAddress().c_str());
printf("\t(%i : %s) - EventType_Disconnect\n", cl->GetClient()->GetID(), e.sender->GetIpAddress().c_str());
this->gClients[temp]->Invalidate();
break;
case NetworkClient::ClientEventArgs::EventType_ProtocolFailedToRecieve:
break;
case NetworkClient::ClientEventArgs::EventType_ProtocolFailedToSend:
//printf("\t(%i : %s) - EventType_ProtocolFailedToSend\n", cl->GetClient()->GetID(), e.sender->GetIpAddress().c_str());
if(this->gClients[temp]->IncrementFailedProtocol() >= 5/*client->threshold*/)
this->gClients[temp]->Invalidate();
break;
case NetworkClient::ClientEventArgs::EventType_ProtocolRecieved:
//printf("\t(%i : %s) - EventType_ProtocolRecieved\n", cl->GetClient()->GetID(), e.sender->GetIpAddress().c_str());
this->ParseProtocol(e.args.data.protocol, cl);
break;
}

View File

@ -10,6 +10,8 @@
using namespace DanBias;
int WINAPI WinMain( HINSTANCE hinst, HINSTANCE prevInst, PSTR cmdLine, int cmdShow)
{
if(SetDllDirectory(L"..\\DLL") == FALSE)

View File

@ -64,7 +64,7 @@ struct NetworkClient::PrivateData : public IThreadObject
: ID(currID++)
, parent(0)
, owner(0)
, outputEvent(1)
, outputEvent(0)
{
InitWinSock();
this->thread.Create(this, false);