From: Mario Date: Mon, 3 Aug 2020 13:03:13 +0000 (+1000) Subject: Purge server/constants.qh X-Git-Tag: xonotic-v0.8.5~786 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4115f971d5c8a3902d895f60966d08a1d700f6ff;p=xonotic%2Fxonotic-data.pk3dir.git Purge server/constants.qh --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d54dea8f7..d7dc3996f 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -45,8 +45,6 @@ #include #include -#define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT) - float autocvar_cl_viewmodel_scale; float autocvar_cl_viewmodel_alpha = 1; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 5d9805e2a..344eec48c 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -1,5 +1,30 @@ #pragma once +const int FRAGS_PLAYER = 0; +const int FRAGS_SPECTATOR = -666; +const int FRAGS_PLAYER_OUT_OF_GAME = -616; + +/////////////////////////// +// cvar constants + +const int CVAR_SAVE = 1; +const int CVAR_NOTIFY = 2; +const int CVAR_READONLY = 4; + +// server flags +const int SERVERFLAG_ALLOW_FULLBRIGHT = 1; +const int SERVERFLAG_TEAMPLAY = 2; +const int SERVERFLAG_PLAYERSTATS = 4; + +const int SPECIES_HUMAN = 0; +const int SPECIES_ROBOT_SOLID = 1; +const int SPECIES_ALIEN = 2; +const int SPECIES_ANIMAL = 3; +const int SPECIES_ROBOT_RUSTY = 4; +const int SPECIES_ROBOT_SHINY = 5; +const int SPECIES_RESERVED = 15; + +#ifdef GAMEQC const int RANKINGS_CNT = 99; /////////////////////////// @@ -13,13 +38,6 @@ const int KEY_CROUCH = BIT(5); const int KEY_ATCK = BIT(6); const int KEY_ATCK2 = BIT(7); -/////////////////////////// -// cvar constants - -const int CVAR_SAVE = 1; -const int CVAR_NOTIFY = 2; -const int CVAR_READONLY = 4; - /////////////////////////// // csqc communication stuff @@ -30,23 +48,6 @@ const int HUD_BUMBLEBEE_GUN = 25; // # of maps, I'll use arrays for them :P const int MAPVOTE_COUNT = 30; -const int SPECIES_HUMAN = 0; -const int SPECIES_ROBOT_SOLID = 1; -const int SPECIES_ALIEN = 2; -const int SPECIES_ANIMAL = 3; -const int SPECIES_ROBOT_RUSTY = 4; -const int SPECIES_ROBOT_SHINY = 5; -const int SPECIES_RESERVED = 15; - -const int FRAGS_PLAYER = 0; -const int FRAGS_SPECTATOR = -666; -const int FRAGS_PLAYER_OUT_OF_GAME = -616; - -// server flags -const int SERVERFLAG_ALLOW_FULLBRIGHT = 1; -const int SERVERFLAG_TEAMPLAY = 2; -const int SERVERFLAG_PLAYERSTATS = 4; - // a bit more constant const vector PL_MAX_CONST = '16 16 45'; const vector PL_MIN_CONST = '-16 -16 -24'; @@ -82,3 +83,10 @@ const int FL_SPAWNING = BIT(16); const int FL_PICKUPITEMS = BIT(17); const int FL_DUCKED = BIT(18); const int FL_ONSLICK = BIT(19); +#endif + +#if defined(SVQC) + #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT) +#elif defined(CSQC) + #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT) +#endif diff --git a/qcsrc/common/items/item/powerup.qh b/qcsrc/common/items/item/powerup.qh index 395db4656..bf4727a79 100644 --- a/qcsrc/common/items/item/powerup.qh +++ b/qcsrc/common/items/item/powerup.qh @@ -2,7 +2,7 @@ #ifdef SVQC // For FL_POWERUP - #include + #include #endif #include "pickup.qh" diff --git a/qcsrc/common/mapobjects/target/music.qc b/qcsrc/common/mapobjects/target/music.qc index 37ec30d64..30413c0c6 100644 --- a/qcsrc/common/mapobjects/target/music.qc +++ b/qcsrc/common/mapobjects/target/music.qc @@ -4,7 +4,6 @@ #elif defined(SVQC) #include #include - #include #include #include #endif diff --git a/qcsrc/common/mapobjects/teleporters.qc b/qcsrc/common/mapobjects/teleporters.qc index 93bfcbb26..1fbe04b76 100644 --- a/qcsrc/common/mapobjects/teleporters.qc +++ b/qcsrc/common/mapobjects/teleporters.qc @@ -11,7 +11,6 @@ #include "../util.qh" #include #include - #include #include #include #include "../deathtypes/all.qh" diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index c46c21722..e7eaa7cb2 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -7,7 +7,6 @@ #include #include #include - #include #include #include #endif diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index dc87d6b62..b5bf64a78 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -33,7 +33,6 @@ #include #include #include - #include #include "../notifications/all.qh" #include "../deathtypes/all.qh" #include diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index ee70983f8..1036ab0c8 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -9,7 +9,6 @@ #include #include #include - #include #include #include #include diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index e8f810231..c42a053f4 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -16,7 +16,6 @@ #include "../../autocvars.qh" #include "../../campaign.qh" #include "../../client.qh" -#include "../../constants.qh" #include #include #include diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 8e5ee757f..e288bebfc 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -280,11 +280,17 @@ bool independent_players; .float respawn_countdown; // next number to count +const int RESPAWN_FORCE = BIT(0); +const int RESPAWN_SILENT = BIT(1); +const int RESPAWN_DENY = BIT(2); + float blockSpectators; // if set, new or existing spectators or observers will be removed unless they become a player within g_maxplayers_spectator_blocktime seconds .float spectatortime; // point in time since the client is spectating or observing .bool player_blocked; +const int SVC_SETVIEW = 5; // TODO: move to dpdefs where this belongs! + // TODO: standardise resource regeneration .float pauseregen_finished; .float pauserothealth_finished; diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh deleted file mode 100644 index 354151c77..000000000 --- a/qcsrc/server/constants.qh +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -const int SVC_SETVIEW = 5; - -const int RESPAWN_FORCE = BIT(0); -const int RESPAWN_SILENT = BIT(1); -const int RESPAWN_DENY = BIT(2); - -#define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT) - -const int NUM_PLAYERSKINS_TEAMPLAY = 3; diff --git a/qcsrc/server/damage.qh b/qcsrc/server/damage.qh index 14dbaf074..02a637ca0 100644 --- a/qcsrc/server/damage.qh +++ b/qcsrc/server/damage.qh @@ -16,7 +16,6 @@ #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" #include "autocvars.qh" - #include "constants.qh" #include #include #include diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 1a751984d..e8b4ab681 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -3,7 +3,6 @@ #include "antilag.qh" #include "command/common.qh" #include "client.qh" -#include "constants.qh" #include "damage.qh" #include "hook.qh" #include "world.qh"