rpms/scorched3d/devel scorched3d-64bit.patch, 1.1, 1.2 scorched3d.spec, 1.8, 1.9

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Tue Feb 7 21:07:38 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/scorched3d/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21429

Modified Files:
	scorched3d-64bit.patch scorched3d.spec 
Log Message:
more scorched3d wip

scorched3d-64bit.patch:

Index: scorched3d-64bit.patch
===================================================================
RCS file: /cvs/extras/rpms/scorched3d/devel/scorched3d-64bit.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- scorched3d-64bit.patch	5 Feb 2006 21:58:44 -0000	1.1
+++ scorched3d-64bit.patch	7 Feb 2006 21:07:38 -0000	1.2
@@ -1,6 +1,6 @@
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/client/ServerBrowser.cpp ./src/client/ServerBrowser.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/client/ServerBrowser.cpp	2003-10-21 16:58:11.000000000 +0000
-+++ ./src/client/ServerBrowser.cpp	2005-11-01 15:07:15.000000000 +0000
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/client/ServerBrowser.cpp scorched/src/client/ServerBrowser.cpp
+--- scorched.orig/src/client/ServerBrowser.cpp	2003-10-21 18:58:11.000000000 +0200
++++ scorched/src/client/ServerBrowser.cpp	2006-02-06 23:45:56.000000000 +0100
 @@ -50,7 +50,7 @@
  
  int ServerBrowser::threadFunc(void *var)
