]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
#includes: cleanup
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 9 Oct 2015 09:32:33 +0000 (20:32 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 9 Oct 2015 09:32:33 +0000 (20:32 +1100)
77 files changed:
qcsrc/client/_all.qh
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/mapvoting.qc
qcsrc/client/progs.inc
qcsrc/client/quickmenu.qc
qcsrc/common/animdecide.qc
qcsrc/common/buffs/all.qc
qcsrc/common/campaign_file.qc
qcsrc/common/campaign_setup.qc
qcsrc/common/items/item.qh
qcsrc/common/items/item/powerup.qc
qcsrc/common/mapinfo.qc
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/monsters/spawn.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/nades/all.qc
qcsrc/common/notifications.qc
qcsrc/common/playerstats.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/util-post.qh [deleted file]
qcsrc/common/util-pre.qh [deleted file]
qcsrc/common/util.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/config.qc
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/csqcmodellib/interpolate.qc
qcsrc/csqcmodellib/sv_model.qc
qcsrc/lib/_all.inc
qcsrc/lib/bool.qh
qcsrc/lib/compiler.qh [new file with mode: 0644]
qcsrc/lib/defer.qh
qcsrc/lib/functional.qh [new file with mode: 0644]
qcsrc/lib/int.qh [new file with mode: 0644]
qcsrc/lib/iter.qh [new file with mode: 0644]
qcsrc/lib/misc.qh [new file with mode: 0644]
qcsrc/lib/nil.qh
qcsrc/lib/oo.qh
qcsrc/lib/self.qh [new file with mode: 0644]
qcsrc/lib/test.qh
qcsrc/lib/urllib.qh
qcsrc/menu/_all.qh
qcsrc/menu/anim/animation.qc
qcsrc/menu/anim/animhost.qc
qcsrc/menu/item.qc
qcsrc/menu/menu.qh
qcsrc/menu/oo/base.qh [deleted file]
qcsrc/menu/oo/classes.qc
qcsrc/menu/progs.inc
qcsrc/menu/xonotic/util.qc
qcsrc/server/_all.qh
qcsrc/server/anticheat.qc
qcsrc/server/antilag.qc
qcsrc/server/bot/_all.inc [new file with mode: 0644]
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/_all.inc [new file with mode: 0644]
qcsrc/server/csqceffects.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_models.qc
qcsrc/server/ipban.qc
qcsrc/server/mutators/mutators.qc
qcsrc/server/mutators/mutators_include.qc
qcsrc/server/pathlib/_all.inc [new file with mode: 0644]
qcsrc/server/playerdemo.qc
qcsrc/server/progs.inc
qcsrc/server/steerlib.qc
qcsrc/server/t_items.qh
qcsrc/test/compilationunit.sh
qcsrc/warpzonelib/anglestransform.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/server.qc
qcsrc/warpzonelib/util_server.qc

index 0fe1c616fd687d4eb9adecfcf2fa8f62086f52f7..7ae1430d4108b4362ea761adec59162d5f319984 100644 (file)
@@ -6,8 +6,6 @@
 #include "main.qh"
 #include "miscfunctions.qh"
 
-#include "../dpdefs/csprogsdefs.qh"
-
 #include "../common/models/all.qh"
 #include "../common/sounds/all.qh"
 
index dbae62cbdef08c40cde94676b407e014673e5169..81fa5755271445be76c89fecb8e44e2eaadc4e3e 100644 (file)
@@ -7,8 +7,6 @@
 #include "teamradar.qh"
 #include "t_items.qh"
 
-#include "../dpdefs/keycodes.qh"
-
 #include "../common/buffs/all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
index 2cdb9fcf4de9105cd47c8e1cf5994ba58459eacb..55c6c061eaae81fe8b6c77cc8a8249fe77627034 100644 (file)
@@ -5,8 +5,6 @@
 
 #include "../common/constants.qh"
 
-#include "../dpdefs/keycodes.qh"
-
 
 #define HUD_Write(s) fputs(fh, s)
 // q: quoted, n: not quoted
index 945f312ab29a29592806145c248229b94c1fcf92..010f424f1aa73b2330db0db12c79006559825a9f 100644 (file)
@@ -7,8 +7,6 @@
 #include "../common/mapinfo.qh"
 #include "../common/util.qh"
 
-#include "../dpdefs/keycodes.qh"
-
 
 int mv_num_maps;
 
index ec5c31844af9a57657c608ce25ad5efdce45e963..e1e96ef135d75fba3241d75426f31b2700813798 100644 (file)
@@ -1,7 +1,3 @@
-#include "../common/util-pre.qh"
-#include "../dpdefs/csprogsdefs.qh"
-#include "../common/util-post.qh"
-
 #include "../lib/_all.inc"
 
 #include "announcer.qc"
index 5f896beea56bcafca0b9d35deca04654c4ad71b3..dd2ba0315485d7ab08fe28f828de4fbe3211ed23 100644 (file)
@@ -2,8 +2,6 @@
 
 #include "hud_config.qh"
 
-#include "../dpdefs/keycodes.qh"
-
 // QUICKMENU_MAXLINES must be <= 10
 const int QUICKMENU_MAXLINES = 10;
 // visible entries are loaded from QuickMenu_Buffer into QuickMenu_Page_* arrays
index 0db1a6afdfea74ce714a72b538901783bb3e06bb..e2bda23a0239b7adeb5667c0308f20443da5f308 100644 (file)
@@ -1,12 +1,6 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "animdecide.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
+#include "animdecide.qh"
+#if defined(SVQC)
     #include "util.qh"
-    #include "animdecide.qh"
     #include "../server/defs.qh"
 #endif
 
index 190c627ceabdf5da88bd401e5f8b279f327abf45..c6a6f49f02b4b43d0cb8b2f4b18546130d495324 100644 (file)
@@ -1,10 +1,7 @@
 #if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
        #include "../../client/defs.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
 #endif
 #include "all.qh"
 
index 69dbb0b1d3af124d6900d59381e6f67919f31036..a8bbe8e856c430a7fdfaf85e9ab5a4988c96a13d 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "util.qh"
     #include "campaign_common.qh"
 #endif
index b822c34942a49eece429b68f32e9e43675b6bcdd..8c20c755c31a33881a6b37933d464b63ab5bb329 100644 (file)
@@ -1,7 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
     #include "campaign_common.qh"
     #include "mapinfo.qh"
 #endif
index ceb9a0aa4df1192c904706a711d0922f92d463b5..7a12b305006754776fd9ff90af756c916032d594 100644 (file)
@@ -1,5 +1,46 @@
 #ifndef GAMEITEM_H
 #define GAMEITEM_H
+
+const int IT_UNLIMITED_WEAPON_AMMO             =       1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
+const int IT_UNLIMITED_SUPERWEAPONS            =       2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
+const int IT_CTF_SHIELDED                      =       4; // set for the flag shield
+const int IT_USING_JETPACK                     =       8; // confirmation that button is pressed
+const int IT_JETPACK                           =      16; // actual item
+const int IT_FUEL_REGEN                        =      32; // fuel regeneration trigger
+// where is 64... ?
+const int IT_FUEL                                      =     128;
+// -Wdouble-declaration
+#define IT_SHELLS                                        256
+// -Wdouble-declaration
+#define IT_NAILS                                         512
+// -Wdouble-declaration
+#define IT_ROCKETS                                      1024
+// -Wdouble-declaration
+#define IT_CELLS                                        2048
+const int IT_SUPERWEAPON                               =    4096;
+const int IT_STRENGTH                                  =    8192;
+const int IT_INVINCIBLE                                =   16384;
+const int IT_HEALTH                                    =   32768;
+const int IT_PLASMA                                    =   65536;
+
+// shared value space (union):
+       // for items:
+       // -Wdouble-declaration
+       #define IT_KEY1                                                 131072
+       // -Wdouble-declaration
+       #define IT_KEY2                                                 262144
+// end
+
+const int IT_5HP                               =  524288;
+const int IT_25HP                              = 1048576;
+const int IT_ARMOR_SHARD                       = 2097152;
+const int IT_ARMOR                             = 4194304;
+
+// item masks
+const int IT_AMMO                              =    3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
+const int IT_PICKUPMASK                        =      51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
+const int IT_UNLIMITED_AMMO                    =       3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
+
 #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__)
 /** If you register a new item, make sure to add it to all.inc */
 CLASS(GameItem, Object)
index f411d748a8d5eaeb891ec8eace2d2dd76725695e..a1b2f14037fcc7394325624c56beb7406f5d5041 100644 (file)
@@ -1,5 +1,4 @@
 #include "powerup.qh"
-#include "../../../server/t_items.qh"
 
 #ifndef SVQC
 .int m_itemid;
index ba21ff43d9cac6da7b25050680d06f4baf5fe3df..1daf862b6dec7e0b5aae6e6d30bdc0a60dc6fb67 100644 (file)
@@ -1,5 +1,4 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
     #include "../client/defs.qh"
     #include "util.qh"
     #include "buffs/all.qh"
@@ -7,8 +6,6 @@
     #include "mapinfo.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "util.qh"
     #include "buffs/all.qh"
     #include "monsters/all.qh"
index a073af89757a3562c63a20e7b97196e3a07dd1cc..016e8a3edf1932665942c13930653246934556a9 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef CL_MINIGAMES_H
 #define CL_MINIGAMES_H
 
-#include "../../dpdefs/keycodes.qh"
-
 // Get a square in the center of the avaliable area
 // \note macro to pass by reference pos and mySize
 #define minigame_hud_fitsqare(pos, mySize) \
index cf23639e015b5276ee781229f98e0af1674c9d8a..f7e2e292fbf669f6fed88a2e5677288c4af04fbc 100644 (file)
@@ -1,7 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
     #include "../util.qh"
     #include "all.qh"
     #include "sv_monsters.qh"
index 8b05f781d2e395b44a3893474fdc6788501dd40e..b8bff0201ed961787c85674ddbdfa81efe1d53a7 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
     #include "../../warpzonelib/common.qh"
     #include "../constants.qh"
     #include "../teams.qh"
index cfa6346dc44178904f2003208d28e4a63198bb1e..0fed28f156b30fbf3753fc8aa10a39c2af6f11e6 100644 (file)
@@ -2,7 +2,6 @@
 #include "../physics.qh"
 
 #if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
        #include "../../client/defs.qh"
        #include "../stats.qh"
        #include "../util.qh"
index 90d7ca3ced875e35cc5ba0c1279bd1c4e46f593f..724837b25a2bfcd2f3d7ab1e771da6fa4a94f996 100644 (file)
@@ -1,5 +1,4 @@
 #if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
        #include "../../client/defs.qh"
        #include "all.qh"
        #include "../buffs/all.qh"
@@ -8,7 +7,6 @@
        #include "../../csqcmodellib/cl_model.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
     #include "../constants.qh"
     #include "../../server/constants.qh"
        #include "../turrets/sv_turrets.qh"
index 13097a425f01b65388324e75f4d73a796a6f3d0f..600ddaa1b3237301833480c7ef92cb901333b1a0 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "constants.qh"
     #include "teams.qh"
     #include "../server/autocvars.qh"
index 3a44d71905ec36f071f671f789364f4cfd270c74..0fcbd4259ad82071ad8f198724116ea5d7bcb4f4 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "constants.qh"
     #include "util.qh"
     #include "weapons/all.qh"
index 65deb3963d804c6ce7b9e71e2cc7a4cdc659958b..00695cfa39baffa751ded1f7624e1401c0e1d2b8 100644 (file)
@@ -1,7 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../../dpdefs/progsdefs.qh"
     #include "../../../warpzonelib/util_server.qh"
     #include "../../../server/defs.qh"
 #endif
diff --git a/qcsrc/common/util-post.qh b/qcsrc/common/util-post.qh
deleted file mode 100644 (file)
index f796b6e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef UTIL_POST_H
-#define UTIL_POST_H
-
-[[alias("self")]] entity __self;
-
-// Can't wrap with do-while as block may contain continue or break
-#define WITH(type, name, value, block) { \
-    type __with_save = (name); \
-    name = (value); \
-    LAMBDA(block) \
-    name = __with_save; \
-} do { } while (0)
-
-// Transition from global 'self' to local 'this'
-
-// Step 1: auto oldself
-#if 1
-#define SELFPARAM() noref entity this = __self
-#define setself(s) (__self = s)
-#define self __self
-#endif
-
-// Step 2: check SELFPARAM() is present for functions that use self
-#if 0
-#define SELFPARAM() [[alias("__self")]] noref entity this = __self
-#define setself(s) (__self = s)
-#define self this
-#endif
-
-// Step 3: const self
-#if 0
-#define SELFPARAM() noref const entity this = __self
-entity setself(entity e) { return self = e; }
-entity getself() { return self; }
-#define self getself()
-#endif
-
-// Step 4: enable when possible
-// TODO: Remove SELFPARAM in favor of a parameter
-#if 0
-#define SELFPARAM() noref const entity this = __self
-#define self this
-#endif
-
-#define spawn() new(entity)
-
-#endif
diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh
deleted file mode 100644 (file)
index dfb4071..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef UTIL_PRE_H
-#define UTIL_PRE_H
-
-#ifndef NOCOMPAT
-    #define COMPAT_NO_MOD_IS_XONOTIC
-#endif
-
-#ifndef QCC_SUPPORT_ACCUMULATE
-    #ifdef GMQCC
-        #define QCC_SUPPORT_ACCUMULATE
-    #endif
-#endif
-
-#ifndef QCC_SUPPORT_NIL
-    #ifdef GMQCC
-        #define QCC_SUPPORT_NIL 1
-    #endif
-#endif
-
-#ifndef QCC_SUPPORT_INT
-    #define int float
-
-    #define stoi(s) stof(s)
-    #define stob(s) stof(s)
-    #define itos(i) ftos(i)
-#else
-    #define stoi(s) ((int) stof(s))
-    #define stob(s) ((bool) stof(s))
-    #define itos(i) ftos(i)
-#endif
-
-#define FOREACH_ARRAY(arr, start, end, cond, body) do { \
-    for (int i = start; i < end; ++i) {                 \
-        const noref entity it = arr[i];                 \
-        if (cond) { body }                              \
-    }                                                   \
-} while(0)
-
-#define FOREACH_LIST(list, next, cond, body) do {               \
-    noref int i = 0;                                            \
-    for (entity it = list##_first; it; (it = it.next, ++i)) {   \
-        if (cond) { body }                                      \
-    }                                                           \
-} while(0)
-
-#define FOREACH(list, cond, body) FOREACH_LIST(list, enemy, cond, body)
-
-#ifdef GMQCC
-    #define EVAL(...)           __VA_ARGS__
-
-    #define OVERLOAD_(F, ...)   F##_##__VA_COUNT__(__VA_ARGS__)
-    #define OVERLOAD(F, ...)    F##_##__VA_COUNT__(__VA_ARGS__)
-#else
-    #define EMPTY()
-    #define DEFER(id) id EMPTY()
-
-    #define EVAL(...)  EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
-    #define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
-    #define EVAL2(...) EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
-    #define EVAL3(...) EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
-    #define EVAL4(...) EVAL5(EVAL5(EVAL5(__VA_ARGS__)))
-    #define EVAL5(...) __VA_ARGS__
-
-    #define OVERLOAD___(F,_16,_15,_14,_13,_12,_11,_10,_9,_8,_7,_6,_5,_4,_3,_2,_1,n,...) F##_##n
-    #define OVERLOAD__(F, ...)  OVERLOAD___(F,##__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
-    #define OVERLOAD_(...)      DEFER(OVERLOAD__(__VA_ARGS__))
-    #define OVERLOAD(F, ...)    OVERLOAD_(F,##__VA_ARGS__)(__VA_ARGS__)
-#endif
-
-#define LAMBDA(...) { __VA_ARGS__ ; }
-
-#define MAP(f, ...) EVAL(OVERLOAD(MAP, f, __VA_ARGS__))
-#define MAP_2(f, it) f(it)
-#define MAP_3(f, it, ...) f(it)MAP_2(f, __VA_ARGS__)
-#define MAP_4(f, it, ...) f(it)MAP_3(f, __VA_ARGS__)
-#define MAP_5(f, it, ...) f(it)MAP_4(f, __VA_ARGS__)
-#define MAP_6(f, it, ...) f(it)MAP_5(f, __VA_ARGS__)
-#define MAP_7(f, it, ...) f(it)MAP_6(f, __VA_ARGS__)
-#define MAP_8(f, it, ...) f(it)MAP_7(f, __VA_ARGS__)
-#define MAP_9(f, it, ...) f(it)MAP_8(f, __VA_ARGS__)
-#define MAP_10(f, it, ...) f(it)MAP_9(f, __VA_ARGS__)
-#define MAP_11(f, it, ...) f(it)MAP_10(f, __VA_ARGS__)
-#define MAP_12(f, it, ...) f(it)MAP_11(f, __VA_ARGS__)
-#define MAP_13(f, it, ...) f(it)MAP_12(f, __VA_ARGS__)
-#define MAP_14(f, it, ...) f(it)MAP_13(f, __VA_ARGS__)
-#define MAP_15(f, it, ...) f(it)MAP_14(f, __VA_ARGS__)
-#define MAP_16(f, it, ...) f(it)MAP_15(f, __VA_ARGS__)
-#define MAP_17(f, it, ...) f(it)MAP_16(f, __VA_ARGS__)
-#define MAP_18(f, it, ...) f(it)MAP_17(f, __VA_ARGS__)
-#define MAP_19(f, it, ...) f(it)MAP_18(f, __VA_ARGS__)
-#define MAP_20(f, it, ...) f(it)MAP_19(f, __VA_ARGS__)
-
-#define IDENTITY(it) it
-
-#define UNWORDS(...) MAP(IDENTITY, __VA_ARGS__)
-
-#define APPLY(f, ...) f(__VA_ARGS__)
-
-#ifdef SVQC
-    #define SV(f, ...) f(__VA_ARGS__)
-#else
-    #define SV(f, ...)
-#endif
-
-#ifdef CSQC
-    #define CL(f, ...) f(__VA_ARGS__)
-#else
-    #define CL(f, ...)
-#endif
-
-#define IF(cond, f, ...) cond(f, __VA_ARGS__)
-
-#define GET(name) name##get
-#define GETTER(type, name) type GET(name)() { return name; }
-
-#endif
index c304ed88d4624c3a0c9964c9b233f58f6b3b70af..9c794c0eb3d229c12627efc98d811254d506098e 100644 (file)
@@ -1,7 +1,6 @@
 #include "util.qh"
 
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
     #include "../client/defs.qh"
     #include "constants.qh"
        #include "../client/mutators/events.qh"
