]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove the engine STATE_ definitions so they can be redefined as common code
authorMario <mario.mario@y7mail.com>
Sat, 1 Aug 2020 23:19:25 +0000 (09:19 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 1 Aug 2020 23:19:25 +0000 (09:19 +1000)
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/mapobjects/defs.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/sys-post.qh
qcsrc/server/sys-pre.qh
qcsrc/server/tests.qh

index 170845298ff1eb1e4a8891c5073d9c7a97d092bf..2a69b37c1f0002eddbb613067efc374beda155e6 100644 (file)
@@ -2,6 +2,8 @@
 #include "sv_controlpoint.qh"
 #include "sv_generator.qh"
 
+#include <common/mapobjects/defs.qh>
+
 bool g_onslaught;
 
 float autocvar_g_onslaught_teleport_wait;
index 45afb51f9ac98ad5806f5ae41ed4ff9360c02596..f65a9c22bce63ddaebc03bdcc5c3584f539592aa 100644 (file)
@@ -26,8 +26,6 @@ const int SF_TRIGGER_RESET = BIT(2);
 //----------------
 // STATES & ACTIVE
 //----------------
-#ifdef CSQC
-// this stuff is defined in the server side engine VM, so we must define it separately here
 const int STATE_TOP = 0;
 const int STATE_BOTTOM = 1;
 const int STATE_UP = 2;
@@ -38,4 +36,3 @@ const int ACTIVE_ACTIVE = 1;
 const int ACTIVE_IDLE = 2;
 const int ACTIVE_BUSY = 2;
 const int ACTIVE_TOGGLE = 3;
-#endif
index ceaae8ad5c58c45e79f5089f29365ae5e0a20052..c3f2af089a667f0a6abfb6db6bee33396f4aec86 100644 (file)
@@ -1,6 +1,7 @@
 #include "sv_turrets.qh"
 #ifdef SVQC
 #include <server/autocvars.qh>
+#include <common/mapobjects/defs.qh>
 
 // Generic aiming
 vector turret_aim_generic(entity this)
index 5d864b1b5382c7dfd6ce0d8e0ec428f6e7a47ec0..f03e9dc6b4334b8f2fce53e3ffe4e83e49508cf8 100644 (file)
@@ -1,5 +1,7 @@
 #include "sv_vehicles.qh"
 
+#include <common/mapobjects/defs.qh>
+
 bool SendAuxiliaryXhair(entity this, entity to, int sf)
 {
        WriteHeader(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR);
index bbf9ec9fa43c2610b7f537f71b9424978d019f14..c36f033c91eb0847c5faa2c360b753ec052347db 100644 (file)
@@ -318,11 +318,6 @@ const int FROZEN_NORMAL                            = 1;
 const int FROZEN_TEMP_REVIVING         = 2;
 const int FROZEN_TEMP_DYING                    = 3;
 
-const int ACTIVE_NOT           = 0;
-const int ACTIVE_ACTIVE        = 1;
-const int ACTIVE_IDLE          = 2;
-const int ACTIVE_BUSY          = 2;
-const int ACTIVE_TOGGLE        = 3;
 .int active;
 .void (entity this, int act_state) setactive;
 .entity realowner;
index 074a070e9f6f2bd675f628b764edf787b01016ba..b71355f687a3a671500d0480071e4cea5ad5acf9 100644 (file)
@@ -22,6 +22,7 @@
 #include "weapons/selection.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes/all.qh"
+#include <common/mapobjects/defs.qh>
 #include "../common/notifications/all.qh"
 #include "../common/physics/movetypes/movetypes.qh"
 #include "../common/playerstats.qh"
index 6ccb5918caa6990f1dd999036fdc97e22beabaff..2d92f5dfea934572b5809160f7d5e3bdfb5a4d81 100644 (file)
@@ -29,4 +29,9 @@ var void delete_fn(entity e);
 #undef IT_SUIT
 #undef IT_QUAD
 
+#undef STATE_TOP
+#undef STATE_BOTTOM
+#undef STATE_UP
+#undef STATE_DOWN
+
 #pragma noref 0
index f60bb9984d408490a3e52d3dbb32656b90baa835..7e5e10421ac263729bf926a036c0555018eaa5ef 100644 (file)
@@ -27,4 +27,9 @@
 #define IT_SUIT             _IT_SUIT /* BIT(21) */
 #define IT_QUAD             _IT_QUAD /* BIT(22) */
 
+#define STATE_TOP           _STATE_TOP /* 0 */
+#define STATE_BOTTOM        _STATE_BOTTOM /* 1 */
+#define STATE_UP            _STATE_UP /* 2 */
+#define STATE_DOWN          _STATE_DOWN /* 3 */
+
 #pragma noref 1
index ad40da4dd99c8533527c8454cfdc593875a94f7b..ecd6bc57a717ebad684510da84c300ae9cc18029 100644 (file)
@@ -8,6 +8,7 @@
 #include "weapons/common.qh"
 #include "weapons/selection.qh"
 #include <common/items/item.qh>
+#include <common/mapobjects/defs.qh>
 #include <common/physics/player.qh>
 #include <common/weapons/_all.qh>
 #include <common/vehicles/all.qh>