@@ -10,146 +10,549 @@
  	bool result = false;
  	if (lan) result = instance_->serverList_.fetchLANList();
  	else result = instance_->serverList_.fetchServerList();
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServer.cpp ./src/coms/NetServer.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServer.cpp	2005-06-10 23:24:31.000000000 +0000
-+++ ./src/coms/NetServer.cpp	2005-11-02 07:07:49.000000000 +0000
-@@ -235,7 +235,7 @@
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServer.cpp scorched/src/coms/NetServer.cpp
+--- scorched.orig/src/coms/NetServer.cpp	2005-06-11 01:24:31.000000000 +0200
++++ scorched/src/coms/NetServer.cpp	2006-02-07 20:25:49.000000000 +0100
+@@ -33,6 +33,7 @@
+ {
+ 	sockSet_ = SDLNet_AllocSocketSet(1);
+ 	setMutex_ = SDL_CreateMutex();
++	lastId_ = 0;
+ 	SDL_CreateThread(NetServer::threadFunc, (void *) this);
+ }
+ 
+@@ -66,7 +67,7 @@
+ 		{
+ 			NetMessage *message = (delayedMessages_.front()).second;
+ 			delayedMessages_.pop_front();
+-			sendMessage((TCPsocket) message->getDestinationId(), message);
++			sendMessage(message->getDestinationId(), message);
+ 		}
+ 	}
+ 
+@@ -184,27 +185,25 @@
+ bool NetServer::pollDeleted()
+ {
+ 	SDL_LockMutex(setMutex_);
+-	std::list<TCPsocket> remove;
+-	std::map<TCPsocket, NetServerRead *>::iterator itor;
++	std::list<unsigned int> remove;
++	std::map<unsigned int, NetServerRead *>::iterator itor;
+ 	for (itor = connections_.begin();
+ 		itor != connections_.end();
+ 		itor++)
+ 	{
+ 		NetServerRead *serverRead = (*itor).second;
+-		TCPsocket socket = (*itor).first;
+ 		if (serverRead->getDisconnect())
+ 		{
+ 			delete serverRead;
+-			remove.push_back(socket);
++			remove.push_back((*itor).first);
+ 		}
+ 	}
+-	std::list<TCPsocket>::iterator itor2;
++	std::list<unsigned int>::iterator itor2;
+ 	for (itor2 = remove.begin();
+ 		itor2 != remove.end();
+ 		itor2++)
+ 	{
+-		TCPsocket socket = (*itor2);
+-		connections_.erase(socket);
++		connections_.erase((*itor2));
+ 	}
+ 	SDL_UnlockMutex(setMutex_);
+ 	return true;
+@@ -212,13 +211,20 @@
+ 
+ void NetServer::addClient(TCPsocket client)
+ {
++	SDL_LockMutex(setMutex_);
++	// Find a free ID
++	unsigned int ID = lastId_ + 1;
++	std::map<unsigned int, NetServerRead *>::iterator itor;
++	while ((itor = connections_.find(ID)) != connections_.end())
++		ID++;
++	lastId_ = ID;
++	
+ 	// Create the thread to read this socket
+-	NetServerRead *serverRead = new NetServerRead(
+-		client, protocol_, &messageHandler_, &checkDeleted_, sentNotification_);
++	NetServerRead *serverRead = new NetServerRead(client, ID, protocol_,
++		&messageHandler_, &checkDeleted_, sentNotification_);
+ 
+ 	// Add this to the collection of sockets (connections)
+-	SDL_LockMutex(setMutex_);
+-	connections_[client] = serverRead;
++	connections_[ID] = serverRead;
+ 	firstDestination_ = (*connections_.begin()).first;
+ 	SDL_UnlockMutex(setMutex_);
+ 
+@@ -228,27 +234,22 @@
+ 
+ void NetServer::disconnectAllClients()
+ {
++	std::map<unsigned int, NetServerRead *>::iterator itor;
+ 	SDL_LockMutex(setMutex_);
+-	std::map<TCPsocket, NetServerRead *>::iterator itor;
+ 	for (itor = connections_.begin();
+ 		itor != connections_.end();
  		itor++)
  	{
- 		TCPsocket sock = (*itor).first;
+-		TCPsocket sock = (*itor).first;
 -		disconnectClient((unsigned int) sock);
-+		disconnectClient((unsigned long) sock);
++		disconnectClient((*itor).first);
  	}
  	SDL_UnlockMutex(setMutex_);
  }
-@@ -247,7 +247,7 @@
  
+ void NetServer::disconnectClient(unsigned int dest, bool delayed)
+ {
+-	TCPsocket client = (TCPsocket) dest;
+-	DIALOG_ASSERT(client);
+-
  	NetMessage *message = NetMessagePool::instance()->
  		getFromPool(NetMessage::DisconnectMessage, 
 -				(unsigned int) client,
-+				(unsigned long) client,
- 				getIpAddress(client));
+-				getIpAddress(client));
++				dest, getIpAddress(dest));
  
  	if (delayed)
-@@ -264,7 +264,7 @@
+ 	{
+@@ -258,25 +259,20 @@
+ 	else
+ 	{
+ 		// Add the message to the list of out going
+-		sendMessage(client, message);
++		sendMessage(dest, message);
+ 	}
+ }
  
  void NetServer::sendMessage(NetBuffer &buffer)
  {
 -	sendMessage(buffer, (unsigned int) firstDestination_);
-+	sendMessage(buffer, (unsigned long) firstDestination_);
++	sendMessage(buffer, firstDestination_);
  }
  
- void NetServer::sendMessage(NetBuffer &buffer, unsigned int dest)
-@@ -276,7 +276,7 @@
+-void NetServer::sendMessage(NetBuffer &buffer, unsigned int dest)
+-							
++void NetServer::sendMessage(NetBuffer &buffer, unsigned int destination)
+ {
+-	TCPsocket destination = (TCPsocket) dest;
+-	DIALOG_ASSERT(destination);
+-
  	// Get a new buffer from the pool
  	NetMessage *message = NetMessagePool::instance()->
- 		getFromPool(NetMessage::NoMessage, 
+-		getFromPool(NetMessage::NoMessage, 
 -				(unsigned int) destination,
-+				(unsigned long) destination,
++		getFromPool(NetMessage::NoMessage, destination,
  				getIpAddress(destination));
  
  	// Add message to new buffer
-@@ -304,8 +304,8 @@
+@@ -289,12 +285,12 @@
+ 	sendMessage(destination, message);
+ }
+ 
+-void NetServer::sendMessage(TCPsocket client, NetMessage *message)
++void NetServer::sendMessage(unsigned int dest, NetMessage *message)
+ {
+ 	// Find the client
+ 	SDL_LockMutex(setMutex_);
+-	std::map<TCPsocket, NetServerRead *>::iterator itor = 
+-		connections_.find(client);
++	std::map<unsigned int, NetServerRead *>::iterator itor = 
++		connections_.find(dest);
+ 	if (itor != connections_.end()) 
+ 	{
+ 		// Add the message to the list of out going
+@@ -304,10 +300,31 @@
  	else
  	{
  		NetMessagePool::instance()->addToPool(message);
 -		Logger::log( "Unknown sendMessage destination %i",
 -			(int) client);
-+		Logger::log( "Unknown sendMessage destination %li",
-+			(long) client);
++		Logger::log( "Unknown sendMessage destination %u", dest);
++	}
++	SDL_UnlockMutex(setMutex_);
++}
++
++unsigned int NetServer::getIpAddress(unsigned int destination)
++{
++	unsigned int addr = 0;
++
++	SDL_LockMutex(setMutex_);
++	std::map<unsigned int, NetServerRead *>::iterator itor = 
++		connections_.find(destination);
++	if (itor != connections_.end())
++	{
++		NetServerRead *serverRead = (*itor).second;
++		IPaddress *address = SDLNet_TCP_GetPeerAddress(
++					serverRead->getSocket());
++		if (address)
++		{
++			addr = SDLNet_Read32(&address->host);
++		}
  	}
  	SDL_UnlockMutex(setMutex_);
++
++	return addr;
+ }
+ 
+ unsigned int NetServer::getIpAddress(TCPsocket destination)
+Only in scorched/src/coms: NetServer.cpp~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServer.h scorched/src/coms/NetServer.h
+--- scorched.orig/src/coms/NetServer.h	2005-06-11 01:24:31.000000000 +0200
++++ scorched/src/coms/NetServer.h	2006-02-07 20:26:01.000000000 +0100
+@@ -52,22 +52,24 @@
+ protected:
+ 	NetServerProtocol *protocol_;
+ 	TCPsocket server_;
+-	TCPsocket firstDestination_;
++	unsigned int firstDestination_;
+ 	SDLNet_SocketSet sockSet_;
+-	std::map<TCPsocket, NetServerRead *> connections_;
++	std::map<unsigned int, NetServerRead *> connections_;
+ 	std::list<std::pair<float, NetMessage *> > delayedMessages_;
+ 	Clock delayedClock_;
+ 	SDL_mutex *setMutex_;
+ 	NetMessageHandler messageHandler_;
+ 	bool checkDeleted_;
+ 	bool sentNotification_;
++	unsigned int lastId_;
+ 
+ 	static int threadFunc(void *);
+ 
+ 	bool pollIncoming();
+ 	bool pollDeleted();
+ 	void addClient(TCPsocket client);
+-	void sendMessage(TCPsocket client, NetMessage *message);
++	void sendMessage(unsigned int dest, NetMessage *message);
++	unsigned int getIpAddress(unsigned int destination);
+ 
+ private:
+ 
+Only in scorched/src/coms: NetServer.h~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServerProtocol.cpp scorched/src/coms/NetServerProtocol.cpp
+--- scorched.orig/src/coms/NetServerProtocol.cpp	2006-02-06 22:37:12.000000000 +0100
++++ scorched/src/coms/NetServerProtocol.cpp	2006-02-07 20:15:39.000000000 +0100
+@@ -40,7 +40,8 @@
+ {
+ }
+ 
+-bool NetServerScorchedProtocol::sendBuffer(NetBuffer &buffer, TCPsocket socket)
++bool NetServerScorchedProtocol::sendBuffer(NetBuffer &buffer,
++	TCPsocket socket, unsigned int socketId)
+ {
+ 	Uint32 len = buffer.getBufferUsed();
+ 	Uint32 netlen=0;
+@@ -94,7 +95,8 @@
+ 	return true;
  }
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServerProtocol.cpp ./src/coms/NetServerProtocol.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServerProtocol.cpp	2005-06-13 17:31:06.000000000 +0000
-+++ ./src/coms/NetServerProtocol.cpp	2005-11-02 07:43:20.000000000 +0000
-@@ -125,7 +125,7 @@
+ 
+-NetMessage *NetServerScorchedProtocol::readBuffer(TCPsocket socket)
++NetMessage *NetServerScorchedProtocol::readBuffer(TCPsocket socket,
++	unsigned int socketId)
+ {
+ 	// receive the length of the string message
+ 	char lenbuf[4];
+@@ -125,8 +127,7 @@
  	// allocate the buffer memory
  	NetMessage *buffer = NetMessagePool::instance()->
  		getFromPool(NetMessage::BufferMessage, 
 -				(unsigned int) socket,
-+				(unsigned long) socket,
- 				NetServer::getIpAddress(socket));
+-				NetServer::getIpAddress(socket));
++				socketId, NetServer::getIpAddress(socket));
  	buffer->getBuffer().allocate(len);
  	buffer->getBuffer().setBufferUsed(len);
-@@ -161,7 +161,7 @@
+ 
+@@ -153,7 +154,8 @@
+ {
+ }
+ 
+-bool NetServerCompressedProtocol::sendBuffer(NetBuffer &buffer, TCPsocket socket)
++bool NetServerCompressedProtocol::sendBuffer(NetBuffer &buffer,
++	TCPsocket socket, unsigned int socketId)
+ {
+ 	unsigned long destLen = buffer.getBufferUsed() * 2;
+ 	unsigned long srcLen = buffer.getBufferUsed();
+@@ -161,8 +163,7 @@
  	// Allocate a new buffer
  	NetMessage *newMessage = NetMessagePool::instance()->
  		getFromPool(NetMessage::BufferMessage, 
 -				(unsigned int) socket,
-+				(unsigned long) socket,
- 				NetServer::getIpAddress(socket));
+-				NetServer::getIpAddress(socket));
++				socketId, NetServer::getIpAddress(socket));
  	NetBuffer &newBuffer = newMessage->getBuffer();
  	newBuffer.allocate(destLen);
-@@ -291,7 +291,7 @@
+ 
+@@ -185,7 +186,8 @@
+ 		//Logger::log( "Compressed %i->%i",
+ 		//			buffer.getBufferUsed(), newBuffer.getBufferUsed());
+ 
+-		retVal = NetServerScorchedProtocol::sendBuffer(newBuffer, socket);
++		retVal = NetServerScorchedProtocol::sendBuffer(newBuffer,
++				socket, socketId);
+ 	}
+ 	else
+ 	{
+@@ -197,10 +199,12 @@
+ 	return retVal;
+ }
+ 
+-NetMessage *NetServerCompressedProtocol::readBuffer(TCPsocket socket)
++NetMessage *NetServerCompressedProtocol::readBuffer(TCPsocket socket,
++	unsigned int socketId)
+ {
+ 	// Read the message from the socket
+-	NetMessage *message = NetServerScorchedProtocol::readBuffer(socket);
++	NetMessage *message = NetServerScorchedProtocol::readBuffer(socket,
++				socketId);
+ 	if (message)
+ 	{
+ 		// Get the uncompressed size from the buffer
+@@ -268,7 +272,8 @@
+ {
+ }
+ 
+-bool NetServerHTTPProtocolSend::sendBuffer(NetBuffer &buffer, TCPsocket socket)
++bool NetServerHTTPProtocolSend::sendBuffer(NetBuffer &buffer,
++	TCPsocket socket, unsigned int socketId)
+ {
+ 	Uint32 len = buffer.getBufferUsed();
+ 	
+@@ -286,13 +291,13 @@
+ 	return true;
+ }
+ 
+-NetMessage *NetServerHTTPProtocolSend::readBuffer(TCPsocket socket)
++NetMessage *NetServerHTTPProtocolSend::readBuffer(TCPsocket socket,
++	unsigned int socketId)
+ {
  	// allocate the buffer memory
  	NetMessage *netBuffer = NetMessagePool::instance()->
  		getFromPool(NetMessage::BufferMessage,
 -				(unsigned int) socket,
-+				(unsigned long) socket,
- 				NetServer::getIpAddress(socket));
+-				NetServer::getIpAddress(socket));
++				socketId, NetServer::getIpAddress(socket));
  	netBuffer->getBuffer().reset();
  
-@@ -354,7 +354,7 @@
+ 	// get the string buffer over the socket
+@@ -331,7 +336,8 @@
+ {
+ }
+ 
+-bool NetServerHTTPProtocolRecv::sendBuffer(NetBuffer &buffer, TCPsocket socket)
++bool NetServerHTTPProtocolRecv::sendBuffer(NetBuffer &buffer,
++	TCPsocket socket, unsigned int socketId)
+ {
+ 	Uint32 len = buffer.getBufferUsed();
+ 	
+@@ -349,13 +355,13 @@
+ 	return true;
+ }
+ 
+-NetMessage *NetServerHTTPProtocolRecv::readBuffer(TCPsocket socket)
++NetMessage *NetServerHTTPProtocolRecv::readBuffer(TCPsocket socket,
++	unsigned int socketId)
+ {
  	// allocate the buffer memory
  	NetMessage *netBuffer = NetMessagePool::instance()->
  		getFromPool(NetMessage::BufferMessage,
 -				(unsigned int) socket,
-+				(unsigned long) socket,
- 				NetServer::getIpAddress(socket));
+-				NetServer::getIpAddress(socket));
++				socketId, NetServer::getIpAddress(socket));
  	netBuffer->getBuffer().reset();
  
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServerRead.cpp ./src/coms/NetServerRead.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/coms/NetServerRead.cpp	2005-06-10 23:24:31.000000000 +0000
-+++ ./src/coms/NetServerRead.cpp	2005-11-02 07:44:10.000000000 +0000
-@@ -64,7 +64,7 @@
+ 	// get the string buffer over the socket
+Only in scorched/src/coms: NetServerProtocol.cpp~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServerProtocol.h scorched/src/coms/NetServerProtocol.h
+--- scorched.orig/src/coms/NetServerProtocol.h	2005-06-08 19:29:38.000000000 +0200
++++ scorched/src/coms/NetServerProtocol.h	2006-02-07 20:14:35.000000000 +0100
+@@ -29,8 +29,10 @@
+ 	NetServerProtocol();
+ 	virtual ~NetServerProtocol();
+ 
+-	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket) = 0;
+-	virtual NetMessage *readBuffer(TCPsocket socket) = 0;
++	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket,
++		unsigned int socketId) = 0;
++	virtual NetMessage *readBuffer(TCPsocket socket,
++		unsigned int socketId) = 0;
+ };
+ 
+ class NetServerScorchedProtocol : public NetServerProtocol
+@@ -39,8 +41,10 @@
+ 	NetServerScorchedProtocol();
+ 	virtual ~NetServerScorchedProtocol();
+ 
+-	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket);
+-	virtual NetMessage *readBuffer(TCPsocket socket);
++	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket,
++		unsigned int socketId);
++	virtual NetMessage *readBuffer(TCPsocket socket,
++		unsigned int socketId);
+ };
+ 
+ class NetServerCompressedProtocol : public NetServerScorchedProtocol
+@@ -49,8 +53,10 @@
+ 	NetServerCompressedProtocol();
+ 	virtual ~NetServerCompressedProtocol();
+ 
+-	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket);
+-	virtual NetMessage *readBuffer(TCPsocket socket);
++	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket,
++		unsigned int socketId);
++	virtual NetMessage *readBuffer(TCPsocket socket,
++		unsigned int socketId);
+ };
+ 
+ class NetServerHTTPProtocolSend : public NetServerProtocol
+@@ -59,8 +65,10 @@
+ 	NetServerHTTPProtocolSend();
+ 	virtual ~NetServerHTTPProtocolSend();
+ 
+-	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket);
+-	virtual NetMessage *readBuffer(TCPsocket socket);
++	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket,
++		unsigned int socketId);
++	virtual NetMessage *readBuffer(TCPsocket socket,
++		unsigned int socketId);
+ };
+ 
+ class NetServerHTTPProtocolRecv : public NetServerProtocol
+@@ -69,8 +77,10 @@
+ 	NetServerHTTPProtocolRecv();
+ 	virtual ~NetServerHTTPProtocolRecv();
+ 
+-	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket);
+-	virtual NetMessage *readBuffer(TCPsocket socket);
++	virtual bool sendBuffer(NetBuffer &buffer, TCPsocket socket,
++		unsigned int socketId);
++	virtual NetMessage *readBuffer(TCPsocket socket,
++		unsigned int socketId);
+ };
+ 
+ #endif
+Only in scorched/src/coms: NetServerProtocol.h~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServerRead.cpp scorched/src/coms/NetServerRead.cpp
+--- scorched.orig/src/coms/NetServerRead.cpp	2005-06-11 01:24:31.000000000 +0200
++++ scorched/src/coms/NetServerRead.cpp	2006-02-07 20:19:01.000000000 +0100
+@@ -26,11 +26,12 @@
+ #include <common/Defines.h>
+ 
+ NetServerRead::NetServerRead(TCPsocket socket,
++							 unsigned int socketId,
+ 							 NetServerProtocol *protocol,
+ 							 NetMessageHandler *messageHandler,
+ 							 bool *checkDeleted,
+ 							 bool sentNotification) : 
+-	socket_(socket), sockSet_(0), protocol_(protocol), 
++	socket_(socket), socketId_(socketId), sockSet_(0), protocol_(protocol), 
+ 	outgoingMessagesMutex_(0), checkDeleted_(checkDeleted),
+ 	disconnect_(false), messageHandler_(messageHandler),
+ 	sentDisconnect_(false), startCount_(0),
+@@ -64,8 +65,7 @@
  	// Send the player connected notification
  	NetMessage *message = NetMessagePool::instance()->
  		getFromPool(NetMessage::ConnectMessage, 
 -		(unsigned int) socket_,
-+		(unsigned long) socket_,
- 		NetServer::getIpAddress(socket_));
+-		NetServer::getIpAddress(socket_));
++		socketId_, NetServer::getIpAddress(socket_));
  	messageHandler_->addMessage(message);
  