@@ -10,8 +9,6 @@
     #include "deathtypes.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "constants.qh"
     #include "../server/autocvars.qh"
     #include "../server/defs.qh"
index ce89bde34e453d392be294d5cf7814db4e622cf4..e992c4ddaa6a2c4b4da2df9900d7ed2182e0a446 100644 (file)
@@ -1,7 +1,6 @@
 #include "util.qh"
 
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
     #include "../client/defs.qh"
     #include "constants.qh"
 #elif defined(MENUQC)
index 2c72d380fcc8db9274203062ce8685de3882fad6..01214331ced4567b9d8cb08eeb80b5e325dea451 100644 (file)
@@ -4,7 +4,6 @@
 #include "all.qh"
 
 #if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
        #include "../../client/defs.qh"
        #include "../constants.qh"
        #include "../stats.qh"
@@ -21,8 +20,6 @@
        #include "../../csqcmodellib/cl_model.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
     #include "../../warpzonelib/anglestransform.qh"
     #include "../../warpzonelib/common.qh"
     #include "../../warpzonelib/util_server.qh"
index d932224e3a8bae0e990604ec19ed47410e05b517..7d1b4e3d262067f491fd6a555f46d1bd1f020769 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
     #include "../util.qh"
     #include "config.qh"
     #include "all.qh"
