]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
build revision watermark
authorRudolf Polzer <divverent@alientrap.org>
Fri, 14 May 2010 18:23:55 +0000 (20:23 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 14 May 2010 18:28:29 +0000 (20:28 +0200)
BRIX WILL BE ....
when you see it

Makefile
defaultXonotic.cfg
gfx/brand.tga [deleted file]
qcsrc/client/Main.qc
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/cl_client.qc

index 7128da2d683edadfd6d829cdc585b831a0b31689..e1d51f09dc0a562069da0a0184e300fa8b3c8903 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,8 @@ ZIP ?= 7za a -tzip -mx=9
 ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc
 DIFF ?= diff
 
-FTEQCCFLAGS ?= -Werror -Wall -Wno-mundane -O3 -Ono-c -Ono-cs -flo
+FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"'
+FTEQCCFLAGS ?= -Werror -Wall -Wno-mundane -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
 FTEQCCFLAGS_PROGS ?= 
 FTEQCCFLAGS_MENU ?= 
 
index d7ed1815a8eb970d6d1c3cd1842a983ef5d15e15..2c579ac49f137621eb316fe6e94c3d4db8ccd2ad 100644 (file)
@@ -1,17 +1,5 @@
 set g_xonoticversion 2.5svn    "Xonotic version (formatted for humans)"
 
-//!<showbrand
-showbrand 3
-echo
-echo A warning about this being a SVN development version was set up.
-echo This build shall be used for development and testing only!
-echo
-echo If you want to disable this warning, add the line
-echo   showbrand 0
-echo to your autoexec.cfg.
-echo
-//!>showbrand
-
 // changes a cvar and reports it to the server (for the menu to notify the
 // server about changes)
 alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
diff --git a/gfx/brand.tga b/gfx/brand.tga
deleted file mode 100644 (file)
index d2e88c2..0000000
Binary files a/gfx/brand.tga and /dev/null differ
index 9c1af7d5fa903352dd8c0feed74ae03ef87b909a..575f8b0622deb1b433f54702e79c17a2cf10a352 100644 (file)
@@ -60,6 +60,10 @@ void CSQC_Init(void)
        
        check_unacceptable_compiler_bugs();
 
+#ifdef WATERMARK
+       print("^4CSQC Build information: ", WATERMARK(), "\n");
+#endif
+
        float i;
        CSQC_CheckEngine();
 
index 462337c05126cab5acbfe786cc1b0c23034df70c..b8fee02a13263a8b9e24a7b43359c150bc1f9dad 100644 (file)
@@ -24,6 +24,10 @@ void() m_init =
 
        check_unacceptable_compiler_bugs();
 
+#ifdef WATERMARK
+       print("^4MQC Build information: ", WATERMARK(), "\n");
+#endif
+
        // list all game dirs (TEST)
        if(cvar("developer"))
        {
index 4f365d794f5829342a3fa933425bf99d2156b05e..0492760bfd66780a50b6d9cabe2f351e6b9182fa 100644 (file)
@@ -322,8 +322,19 @@ float preMenuInit()
 
 string campaign_name_previous;
 float campaign_won_previous;
+#ifdef WATERMARK
+var string autocvar_menu_watermark = WATERMARK();
+#else
+var string autocvar_menu_watermark = "";
+#endif
 void postMenuDraw()
 {
+       if(autocvar_menu_watermark != "")
+       {
+               vector fs = '48 48 0';
+               float w;
+               draw_CenterText('0.5 0.1 0', autocvar_menu_watermark, globalToBoxSize('32 32 0', draw_scale), '1 1 1', 0.05, 1);
+       }
 }
 void preMenuDraw()
 {
index 5068f52d6aec12d8040ec0a3e02992cb416ece83..e9d9900ac28b5041326d7406f5e3cf4dba61e129 100644 (file)
@@ -1393,6 +1393,10 @@ void ClientConnect (void)
 
        DecodeLevelParms();
 
+#ifdef WATERMARK
+       sprint(self, strcat("^4SVQC Build information: ", WATERMARK(), "\n"));
+#endif
+
        self.classname = "player_joining";
 
        self.flags = FL_CLIENT;