]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make clean gamecode expansion possible
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 15 Aug 2015 01:59:54 +0000 (11:59 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 15 Aug 2015 01:59:54 +0000 (11:59 +1000)
mod/client/main.qc [new file with mode: 0644]
mod/client/progs.inc [new file with mode: 0644]
mod/server/main.qc [new file with mode: 0644]
mod/server/progs.inc [new file with mode: 0644]
qcsrc/Makefile
qcsrc/client/progs.src
qcsrc/server/progs.src

diff --git a/mod/client/main.qc b/mod/client/main.qc
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/mod/client/progs.inc b/mod/client/progs.inc
new file mode 100644 (file)
index 0000000..ae91a9e
--- /dev/null
@@ -0,0 +1,3 @@
+#if BUILD_MOD
+#include "main.qc"
+#endif
diff --git a/mod/server/main.qc b/mod/server/main.qc
new file mode 100644 (file)
index 0000000..1342b7b
--- /dev/null
@@ -0,0 +1,24 @@
+MUTATOR_HOOKFUNCTION(mod_BuildMutatorsString)
+{
+    ret_string = strcat(ret_string, ":mod");
+    return false;
+}
+
+MUTATOR_HOOKFUNCTION(mod_BuildMutatorsPrettyString)
+{
+    ret_string = strcat(ret_string, ", Mod");
+    return false;
+}
+
+MUTATOR_DEFINITION(mutator_mod)
+{
+    MUTATOR_HOOK(BuildMutatorsString, mod_BuildMutatorsString, CBC_ORDER_ANY);
+    MUTATOR_HOOK(BuildMutatorsPrettyString, mod_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+    return false;
+}
+
+[[accumulate]]
+void mutators_add()
+{
+    MUTATOR_ADD(mutator_mod);
+}
diff --git a/mod/server/progs.inc b/mod/server/progs.inc
new file mode 100644 (file)
index 0000000..ae91a9e
--- /dev/null
@@ -0,0 +1,3 @@
+#if BUILD_MOD
+#include "main.qc"
+#endif
index f53707e829f482c39e0f6dcdee0c54d54d4aa3c1..0ccf4f97163f46b878f38997e525b05f8716077a 100644 (file)
@@ -20,7 +20,8 @@ QCCFLAGS ?= \
 
 QCCFLAGS_FEATURES ?= \
        -DVEHICLES_ENABLED=1 \
-       -DVEHICLES_USE_ODE=0
+       -DVEHICLES_USE_ODE=0 \
+       -DBUILD_MOD=$(BUILD_MOD)
 
 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
 XON_BUILDSYSTEM =
index d161c6dfc60b09ff502b2cfa4bb24c313ade789d..f5408fb85c900d6877eef0699b8ae7b9f32836d4 100644 (file)
@@ -77,3 +77,5 @@ weapons/projectile.qc // TODO
 ../warpzonelib/common.qc
 ../warpzonelib/mathlib.qc
 ../warpzonelib/util_server.qc
+
+../../mod/client/progs.inc
index 388d1b675486fd8e0d1e21fb5db53343a0534682..1f045bcb20807b6616968c9aa1a0ed7faa09a9af 100644 (file)
@@ -116,3 +116,5 @@ weapons/weaponsystem.qc
 ../warpzonelib/mathlib.qc
 ../warpzonelib/server.qc
 ../warpzonelib/util_server.qc
+
+../../mod/server/progs.inc