index ab93b0172370f1998d6fde329b8a5b65fad7ea43..b42f5c4c5460b39dcc06b1865fe302bac17c5ada 100644 (file)
@@ -20,7 +20,6 @@
  * IN THE SOFTWARE.
  */
  #if defined(CSQC)
-        #include "../dpdefs/csprogsdefs.qh"
         #include "../client/defs.qh"
         #include "../common/util.qh"
         #include "../common/animdecide.qh"
index 1a96e23dd6d6c0e1fbe77ff4744e541fa3b4ffbf..7aedd52e6ea85a20083f24b1e3638bc2d7c65ca9 100644 (file)
@@ -21,7 +21,6 @@
  * IN THE SOFTWARE.
  */
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
        #include "../client/defs.qh"
        #include "../common/constants.qh"
        #include "../common/stats.qh"
index 78fb051f793765d0c9f5d884dead2ef9a5bb8bb1..fb1094f72b85dba9fecee256dfb1ef73602484c5 100644 (file)
@@ -20,7 +20,6 @@
  * IN THE SOFTWARE.
  */
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
        #include "../client/defs.qh"
        #include "../warpzonelib/anglestransform.qh"
        #include "../client/autocvars.qh"
index ebe0b6e8765558a76de059fb6eed63f385dfebb3..0fc2ad8b662023a3cf351ee07db4e3cb7790e2e0 100644 (file)
@@ -23,8 +23,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-       #include "../dpdefs/dpextensions.qh"
        #include "../common/constants.qh"
        #include "../common/util.qh"
        #include "../common/animdecide.qh"