-@@ -96,7 +96,7 @@
+ 	recvThread_ = SDL_CreateThread(
+@@ -96,8 +96,7 @@
  		sentDisconnect_ = true;
  		NetMessage *message = NetMessagePool::instance()->
  			getFromPool(NetMessage::DisconnectMessage, 
 -				(unsigned int) socket_,
-+				(unsigned long) socket_,
- 				NetServer::getIpAddress(socket_));
+-				NetServer::getIpAddress(socket_));
++				socketId_, NetServer::getIpAddress(socket_));
  		messageHandler_->addMessage(message);
  	}
-@@ -191,7 +191,7 @@
+ 	SDL_UnlockMutex(outgoingMessagesMutex_);
+@@ -189,9 +188,9 @@
+ 		if (timeDiff > 15.0f)
+ 		{
  			Logger::log( 
- 				"Warning: %s net loop took %.2f seconds, client %i", 
+-				"Warning: %s net loop took %.2f seconds, client %i", 
++				"Warning: %s net loop took %.2f seconds, client %u", 
  				(send?"Send":"Recv"),
 -				timeDiff, (unsigned int) socket_);
-+				timeDiff, (unsigned long) socket_);
++				timeDiff, socketId_);
  		}
  	}
  
-@@ -201,7 +201,7 @@
+@@ -201,8 +200,7 @@
  		sentDisconnect_ = true;
  		NetMessage *message = NetMessagePool::instance()->
  			getFromPool(NetMessage::DisconnectMessage, 
 -				(unsigned int) socket_,
-+				(unsigned long) socket_,
- 				NetServer::getIpAddress(socket_));
+-				NetServer::getIpAddress(socket_));
++				socketId_, NetServer::getIpAddress(socket_));
  		messageHandler_->addMessage(message);
  	}
