about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-05-05 01:43:27 +0200
committeroy <Tom_Adams@web.de>2011-05-05 01:43:27 +0200
commit5fbf6d0bfd32ab520c6cf67a330c9a2240882750 (patch)
treef016fcc0fdb475049be27ac0bf96efccc03de47e /src/engine
parent41ebc9bc9d9bdda650799a6c9dc9a5ed15a55430 (diff)
downloadzcatch-5fbf6d0bfd32ab520c6cf67a330c9a2240882750.tar.gz
zcatch-5fbf6d0bfd32ab520c6cf67a330c9a2240882750.zip
fixed compiler warnings. Closes #679
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/client.cpp4
-rw-r--r--src/engine/client/text.cpp3
-rw-r--r--src/engine/shared/datafile.cpp4
-rw-r--r--src/engine/shared/network_server.cpp4
4 files changed, 6 insertions, 9 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index 61a96eee..ad51c1ad 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -1718,7 +1718,6 @@ void CClient::Update()
 			int64 PrevtickStart = (m_aSnapshots[SNAP_PREV]->m_Tick)*time_freq()/50;
 			int PrevPredTick = (int)(PredNow*50/time_freq());
 			int NewPredTick = PrevPredTick+1;
-			static float LastPredintra = 0;
 
 			m_GameIntraTick = (Now - PrevtickStart) / (float)(CurtickStart-PrevtickStart);
 			m_GameTickTime = (Now - PrevtickStart) / (float)Freq; //(float)SERVER_TICK_SPEED);
@@ -1735,15 +1734,12 @@ void CClient::Update()
 
 			if(NewPredTick > m_PredTick)
 			{
-				LastPredintra = m_PredIntraTick;
 				m_PredTick = NewPredTick;
 				Repredict = 1;
 
 				// send input
 				SendInput();
 			}
-
-			LastPredintra = m_PredIntraTick;
 		}
 
 		// only do sane predictions
diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp
index b0896b92..4a3a2eb3 100644
--- a/src/engine/client/text.cpp
+++ b/src/engine/client/text.cpp
@@ -570,7 +570,6 @@ public:
 		float DrawX = 0.0f, DrawY = 0.0f;
 		int LineCount = 0;
 		float CursorX, CursorY;
-		const char *pEnd;
 
 		float Size = pCursor->m_FontSize;
 
@@ -605,8 +604,6 @@ public:
 		if(Length < 0)
 			Length = str_length(pText);
 
-		pEnd = pText + Length;
-
 		// if we don't want to render, we can just skip the first outline pass
 		i = 1;
 		if(pCursor->m_Flags&TEXTFLAG_RENDER)
diff --git a/src/engine/shared/datafile.cpp b/src/engine/shared/datafile.cpp
index 3a5a4b1d..00410038 100644
--- a/src/engine/shared/datafile.cpp
+++ b/src/engine/shared/datafile.cpp
@@ -273,7 +273,9 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
 	{
 		// fetch the data size
 		int DataSize = GetDataSize(Index);
+#if defined(CONF_ARCH_ENDIAN_BIG)
 		int SwapSize = DataSize;
+#endif
 
 		if(m_pDataFile->m_Header.m_Version == 4)
 		{
@@ -292,7 +294,9 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
 			// decompress the data, TODO: check for errors
 			s = UncompressedSize;
 			uncompress((Bytef*)m_pDataFile->m_ppDataPtrs[Index], &s, (Bytef*)pTemp, DataSize); // ignore_convention
+#if defined(CONF_ARCH_ENDIAN_BIG)
 			SwapSize = s;
+#endif
 
 			// clean up the temporary buffers
 			mem_free(pTemp);
diff --git a/src/engine/shared/network_server.cpp b/src/engine/shared/network_server.cpp
index 3078ab9f..f3fbfa32 100644
--- a/src/engine/shared/network_server.cpp
+++ b/src/engine/shared/network_server.cpp
@@ -79,9 +79,9 @@ int CNetServer::Close()
 int CNetServer::Drop(int ClientID, const char *pReason)
 {
 	// TODO: insert lots of checks here
-	NETADDR Addr = ClientAddr(ClientID);
+	/*NETADDR Addr = ClientAddr(ClientID);
 
-	/*dbg_msg("net_server", "client dropped. cid=%d ip=%d.%d.%d.%d reason=\"%s\"",
+	dbg_msg("net_server", "client dropped. cid=%d ip=%d.%d.%d.%d reason=\"%s\"",
 		ClientID,
 		Addr.ip[0], Addr.ip[1], Addr.ip[2], Addr.ip[3],
 		pReason