index c00c5a12afff460286089191ddc4912ae06c04ea..5addff39ff08d6a767393717d7c57ead02fa6134 100644 (file)
@@ -1,18 +1,48 @@
-#include "bool.qh"
+#ifndef NOCOMPAT
+    #define COMPAT_NO_MOD_IS_XONOTIC
+#endif
+
+#include "compiler.qh"
+
+#ifndef QCC_SUPPORT_INT
+    #define int float
+#endif
+
+#ifndef QCC_SUPPORT_BOOL
+    #define bool float
+#endif
+
+#if defined(CSQC)
+    #include "../dpdefs/csprogsdefs.qh"
+    #include "../dpdefs/keycodes.qh"
+#elif defined(SVQC)
+    #include "../server/sys-pre.qh"
+    #include "../dpdefs/progsdefs.qh"
+    #include "../dpdefs/dpextensions.qh"
+    #include "../server/sys-post.qh"
+#elif defined(MENUQC)
+    #include "../dpdefs/menudefs.qh"
+    #include "../dpdefs/keycodes.qh"
+#endif
 
 #include "../warpzonelib/mathlib.qc"
 
 #include "accumulate.qh"
 #include "bits.qh"
+#include "bool.qh"
 #include "counting.qh"
 #include "cvar.qh"
 #include "defer.qh"
 #include "draw.qh"
 #include "file.qh"
+#include "functional.qh"
 #include "i18n.qh"
+#include "int.qh"
+#include "iter.qh"
 #include "lazy.qh"
 #include "log.qh"
 #include "math.qh"
+#include "misc.qh"
 #include "net.qh"
 #include "nil.qh"
 #include "noise.qc"
@@ -23,8 +53,9 @@
 #include "random.qc"
 #include "registry.qh"
 #include "replicate.qh"
-#include "sort.qh"
+#include "self.qh"
 #include "sortlist.qc"
+#include "sort.qh"
 #include "spawnfunc.qh"
 #include "static.qh"
 #include "string.qh"
index 26169cd199e61328ca0699c3946938a786e7691e..7a719af409ca1aaa49cc602518ab12529341495f 100644 (file)
@@ -2,8 +2,6 @@
 #define BOOL_H
 
 #ifndef QCC_SUPPORT_BOOL
-    #define bool float
-
     // Boolean Constants
     const int true     = 1;
     const int false = 0;
diff --git a/qcsrc/lib/compiler.qh b/qcsrc/lib/compiler.qh
new file mode 100644 (file)
index 0000000..69aad5c
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef COMPILER_H
+#define COMPILER_H
+
+#ifndef QCC_SUPPORT_ACCUMULATE
+    #ifdef GMQCC
+        #define QCC_SUPPORT_ACCUMULATE
+    #endif
+#endif
+
+#ifndef QCC_SUPPORT_NIL
+    #ifdef GMQCC
+        #define QCC_SUPPORT_NIL
+    #endif
+#endif
+
+#endif
index 2a13611168fd806382b42b069897591d6582b1f0..6c495663452c2a0dffe4bf001b450c2c8a01498f 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef MENUQC
 #ifndef DEFER_H
 #define DEFER_H
+
 #include "oo.qh"
+#include "self.qh"
 
 entityclass(Defer);
 class(Defer) .entity owner;