+ 	SDL_UnlockMutex(outgoingMessagesMutex_);
+@@ -220,7 +218,8 @@
+ 
+ 	if(SDLNet_SocketReady(socket_))
+ 	{
+-		NetMessage *message = protocol_->readBuffer(socket_);
++		NetMessage *message = protocol_->readBuffer(socket_,
++					socketId_);
+ 		if (!message)
+ 		{
+ 			Logger::log( "Client socket has been closed.");
+@@ -263,7 +262,8 @@
+ 		}
+ 		else
+ 		{
+-			if (!protocol_->sendBuffer(message->getBuffer(), socket_))
++			if (!protocol_->sendBuffer(message->getBuffer(),
++				socket_, socketId_))
+ 			{
+ 				Logger::log( "Failed to send message to client");
+ 				result = false;
 @@ -276,7 +276,7 @@
  		{
  			NetMessage *notification = NetMessagePool::instance()->
  				getFromPool(NetMessage::SentMessage,
 -					(unsigned int) socket_,
-+					(unsigned long) socket_,
++					socketId_,
  					NetServer::getIpAddress(socket_));
  			messageHandler_->addMessage(notification);
  		}
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/dialogs/HelpButtonDialog.cpp ./src/dialogs/HelpButtonDialog.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/dialogs/HelpButtonDialog.cpp	2005-09-18 09:59:33.000000000 +0000
-+++ ./src/dialogs/HelpButtonDialog.cpp	2005-11-01 15:07:15.000000000 +0000
+Only in scorched/src/coms: NetServerRead.cpp~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/coms/NetServerRead.h scorched/src/coms/NetServerRead.h
+--- scorched.orig/src/coms/NetServerRead.h	2005-06-11 01:24:31.000000000 +0200
++++ scorched/src/coms/NetServerRead.h	2006-02-07 19:52:32.000000000 +0100
+@@ -28,6 +28,7 @@
+ {
+ public:
+ 	NetServerRead(TCPsocket socket,
++		unsigned int socketId,
+ 		NetServerProtocol *protocol,
+ 		NetMessageHandler *messageHandler,
+ 		bool *checkDeleted,
+@@ -37,12 +38,14 @@
+ 	void start();
+ 	bool getDisconnect();
+ 	void addMessage(NetMessage *message);
++	TCPsocket getSocket() { return socket_; }
+ 
+ protected:
+ 	bool *checkDeleted_;
+ 	bool disconnect_, sentDisconnect_;
+ 	bool sentNotification_;
+ 	TCPsocket socket_;
++	unsigned int socketId_;
+ 	SDLNet_SocketSet sockSet_;
+ 	NetServerProtocol *protocol_;
+ 	NetMessageHandler *messageHandler_;
+Only in scorched/src/coms: NetServerRead.h~
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/dialogs/HelpButtonDialog.cpp scorched/src/dialogs/HelpButtonDialog.cpp
+--- scorched.orig/src/dialogs/HelpButtonDialog.cpp	2006-02-06 22:37:12.000000000 +0100
++++ scorched/src/dialogs/HelpButtonDialog.cpp	2006-02-06 23:45:56.000000000 +0100
 @@ -160,7 +160,7 @@
  
  void HelpButtonDialog::itemSelected(GLWSelectorEntry *entry, int position)
@@ -159,15 +562,16 @@
  	if (data != -1)
  	{
  		int volume = int(float(data) * 12.8f);
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/engine/ScorchedCollisionHandler.cpp ./src/engine/ScorchedCollisionHandler.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/engine/ScorchedCollisionHandler.cpp	2005-06-08 17:29:38.000000000 +0000
-+++ ./src/engine/ScorchedCollisionHandler.cpp	2005-11-01 19:47:08.000000000 +0000
+Only in scorched/src/dialogs: HelpButtonDialog.cpp.64bit
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/engine/ScorchedCollisionHandler.cpp scorched/src/engine/ScorchedCollisionHandler.cpp
+--- scorched.orig/src/engine/ScorchedCollisionHandler.cpp	2005-06-08 19:29:38.000000000 +0200
++++ scorched/src/engine/ScorchedCollisionHandler.cpp	2006-02-06 23:45:56.000000000 +0100
 @@ -93,7 +93,7 @@
  	}
  
  	ShotBounce *particle = (ShotBounce *) bounceInfo->data;
 -	unsigned int id = (unsigned int) otherInfo->data;
-+	unsigned long id = (unsigned long) otherInfo->data;
++	unsigned int id = (unsigned long) otherInfo->data;
  
  	// only collide with the ground, walls or landscape,
  	// or iteself
@@ -176,13 +580,14 @@
  	}
  
 -	unsigned int id = (unsigned int) otherInfo->data;
-+	unsigned long id = (unsigned long) otherInfo->data;
++	unsigned int id = (unsigned long) otherInfo->data;
  	ShotProjectile *shot = (ShotProjectile *) particleInfo->data;
  	shot->incLandedCounter();
  	Vector particlePositionV(
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/ode/config.h ./src/ode/config.h
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/ode/config.h	2004-11-02 09:20:35.000000000 +0000
-+++ ./src/ode/config.h	2005-11-01 15:07:15.000000000 +0000
+Only in scorched/src/engine: ScorchedCollisionHandler.cpp.64bit
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/ode/config.h scorched/src/ode/config.h
+--- scorched.orig/src/ode/config.h	2004-11-02 10:20:35.000000000 +0100
++++ scorched/src/ode/config.h	2006-02-06 23:45:56.000000000 +0100
 @@ -81,7 +81,7 @@
  /* an integer type that we can safely cast a pointer to and from without
   * loss of bits.
@@ -192,9 +597,9 @@
  
  
  /* if we're compiling on a pentium, we may need to know the clock rate so
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/scorched/SettingsDialog.cpp ./src/scorched/SettingsDialog.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/scorched/SettingsDialog.cpp	2005-09-22 15:14:28.000000000 +0000
-+++ ./src/scorched/SettingsDialog.cpp	2005-11-02 07:48:05.000000000 +0000
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/scorched/SettingsDialog.cpp scorched/src/scorched/SettingsDialog.cpp
+--- scorched.orig/src/scorched/SettingsDialog.cpp	2006-02-06 22:37:12.000000000 +0100
++++ scorched/src/scorched/SettingsDialog.cpp	2006-02-06 23:45:56.000000000 +0100
 @@ -748,44 +748,44 @@
  
  	// Env
@@ -263,9 +668,9 @@
  			SettingsMain::IDC_TEAMBALLANCE_CTRL->GetClientData(
  				SettingsMain::IDC_TEAMBALLANCE_CTRL->GetSelection()));			
  		context_.setTeams((int) SettingsMain::IDC_TEAMS_CTRL->GetSelection() + 1);
-diff -urN ../tmp-orig/scorched3d-39.1+cvs20050929/src/tankgraph/GLWTankTip.cpp ./src/tankgraph/GLWTankTip.cpp
---- ../tmp-orig/scorched3d-39.1+cvs20050929/src/tankgraph/GLWTankTip.cpp	2005-06-11 16:53:41.000000000 +0000
-+++ ./src/tankgraph/GLWTankTip.cpp	2005-11-01 15:07:15.000000000 +0000
+diff -ur --exclude=CVS --exclude=Makefile --exclude=Makefile.in --exclude=autom4te.cache --exclude=aclocal.m4 --exclude=configure --exclude=config.status --exclude=borland --exclude=config.log --exclude=.deps scorched.orig/src/tankgraph/GLWTankTip.cpp scorched/src/tankgraph/GLWTankTip.cpp
+--- scorched.orig/src/tankgraph/GLWTankTip.cpp	2005-06-11 18:53:41.000000000 +0200
++++ scorched/src/tankgraph/GLWTankTip.cpp	2006-02-06 23:45:56.000000000 +0100
 @@ -66,7 +66,7 @@
  
  void TankUndoMenu::itemSelected(GLWSelectorEntry *entry, int position)


Index: scorched3d.spec
===================================================================
RCS file: /cvs/extras/rpms/scorched3d/devel/scorched3d.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- scorched3d.spec	6 Feb 2006 15:01:40 -0000	1.8
+++ scorched3d.spec	7 Feb 2006 21:07:38 -0000	1.9
@@ -55,9 +55,9 @@
 %patch1 -p1 -z .syslibs
 %patch2 -p0 -z .aclocal18
 %patch3 -p1 -z .gcc41
-%patch4 -p0 -z .64bit
+%patch4 -p1 -z .64bit
 %patch5 -p1 -z .openal
-%patch6 -p1 -z .help
+#%patch6 -p1 -z .help
 tar xvfz %{SOURCE2}
 . autogen.sh
 




More information about the fedora-extras-commits mailing list