mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 03:32:35 +01:00
Removed fogofwar code that I had in my synch check logic from, long ago as it is no longer needed due to Silnarms new feature
This commit is contained in:
parent
a0c0be4d65
commit
924ec79364
@ -426,10 +426,10 @@ void MenuStateCustomGame::update()
|
||||
{
|
||||
label = label + " techtree";
|
||||
}
|
||||
if(connectionSlot->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
{
|
||||
label = label + " FogOfWar == false";
|
||||
}
|
||||
//if(connectionSlot->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
//{
|
||||
// label = label + " FogOfWar == false";
|
||||
//}
|
||||
|
||||
}
|
||||
else
|
||||
@ -441,7 +441,8 @@ void MenuStateCustomGame::update()
|
||||
{
|
||||
label = connectionSlot->getName();
|
||||
|
||||
if(connectionSlot->getAllowGameDataSynchCheck() == true)
|
||||
if(connectionSlot->getAllowGameDataSynchCheck() == true &&
|
||||
connectionSlot->getNetworkGameDataSynchCheckOk() == false)
|
||||
{
|
||||
label += " - warning synch mismatch for:";
|
||||
if(connectionSlot->getNetworkGameDataSynchCheckOkMap() == false)
|
||||
@ -456,10 +457,10 @@ void MenuStateCustomGame::update()
|
||||
{
|
||||
label = label + " techtree";
|
||||
}
|
||||
if(connectionSlot->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
{
|
||||
label = label + " FogOfWar == false";
|
||||
}
|
||||
//if(connectionSlot->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
//{
|
||||
// label = label + " FogOfWar == false";
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,10 +285,10 @@ void MenuStateJoinGame::update()
|
||||
{
|
||||
label = label + " techtree";
|
||||
}
|
||||
if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
{
|
||||
label = label + " FogOfWar == false";
|
||||
}
|
||||
//if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
//{
|
||||
// label = label + " FogOfWar == false";
|
||||
//}
|
||||
}
|
||||
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
||||
{
|
||||
@ -322,10 +322,10 @@ void MenuStateJoinGame::update()
|
||||
{
|
||||
label = label + " techtree";
|
||||
}
|
||||
if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
{
|
||||
label = label + " FogOfWar == false";
|
||||
}
|
||||
//if(clientInterface->getNetworkGameDataSynchCheckOkFogOfWar() == false)
|
||||
//{
|
||||
// label = label + " FogOfWar == false";
|
||||
//}
|
||||
}
|
||||
else if(clientInterface->getAllowGameDataSynchCheck() == true)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ ConnectionSlot::ConnectionSlot(ServerInterface* serverInterface, int playerIndex
|
||||
networkGameDataSynchCheckOkMap = false;
|
||||
networkGameDataSynchCheckOkTile = false;
|
||||
networkGameDataSynchCheckOkTech = false;
|
||||
networkGameDataSynchCheckOkFogOfWar = false;
|
||||
//networkGameDataSynchCheckOkFogOfWar = false;
|
||||
|
||||
chatText.clear();
|
||||
chatSender.clear();
|
||||
@ -71,7 +71,7 @@ void ConnectionSlot::update(bool checkForNewClients)
|
||||
if(networkGameDataSynchCheckOkMap) networkGameDataSynchCheckOkMap = false;
|
||||
if(networkGameDataSynchCheckOkTile) networkGameDataSynchCheckOkTile = false;
|
||||
if(networkGameDataSynchCheckOkTech) networkGameDataSynchCheckOkTech = false;
|
||||
if(networkGameDataSynchCheckOkFogOfWar) networkGameDataSynchCheckOkFogOfWar = false;
|
||||
//if(networkGameDataSynchCheckOkFogOfWar) networkGameDataSynchCheckOkFogOfWar = false;
|
||||
|
||||
// Is the listener socket ready to be read?
|
||||
//if(serverInterface->getServerSocket()->isReadable() == true)
|
||||
@ -209,8 +209,8 @@ void ConnectionSlot::update(bool checkForNewClients)
|
||||
|
||||
if( networkGameDataSynchCheckOkMap == true &&
|
||||
networkGameDataSynchCheckOkTile == true &&
|
||||
networkGameDataSynchCheckOkTech == true &&
|
||||
networkGameDataSynchCheckOkFogOfWar == true)
|
||||
networkGameDataSynchCheckOkTech == true) // &&
|
||||
//networkGameDataSynchCheckOkFogOfWar == true)
|
||||
{
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] client data synch ok\n",__FILE__,__FUNCTION__);
|
||||
}
|
||||
@ -347,10 +347,12 @@ void ConnectionSlot::close()
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END\n",__FILE__,__FUNCTION__);
|
||||
}
|
||||
|
||||
/*
|
||||
bool ConnectionSlot::getFogOfWar()
|
||||
{
|
||||
return networkGameDataSynchCheckOkFogOfWar;
|
||||
}
|
||||
*/
|
||||
|
||||
bool ConnectionSlot::hasValidSocketId()
|
||||
{
|
||||
|
68
source/glest_game/network/connection_slot.h
Normal file
68
source/glest_game/network/connection_slot.h
Normal file
@ -0,0 +1,68 @@
|
||||
// ==============================================================
|
||||
// This file is part of Glest (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martio Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version
|
||||
// ==============================================================
|
||||
|
||||
#ifndef _GLEST_GAME_CONNECTIONSLOT_H_
|
||||
#define _GLEST_GAME_CONNECTIONSLOT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "socket.h"
|
||||
|
||||
#include "network_interface.h"
|
||||
|
||||
using Shared::Platform::ServerSocket;
|
||||
using Shared::Platform::Socket;
|
||||
using std::vector;
|
||||
|
||||
namespace Glest{ namespace Game{
|
||||
|
||||
class ServerInterface;
|
||||
|
||||
// =====================================================
|
||||
// class ConnectionSlot
|
||||
// =====================================================
|
||||
|
||||
class ConnectionSlot: public NetworkInterface{
|
||||
private:
|
||||
ServerInterface* serverInterface;
|
||||
Socket* socket;
|
||||
int playerIndex;
|
||||
string name;
|
||||
bool ready;
|
||||
vector<std::pair<string,int32> > vctFileList;
|
||||
bool receivedNetworkGameStatus;
|
||||
|
||||
public:
|
||||
ConnectionSlot(ServerInterface* serverInterface, int playerIndex);
|
||||
~ConnectionSlot();
|
||||
|
||||
void update(bool checkForNewClients);
|
||||
virtual void update();
|
||||
|
||||
void setReady() {ready= true;}
|
||||
const string &getName() const {return name;}
|
||||
bool isReady() const {return ready;}
|
||||
|
||||
virtual Socket* getSocket() {return socket;}
|
||||
virtual Socket* getSocket() const {return socket;}
|
||||
|
||||
virtual void close();
|
||||
//virtual bool getFogOfWar();
|
||||
|
||||
bool getReceivedNetworkGameStatus() { return receivedNetworkGameStatus; }
|
||||
void setReceivedNetworkGameStatus(bool value) { receivedNetworkGameStatus = value; }
|
||||
|
||||
bool hasValidSocketId();
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
||||
#endif
|
@ -1,7 +1,7 @@
|
||||
// ==============================================================
|
||||
// This file is part of Glest (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Martiño Figueroa
|
||||
// Copyright (C) 2001-2008 Martio Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
@ -48,7 +48,7 @@ protected:
|
||||
bool networkGameDataSynchCheckOkMap;
|
||||
bool networkGameDataSynchCheckOkTile;
|
||||
bool networkGameDataSynchCheckOkTech;
|
||||
bool networkGameDataSynchCheckOkFogOfWar;
|
||||
//bool networkGameDataSynchCheckOkFogOfWar;
|
||||
|
||||
string chatText;
|
||||
string chatSender;
|
||||
@ -86,15 +86,15 @@ public:
|
||||
static void setAllowGameDataSynchCheck(bool value) { allowGameDataSynchCheck = value; }
|
||||
static bool getAllowGameDataSynchCheck() { return allowGameDataSynchCheck; }
|
||||
|
||||
virtual bool getNetworkGameDataSynchCheckOk() { return (networkGameDataSynchCheckOkMap && networkGameDataSynchCheckOkTile && networkGameDataSynchCheckOkTech && networkGameDataSynchCheckOkFogOfWar); }
|
||||
virtual bool getNetworkGameDataSynchCheckOk() { return (networkGameDataSynchCheckOkMap && networkGameDataSynchCheckOkTile && networkGameDataSynchCheckOkTech); }
|
||||
virtual void setNetworkGameDataSynchCheckOkMap(bool value) { networkGameDataSynchCheckOkMap = value; }
|
||||
virtual void setNetworkGameDataSynchCheckOkTile(bool value) { networkGameDataSynchCheckOkTile = value; }
|
||||
virtual void setNetworkGameDataSynchCheckOkTech(bool value) { networkGameDataSynchCheckOkTech = value; }
|
||||
virtual bool getNetworkGameDataSynchCheckOkMap() { return networkGameDataSynchCheckOkMap; }
|
||||
virtual bool getNetworkGameDataSynchCheckOkTile() { return networkGameDataSynchCheckOkTile; }
|
||||
virtual bool getNetworkGameDataSynchCheckOkTech() { return networkGameDataSynchCheckOkTech; }
|
||||
virtual bool getNetworkGameDataSynchCheckOkFogOfWar() { return networkGameDataSynchCheckOkFogOfWar; }
|
||||
virtual void setNetworkGameDataSynchCheckOkFogOfWar(bool value) { networkGameDataSynchCheckOkFogOfWar = value; }
|
||||
//virtual bool getNetworkGameDataSynchCheckOkFogOfWar() { return networkGameDataSynchCheckOkFogOfWar; }
|
||||
//virtual void setNetworkGameDataSynchCheckOkFogOfWar(bool value) { networkGameDataSynchCheckOkFogOfWar = value; }
|
||||
|
||||
const string getChatText() const {return chatText;}
|
||||
const string getChatSender() const {return chatSender;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user