diff --git a/qcsrc/lib/functional.qh b/qcsrc/lib/functional.qh
new file mode 100644 (file)
index 0000000..2bbe7d5
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef FUNCTIONAL_H
+#define FUNCTIONAL_H
+
+#define MAP(f, ...) EVAL(OVERLOAD(MAP, f, __VA_ARGS__))
+#define MAP_2(f, it) f(it)
+#define MAP_3(f, it, ...) f(it)MAP_2(f, __VA_ARGS__)
+#define MAP_4(f, it, ...) f(it)MAP_3(f, __VA_ARGS__)
+#define MAP_5(f, it, ...) f(it)MAP_4(f, __VA_ARGS__)
+#define MAP_6(f, it, ...) f(it)MAP_5(f, __VA_ARGS__)
+#define MAP_7(f, it, ...) f(it)MAP_6(f, __VA_ARGS__)
+#define MAP_8(f, it, ...) f(it)MAP_7(f, __VA_ARGS__)
+#define MAP_9(f, it, ...) f(it)MAP_8(f, __VA_ARGS__)
+#define MAP_10(f, it, ...) f(it)MAP_9(f, __VA_ARGS__)
+#define MAP_11(f, it, ...) f(it)MAP_10(f, __VA_ARGS__)
+#define MAP_12(f, it, ...) f(it)MAP_11(f, __VA_ARGS__)
+#define MAP_13(f, it, ...) f(it)MAP_12(f, __VA_ARGS__)
+#define MAP_14(f, it, ...) f(it)MAP_13(f, __VA_ARGS__)
+#define MAP_15(f, it, ...) f(it)MAP_14(f, __VA_ARGS__)
+#define MAP_16(f, it, ...) f(it)MAP_15(f, __VA_ARGS__)
+#define MAP_17(f, it, ...) f(it)MAP_16(f, __VA_ARGS__)
+#define MAP_18(f, it, ...) f(it)MAP_17(f, __VA_ARGS__)
+#define MAP_19(f, it, ...) f(it)MAP_18(f, __VA_ARGS__)
+#define MAP_20(f, it, ...) f(it)MAP_19(f, __VA_ARGS__)
+
+#define IDENTITY(it) it
+
+#define UNWORDS(...) MAP(IDENTITY, __VA_ARGS__)
+
+#define APPLY(f, ...) f(__VA_ARGS__)
+
+#ifdef SVQC
+    #define SV(f, ...) f(__VA_ARGS__)
+#else
+    #define SV(f, ...)
+#endif
+
+#ifdef CSQC
+    #define CL(f, ...) f(__VA_ARGS__)
+#else
+    #define CL(f, ...)
+#endif
+
+#define IF(cond, f, ...) cond(f, __VA_ARGS__)
+
+#endif
diff --git a/qcsrc/lib/int.qh b/qcsrc/lib/int.qh
new file mode 100644 (file)
index 0000000..d9ea61f
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef INT_H
+#define INT_H
+
+#ifndef QCC_SUPPORT_INT
+    #define stoi(s) stof(s)
+    #define stob(s) stof(s)
+    #define itos(i) ftos(i)
+#else
+    #define stoi(s) ((int) stof(s))
+    #define stob(s) ((bool) stof(s))
+    #define itos(i) ftos(i)
+#endif
+
+#endif
diff --git a/qcsrc/lib/iter.qh b/qcsrc/lib/iter.qh
new file mode 100644 (file)
index 0000000..53b3d66
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef ITER_H
+#define ITER_H
+
+#define FOREACH_ARRAY(arr, start, end, cond, body) do { \
+    for (int i = start; i < end; ++i) {                 \
+        const noref entity it = arr[i];                 \
+        if (cond) { body }                              \
+    }                                                   \
+} while(0)
+
+#define FOREACH_LIST(list, next, cond, body) do {               \
+    noref int i = 0;                                            \
+    for (entity it = list##_first; it; (it = it.next, ++i)) {   \
+        if (cond) { body }                                      \
+    }                                                           \
+} while(0)
+
+#define FOREACH(list, cond, body) FOREACH_LIST(list, enemy, cond, body)
+
+#endif
diff --git a/qcsrc/lib/misc.qh b/qcsrc/lib/misc.qh
new file mode 100644 (file)
index 0000000..8a6e117
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef MISC_H
+#define MISC_H
+
+#ifdef GMQCC
+    #define EVAL(...)           __VA_ARGS__
+
+    #define OVERLOAD_(F, ...)   F##_##__VA_COUNT__(__VA_ARGS__)
+    #define OVERLOAD(F, ...)    F##_##__VA_COUNT__(__VA_ARGS__)
+#else
+    #define EMPTY()
+    #define DEFER(id) id EMPTY()
+
+    #define EVAL(...)  EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
+    #define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
+    #define EVAL2(...) EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
+    #define EVAL3(...) EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
+    #define EVAL4(...) EVAL5(EVAL5(EVAL5(__VA_ARGS__)))
+    #define EVAL5(...) __VA_ARGS__
+
+    #define OVERLOAD___(F,_16,_15,_14,_13,_12,_11,_10,_9,_8,_7,_6,_5,_4,_3,_2,_1,n,...) F##_##n
+    #define OVERLOAD__(F, ...)  OVERLOAD___(F,##__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
+    #define OVERLOAD_(...)      DEFER(OVERLOAD__(__VA_ARGS__))
+    #define OVERLOAD(F, ...)    OVERLOAD_(F,##__VA_ARGS__)(__VA_ARGS__)
+#endif
+
+#define GET(name) name##get
+#define GETTER(type, name) type GET(name)() { return name; }
+
+#define LAMBDA(...) { __VA_ARGS__ ; }
+
+// Can't wrap with do-while as block may contain continue or break
+#define WITH(type, name, value, block) { \
+    type __with_save = (name); \
+    name = (value); \
+    LAMBDA(block) \
+    name = __with_save; \
+} do { } while (0)
+
+#endif
index 789b1f9c0f530163c030d95437e993df9c39a9ae..87e3aea5e545a9a09d6c6c5136915ab3c509bc24 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef NIL_H
 #define NIL_H
 
-#if QCC_SUPPORT_NIL
+#ifdef QCC_SUPPORT_NIL
 #define func_null nil
 #define string_null nil
 #else
index fce18cbfddac268702fdedfe33eeab5129f5b111..0615282c3e1a7f7031aa1571eb8e51f5d9ce8e53 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef OO_H
 #define OO_H
 
+#include "misc.qh"
 #include "nil.qh"
 
 #ifdef MENUQC
