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 1708452..2a69b37 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 45afb51..f65a9c2 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 ceaae8a..c3f2af0 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 5d864b1..f03e9dc 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 bbf9ec9..c36f033 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 074a070..b71355f 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 6ccb591..2d92f5d 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 f60bb99..7e5e104 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 ad40da4..ecd6bc5 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>