Merge with server

This commit is contained in:
Robin Engman 2014-02-21 14:14:30 +01:00
commit e133562021
2 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ using namespace DanBias;
{ {
for (unsigned int i = 0; i < this->gClients.Size(); i++) for (unsigned int i = 0; i < this->gClients.Size(); i++)
{ {
if(this->gClients[i] ) if(this->gClients[i] && !this->gClients[i]->IsInvalid())
{ {
this->gClients[i]->UpdateClient(); this->gClients[i]->UpdateClient();
} }
@ -108,7 +108,7 @@ using namespace DanBias;
bool returnValue = false; bool returnValue = false;
for (unsigned int i = 0; i < this->gClients.Size(); i++) for (unsigned int i = 0; i < this->gClients.Size(); i++)
{ {
if(this->gClients[i]) if(this->gClients[i] && !this->gClients[i]->IsInvalid())
{ {
this->gClients[i]->GetClient()->Send(message); this->gClients[i]->GetClient()->Send(message);
returnValue = true; returnValue = true;
@ -122,7 +122,7 @@ using namespace DanBias;
{ {
for (unsigned int i = 0; i < this->gClients.Size(); i++) for (unsigned int i = 0; i < this->gClients.Size(); i++)
{ {
if(this->gClients[i] && this->gClients[i]->GetClient()->GetID() == ID) if(this->gClients[i] && !this->gClients[i]->IsInvalid() && this->gClients[i]->GetClient()->GetID() == ID)
{ {
this->gClients[i]->GetClient()->Send(protocol); this->gClients[i]->GetClient()->Send(protocol);
return true; return true;

View File

@ -36,8 +36,8 @@ GameSession::GameSession()
this->isCreated = false; this->isCreated = false;
this->isRunning = false; this->isRunning = false;
this->gameSession = this; this->gameSession = this;
this->logicFrameTime = DELTA_TIME_120; this->logicFrameTime = DELTA_TIME_60;
this->networkFrameTime = DELTA_TIME_120; this->networkFrameTime = DELTA_TIME_60;
this->networkTimer.reset(); this->networkTimer.reset();
this->logicTimer.reset(); this->logicTimer.reset();