@@ -35,6 +36,7 @@ entity __spawn(string _classname, string _sourceFile, int _sourceLine) {
     #define class(name) [[class(name)]]
     #define new(class) ((class) __spawn(#class, __FILE__, __LINE__))
 #endif
+#define spawn() new(entity)
 
 // Classes have a `spawn##cname(entity)` constructor
 // The parameter is used across [[accumulate]] functions
diff --git a/qcsrc/lib/self.qh b/qcsrc/lib/self.qh
new file mode 100644 (file)
index 0000000..eac0c64
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef SELF_H
+#define SELF_H
+
+// Transition from global 'self' to local 'this'
+
+[[alias("self")]] entity __self;
+
+// Step 1: auto oldself
+#if 1
+#define SELFPARAM() noref entity this = __self
+#define setself(s) (__self = s)
+#define self __self
+#endif
+
+// Step 2: check SELFPARAM() is present for functions that use self
+#if 0
+#define SELFPARAM() [[alias("__self")]] noref entity this = __self
+#define setself(s) (__self = s)
+#define self this
+#endif
+
+// Step 3: const self
+#if 0
+#define SELFPARAM() noref const entity this = __self
+entity setself(entity e) { return self = e; }
+entity getself() { return self; }
+#define self getself()
+#endif
+
+// Step 4: enable when possible
+// TODO: Remove SELFPARAM in favor of a parameter
+#if 0
+#define SELFPARAM() noref const entity this = __self
+#define self this
+#endif
+
+#endif
index d1f5357a5ef39bb5c8bddde4a8a4671b64c07c4d..edc2f5bf37ff959f3b6fe6375d29923b5f9b086b 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef TEST_H
 #define TEST_H
 
-#include "../common/util.qh"
-
 #define TEST_Check(cond) do { if(!(cond)) TEST_Fail(#cond); } while(0)
 
 void TEST_OK();
index 6f196785177dc6e1617cdf5b09d2c7b5e6a80ee6..e4b8a8f27312f5d096817262abb6e1908363a057 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef URLLIB_H
 #define URLLIB_H
 
-#include "../common/util.qh"
-
 // URI handles
 const int URI_GET_DISCARD = 0;
 const int URI_GET_IPBAN = 1;
index a6903ae3dc48dc3f293eef0327d89772455b9e68..7834cdb842f50b94ac5adf9527b750e31f5ab41b 100644 (file)
@@ -1,7 +1,4 @@
 #ifndef CLIENT_ALL_H
 #define CLIENT_ALL_H
 
-#include "../dpdefs/menudefs.qh"
-#include "../dpdefs/keycodes.qh"
-
 #endif
index 5563b969d98bfb4751e29e661b2c97a6c5248c45..d24220fefae0ab9fe4695d8287fcc21c1a2a7bcd 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef ANIM_ANIMATION_H
 #define ANIM_ANIMATION_H
-#include "../oo/base.qh"
 void setterDummy(entity, float);
 CLASS(Animation, Object)
        METHOD(Animation, configureAnimation, void(entity, entity, void(entity, float), float, float, float, float));
index 4489de3d5a4f6b0e04fac1038097f33631289fbe..55ca901dc50f83378c2697df3010f2cb4d4f75fc 100644 (file)
@@ -2,7 +2,6 @@
 
 #ifndef ANIM_ANIMHOST_H
 #define ANIM_ANIMHOST_H
-#include "../oo/base.qh"
 CLASS(AnimHost, Object)
        METHOD(AnimHost, addAnim, void(entity, entity));
        METHOD(AnimHost, removeAnim, void(entity, entity));
index 8788f2e84d7ec81bb766d332e0f495b843b25132..fa6161a9779337d7587799b4d99f54693a6f0944 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef ITEM_H
 #define ITEM_H
 #include "skin.qh"
-#include "oo/base.qh"
 CLASS(Item, Object)
        METHOD(Item, draw, void(entity));
        METHOD(Item, keyDown, float(entity, float, float, float));
index 0ece40c88e4fe78f5d0c9bb14fec958fabb2ebf7..6d45ca82f46a36b7f4e64f449275ec36f895a829 100644 (file)
@@ -4,8 +4,6 @@
 #include "draw.qh"
 #include "skin.qh"
 
-#include "oo/base.qh"
-
 #include "xonotic/util.qh"
 
 #include "../common/constants.qh"
diff --git a/qcsrc/menu/oo/base.qh b/qcsrc/menu/oo/base.qh
deleted file mode 100644 (file)
index 894b4b9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef BASE_H
-#define BASE_H
-
-#include "../../common/util.qh"
-#include "../../dpdefs/keycodes.qh"
-
-#define world NULL
-
-#endif
index 4a14eea7b1d12652fbb27b73dd706e11950851c0..16a830da048af49cdf18a659a9d7f367b7e9c7fd 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef CLASSES_H
 #define CLASSES_H
-#include "base.qh"
 
 #include "../classes.inc"
 #define IMPLEMENTATION
index ba7411bb697b4297a12420f7049d3e1b9db30d9d..ae221de272b18dae865438e36afdfef9786ce0b9 100644 (file)
@@ -1,10 +1,7 @@
-#include "../common/util-pre.qh"
-#include "../dpdefs/menudefs.qh"
-#include "../dpdefs/keycodes.qh"
-#include "../common/util-post.qh"
-
 #include "../lib/_all.inc"
 
+#define world NULL
+
 #include "oo/classes.qc"
 
 #include "draw.qc"
index f4faea62b92a3623530aa684f63a54fb58445590..3ef0213966933ea073240aac8d4f75a5786a5b3a 100644 (file)
@@ -1,6 +1,5 @@
 #include "util.qh"
 #include "../menu.qh"
-#include "../oo/base.qh"
 #include "../../common/campaign_common.qh"
 #include "../../common/constants.qh"
 #include "../../common/mapinfo.qh"
index 3e99cabeb85d6e1bc37b1b44cc7785fb8167cfde..dd3b1aaafb56efe377d21cd3d187328ccec1fdc4 100644 (file)
@@ -6,8 +6,6 @@
 #include "defs.qh"
 #include "miscfunctions.qh"
 
-#include "../dpdefs/progsdefs.qh"
-#include "../dpdefs/dpextensions.qh"
 
 #include "../common/models/all.qh"
 #include "../common/sounds/all.qh"
index 32742d82d9555e41330fa559acbee64314a1b7f3..61bb611fdc01cda06692cb77e537f35d46a92326 100644 (file)
@@ -5,8 +5,6 @@
 #include "defs.qh"
 #include "miscfunctions.qh"
 
-#include "../dpdefs/progsdefs.qh"
-#include "../dpdefs/dpextensions.qh"
 
 
 #include "command/common.qh"
index f152c8216d93f8575ffe121dd04c3ad5701e19f5..64db8da8f0ce1beb759bf4250ae657fba1c52310 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "../common/vehicles/all.qh"
     #include "antilag.qh"
 #endif
diff --git a/qcsrc/server/bot/_all.inc b/qcsrc/server/bot/_all.inc
new file mode 100644 (file)
index 0000000..2965baa
--- /dev/null
@@ -0,0 +1,7 @@
+#include "aim.qc"
+#include "bot.qc"
+#include "navigation.qc"
+#include "scripting.qc"
+#include "waypoints.qc"
+
+#include "havocbot/_all.inc"
index 00051cadb9cbdeee1b806ac9a7f8ec104a97f4ff..c033daeecebead6955d18eabdddb2ae2b108e7a9 100644 (file)
@@ -31,9 +31,6 @@
 
 #include "../../csqcmodellib/sv_model.qh"
 
-#include "../../dpdefs/dpextensions.qh"
-#include "../../dpdefs/progsdefs.qh"
-
 #include "../../warpzonelib/common.qh"
 #include "../../warpzonelib/util_server.qh"
 
diff --git a/qcsrc/server/bot/havocbot/_all.inc b/qcsrc/server/bot/havocbot/_all.inc
new file mode 100644 (file)
index 0000000..fb73954
--- /dev/null
@@ -0,0 +1,3 @@
+#include "havocbot.qc"
+#include "role_keyhunt.qc"
+#include "roles.qc"
index 4ebe76b401fb0321724f6ed7b755d37d9da36e07..a26fa97aa8da334189dbc6c4e79e97416da6780c 100644 (file)
@@ -1,7 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
     #include "../common/constants.qh"
 #endif
 
index e7430690e4be3f157c9cfeca32b77a07cec285eb..6e0f5b5791113228f4ac4c5b99b4dd8a1656daf9 100644 (file)
@@ -4,8 +4,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "../warpzonelib/common.qh"
     #include "../common/constants.qh"
     #include "../common/teams.qh"
index 781ecc612e7d3f2f968e524c954d6a766022b716..20020261c0c095b7c4df3bf9c5f4a511fe4958ad 100644 (file)
@@ -2,7 +2,12 @@
 
 #include "../common/triggers/subs.qh"
 
-#include "../client/bgmscript.qh"
+entityclass(BGMScript);
+class(BGMScript) .string bgmscript;
+class(BGMScript) .float bgmscriptattack;
+class(BGMScript) .float bgmscriptdecay;
+class(BGMScript) .float bgmscriptsustain;
+class(BGMScript) .float bgmscriptrelease;
 
 #include "../common/constants.qh"
 #include "../csqcmodellib/sv_model.qh"
index 5bf648a0b5995b7269e7e10ceb09af334088ba44..f185d4aef525811dfbb2e88994490dc3c08f307d 100644 (file)
@@ -6,8 +6,6 @@
 #include "defs.qh"
 #include "../common/constants.qh"
 #include "../common/util.qh"
-#include "../dpdefs/dpextensions.qh"
-#include "../dpdefs/progsdefs.qh"
 
 /*
  * Protocol of online ban list:
index 0c63015320dc2c2d0b217a8c7aad403cf3ce4f48..de32a174e1d89924fd051e6339ab34f7f2e170d1 100644 (file)
@@ -1,7 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
     #include "mutators_include.qh"
     #include "../../common/mapinfo.qh"
 #endif
index 8564d34c59cb2a0b06e31df6bc93a78dd84f0d69..e948ab688210a66a6b5eb4eec3ce43a70798ffaa 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
     #include "../../warpzonelib/anglestransform.qh"
     #include "../../warpzonelib/common.qh"
     #include "../../warpzonelib/util_server.qh"
diff --git a/qcsrc/server/pathlib/_all.inc b/qcsrc/server/pathlib/_all.inc
new file mode 100644 (file)
index 0000000..8622734
--- /dev/null
@@ -0,0 +1,6 @@
+#include "costs.qc"
+#include "expandnode.qc"
+#include "main.qc"
+#include "movenode.qc"
+#include "path_waypoint.qc"
+#include "utility.qc"
index b21ed2ea37ef988c03ca9363462ad38738ee84b2..082356ae2d86084f2b8ad8d6ffe624f9e9a43936 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "defs.qh"
     #include "playerdemo.qh"
 #endif
index adb8cf6323d643006c4c832e44ef7886c782b374..d8eda4986ebfcd6b90a342169d313209c3168b38 100644 (file)
@@ -1,10 +1,3 @@
-#include "../common/util-pre.qh"
-#include "sys-pre.qh"
-#include "../dpdefs/progsdefs.qh"
-#include "../dpdefs/dpextensions.qh"
-#include "sys-post.qh"
-#include "../common/util-post.qh"
-
 #include "../lib/_all.inc"
 
 #include "anticheat.qc"
 #include "t_quake3.qc"
 #include "t_quake.qc"
 
-#include "bot/aim.qc"
-#include "bot/bot.qc"
-#include "bot/navigation.qc"
-#include "bot/scripting.qc"
-#include "bot/waypoints.qc"
-
-#include "bot/havocbot/havocbot.qc"
-#include "bot/havocbot/role_keyhunt.qc"
-#include "bot/havocbot/roles.qc"
+#include "bot/_all.inc"
 
 #include "command/all.qc"
 
 #include "mutators/mutators_include.qc"
 #include "mutators/mutators.qc"
 
-#include "pathlib/costs.qc"
-#include "pathlib/expandnode.qc"
-#include "pathlib/main.qc"
-#include "pathlib/movenode.qc"
-#include "pathlib/path_waypoint.qc"
-#include "pathlib/utility.qc"
+#include "pathlib/_all.inc"
 
 #include "weapons/accuracy.qc"
 #include "weapons/common.qc"
index fbf84da32be0b06fb2a16d0ae2f790bdc5fcb9da..4941b5521b7122b5ef534f7371e011291eb827a4 100644 (file)
@@ -1,8 +1,6 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
 #endif
 
 /**
index dd79b1788f2b14fbf451b5b4ee01f16d1f2ea3c6..81554c4c2ff4f7f326806c3e2afad91411de6efa 100644 (file)
@@ -1,47 +1,6 @@
 #ifndef T_ITEMS_H
 #define T_ITEMS_H
 
-// constants
-const int IT_UNLIMITED_WEAPON_AMMO             =       1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
-const int IT_UNLIMITED_SUPERWEAPONS            =       2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
-const int IT_CTF_SHIELDED                      =       4; // set for the flag shield
-const int IT_USING_JETPACK                     =       8; // confirmation that button is pressed
-const int IT_JETPACK                           =      16; // actual item
-const int IT_FUEL_REGEN                        =      32; // fuel regeneration trigger
-// where is 64... ?
-const int IT_FUEL                                      =     128;
-// -Wdouble-declaration
-#define IT_SHELLS                                        256
-// -Wdouble-declaration
-#define IT_NAILS                                         512
-// -Wdouble-declaration
-#define IT_ROCKETS                                      1024
-// -Wdouble-declaration
-#define IT_CELLS                                        2048
-const int IT_SUPERWEAPON                               =    4096;
-const int IT_STRENGTH                                  =    8192;
-const int IT_INVINCIBLE                                =   16384;
-const int IT_HEALTH                                    =   32768;
-const int IT_PLASMA                                    =   65536;
-
-// shared value space (union):
-       // for items:
-       // -Wdouble-declaration
-       #define IT_KEY1                                                 131072
-       // -Wdouble-declaration
-       #define IT_KEY2                                                 262144
-// end
-
-const int IT_5HP                               =  524288;
-const int IT_25HP                              = 1048576;
-const int IT_ARMOR_SHARD                       = 2097152;
-const int IT_ARMOR                             = 4194304;
-
-// item masks
-const int IT_AMMO                              =    3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
-const int IT_PICKUPMASK                        =      51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
-const int IT_UNLIMITED_AMMO                    =       3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
-
 const int AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
 
 // item networking
index e4f387861da3b0bbaae25215c95c29e4c3656ba8..e31476f52257ab75a85ff2703c5adcb65e3fd9fb 100755 (executable)
@@ -4,30 +4,35 @@ cd "$(dirname "$0")"
 cd ..
 
 declare -a NOWARN=(
-  '-Wno-field-redeclared'
-  '-Wno-unused-variable'
-  '-Wno-implicit-function-pointer'
+  -Wno-field-redeclared
+  -Wno-unused-variable
+  -Wno-implicit-function-pointer
 )
 declare -a FEATURES=(
-  '-DVEHICLES_ENABLED=1'
-  '-DVEHICLES_USE_ODE=0'
+  -DVEHICLES_ENABLED=1
+  -DVEHICLES_USE_ODE=0
 )
 declare QCC=../../../gmqcc/gmqcc
 
+declare -a QCC_FLAGS=(
+  -std=gmqcc
+  -Wall -Werror
+  -fftepp -fftepp-predefs -Wcpp
+  -futf8
+  -freturn-assignments
+  -frelaxed-switch
+  -O3
+)
+
 function check() {
-  declare -l base="$1"
-  declare -la predefs=("${!2}")
-  find "$base" -type f -name '*.qc' -print0 | sort -z | while IFS= read -r -d '' file; do
+  declare -l base="${1}"
+  declare -la predefs=("-D${2}" "lib/_all.inc")
+  find "$base" -type f -name '*.qc' -print0 | sort -z | while read -r -d '' file; do
     echo "$file"
-    ${QCC} -std=gmqcc -fftepp -fftepp-predefs -Werror -Wall "${NOWARN[@]}" "${FEATURES[@]}" -futf8 -O3 "${predefs[@]}" "$file" >/dev/null
+    ${QCC} "${QCC_FLAGS[@]}" "${NOWARN[@]}" "${FEATURES[@]}" "${predefs[@]}" "$file" >/dev/null
   done
 }
 
-clientdefs=("-DCSQC" "common/util-pre.qh" "dpdefs/csprogsdefs.qh")
-check "client" clientdefs[@]
-
-serverdefs=("-DSVQC" "common/util-pre.qh" "server/sys-pre.qh" "dpdefs/progsdefs.qh" "dpdefs/dpextensions.qh" "server/sys-post.qh" "server/defs.qh" "server/autocvars.qh")
-check "server" serverdefs[@]
-
-menudefs=("-DMENUQC" "common/util-pre.qh" "dpdefs/menudefs.qh")
-check "menu" menudefs[@]
+check client CSQC
+check server SVQC
+check menu MENUQC
index 079ceaa7d1a5577a4e5326b873da4788842430b0..f92947f5bfc9ac1ed24371fa276ec815d42f3ee3 100644 (file)
@@ -1,11 +1,8 @@
 #include "anglestransform.qh"
 
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
 #endif
 
 #ifdef POSITIVE_PITCH_IS_DOWN
index 85fbdd933e6e2453447d1b144f2663d92bc4a598..68c2984dbeb4d49c0daac01e7534895645dbd657 100644 (file)
@@ -4,7 +4,6 @@
 #if defined(CSQC)
        #include "../client/autocvars.qh"
        #include "../csqcmodellib/cl_model.qh"
-       #include "../dpdefs/csprogsdefs.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index 0eaaac980c69a3e70cf0ba8974994741776f8507..044b4d8643f8f19113b06fea42d828c5bb1216d8 100644 (file)
@@ -1,13 +1,10 @@
 #include "common.qh"
 
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
     #include "../server/t_items.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
     #include "../common/weapons/all.qh"
-    #include "../dpdefs/dpextensions.qh"
-       #include "../dpdefs/progsdefs.qh"
 #endif
 
 void WarpZone_Accumulator_Clear(entity acc)
index f61712d2322dc8436b7bd0675ee1a32103f87ba1..92b7ee14dd9080d2fac9d17527042f929cbe3433 100644 (file)
@@ -1,10 +1,7 @@
 #include "mathlib.qh"
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../dpdefs/dpextensions.qh"
-       #include "../dpdefs/progsdefs.qh"
 #endif
 
 int fpclassify(float x)
index d34870ec0110f5a953320a4fcbb5256d3735c82e..033594d2ef8de8f7b9d07e4f624c06f79b3282e5 100644 (file)
@@ -7,8 +7,6 @@
        #include "../common/constants.qh"
        #include "../common/triggers/subs.qh"
        #include "../common/util.qh"
-       #include "../dpdefs/dpextensions.qh"
-       #include "../dpdefs/progsdefs.qh"
        #include "../server/command/common.qh"
        #include "../server/constants.qh"
        #include "../server/defs.qh"
index 0b983c299c8cac5b05c69ec72ad58878137aa77d..61c063667a9fa97fccbbb84355258b25827e8ba7 100644 (file)
@@ -6,8 +6,6 @@
 #elif defined(MENUQC)
 #elif defined(SVQC)
     #include "../csqcmodellib/sv_model.qh"
-    #include "../dpdefs/dpextensions.qh"
-       #include "../dpdefs/progsdefs.qh"
 #endif
 #include "common.qh"