[iortcw] 465/497: MP: Add option to build update server

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 19a4aeff9ce83220b55e14e93382c75539ed54bf
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Mon Dec 7 07:19:50 2015 -0500

    MP: Add option to build update server
---
 MP/Makefile                | 7 +++++++
 MP/code/qcommon/common.c   | 6 +++---
 MP/code/server/sv_client.c | 4 ++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/MP/Makefile b/MP/Makefile
index 988668f..b0f0347 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -28,6 +28,9 @@ endif
 ifndef BUILD_SERVER
   BUILD_SERVER     =
 endif
+ifndef BUILD_UPDATE_SERVER
+  BUILD_UPDATE_SERVER     = 0
+endif
 ifndef BUILD_GAME_SO
   BUILD_GAME_SO    =
 endif
@@ -1029,6 +1032,10 @@ ifneq ($(BUILD_SERVER),0)
   TARGETS += $(B)/$(SERVERBIN)$(FULLBINEXT)
 endif
 
+ifneq ($(BUILD_UPDATE_SERVER),0)
+  SERVER_CFLAGS += -DUPDATE_SERVER
+endif
+
 ifneq ($(BUILD_CLIENT),0)
   ifneq ($(USE_RENDERER_DLOPEN),0)
     TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT) $(B)/renderer_mp_opengl1_$(SHLIBNAME)
diff --git a/MP/code/qcommon/common.c b/MP/code/qcommon/common.c
index 1da05a1..87cd7bd 100644
--- a/MP/code/qcommon/common.c
+++ b/MP/code/qcommon/common.c
@@ -2357,6 +2357,8 @@ For controlling environment variables
 
 void Com_ExecuteCfg(void)
 {
+// DHM - Nerve
+#ifndef UPDATE_SERVER
 	Cbuf_ExecuteText(EXEC_NOW, "exec default.cfg\n");
 	if ( FS_ReadFile( "language.cfg", NULL ) > 0 ) {
 		Cbuf_ExecuteText(EXEC_APPEND, "exec language.cfg\n");
@@ -2373,6 +2375,7 @@ void Com_ExecuteCfg(void)
 		Cbuf_ExecuteText(EXEC_NOW, "exec autoexec.cfg\n");
 		Cbuf_Execute();
 	}
+#endif
 }
 
 /*
@@ -2748,8 +2751,6 @@ void Com_Init( char *commandLine ) {
 
 	Com_InitJournaling();
 
-	// DHM - Nerve
-#ifndef UPDATE_SERVER
 	// Add some commands here already so users can use them from config files
 	Cmd_AddCommand ("setenv", Com_Setenv_f);
 	if (com_developer && com_developer->integer)
@@ -2763,7 +2764,6 @@ void Com_Init( char *commandLine ) {
 	Cmd_AddCommand ("writeconfig", Com_WriteConfig_f );
 	Cmd_SetCommandCompletionFunc( "writeconfig", Cmd_CompleteCfgName );
 	Cmd_AddCommand("game_restart", Com_GameRestart_f);
-#endif
 
 	Com_ExecuteCfg();
 
diff --git a/MP/code/server/sv_client.c b/MP/code/server/sv_client.c
index 6ce2498..e604ea6 100644
--- a/MP/code/server/sv_client.c
+++ b/MP/code/server/sv_client.c
@@ -973,7 +973,7 @@ int SV_WriteDownloadToClient( client_t *cl, msg_t *msg ) {
 		// Chop off filename extension.
 		Com_sprintf(pakbuf, sizeof(pakbuf), "%s", cl->downloadName);
 		pakptr = strrchr(pakbuf, '.');
-		
+
 		if(pakptr)
 		{
 			*pakptr = '\0';
@@ -1029,7 +1029,7 @@ int SV_WriteDownloadToClient( client_t *cl, msg_t *msg ) {
 			*cl->downloadName = 0;
 
 			SV_DropClient( cl, "Invalid download from update server" );
-			return;
+			return 0;
 		}
 #endif
 		// DHM - Nerve

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list