From: Mario Date: Sat, 1 Aug 2020 23:19:25 +0000 (+1000) Subject: Remove the engine STATE_ definitions so they can be redefined as common code X-Git-Tag: xonotic-v0.8.5~807 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9c9254d904b50c3337fa03d065df279ee3e6a738;p=xonotic%2Fxonotic-data.pk3dir.git Remove the engine STATE_ definitions so they can be redefined as common code --- diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 170845298..2a69b37c1 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -2,6 +2,8 @@ #include "sv_controlpoint.qh" #include "sv_generator.qh" +#include + bool g_onslaught; float autocvar_g_onslaught_teleport_wait; diff --git a/qcsrc/common/mapobjects/defs.qh b/qcsrc/common/mapobjects/defs.qh index 45afb51f9..f65a9c22b 100644 --- a/qcsrc/common/mapobjects/defs.qh +++ b/qcsrc/common/mapobjects/defs.qh @@ -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 diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index ceaae8ad5..c3f2af089 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -1,6 +1,7 @@ #include "sv_turrets.qh" #ifdef SVQC #include +#include // Generic aiming vector turret_aim_generic(entity this) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 5d864b1b5..f03e9dc6b 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1,5 +1,7 @@ #include "sv_vehicles.qh" +#include + bool SendAuxiliaryXhair(entity this, entity to, int sf) { WriteHeader(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index bbf9ec9fa..c36f033c9 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 074a070e9..b71355f68 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -22,6 +22,7 @@ #include "weapons/selection.qh" #include "../common/constants.qh" #include "../common/deathtypes/all.qh" +#include #include "../common/notifications/all.qh" #include "../common/physics/movetypes/movetypes.qh" #include "../common/playerstats.qh" diff --git a/qcsrc/server/sys-post.qh b/qcsrc/server/sys-post.qh index 6ccb5918c..2d92f5dfe 100644 --- a/qcsrc/server/sys-post.qh +++ b/qcsrc/server/sys-post.qh @@ -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 diff --git a/qcsrc/server/sys-pre.qh b/qcsrc/server/sys-pre.qh index f60bb9984..7e5e10421 100644 --- a/qcsrc/server/sys-pre.qh +++ b/qcsrc/server/sys-pre.qh @@ -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 diff --git a/qcsrc/server/tests.qh b/qcsrc/server/tests.qh index ad40da4dd..ecd6bc57a 100644 --- a/qcsrc/server/tests.qh +++ b/qcsrc/server/tests.qh @@ -8,6 +8,7 @@ #include "weapons/common.qh" #include "weapons/selection.qh" #include +#include #include #include #include