]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move some variables out of constants.qh
authorMario <mario@smbclan.net>
Thu, 13 Jul 2017 02:44:43 +0000 (12:44 +1000)
committerMario <mario@smbclan.net>
Thu, 13 Jul 2017 02:44:43 +0000 (12:44 +1000)
qcsrc/common/constants.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/common/physics/player.qh
qcsrc/common/scores.qh
qcsrc/common/util.qh
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/config.qc
qcsrc/server/mutators/gamemode.qh
qcsrc/server/spawnpoints.qh

index 6fd6fe9c7e97233023d7a530a812462140659e8e..18ea6d7d16f6204d2b3e6df82e40b851d865af53 100644 (file)
@@ -2,10 +2,6 @@
 
 const int RANKINGS_CNT = 15;
 
-const int SPRITERULE_DEFAULT = 0;
-const int SPRITERULE_TEAMPLAY = 1;
-const int SPRITERULE_SPECTATOR = 2;
-
 ///////////////////////////
 // keys pressed
 const int KEY_FORWARD = BIT(0);
@@ -34,8 +30,6 @@ const int HUD_BUMBLEBEE_GUN = 25;
 // # of maps, I'll use arrays for them :P
 const int MAPVOTE_COUNT = 30;
 
-// game mode specific indices are not in common/, but in server/scores_rules.qc!
-
 const int SPECIES_HUMAN = 0;
 const int SPECIES_ROBOT_SOLID = 1;
 const int SPECIES_ALIEN = 2;
@@ -50,44 +44,15 @@ const int FRAGS_LMS_LOSER = -616;
 const int FRAGS_PLAYER_NONSOLID = FRAGS_LMS_LOSER;
 // we can use this frags value for both
 
-// water levels
-const int WATERLEVEL_NONE = 0;
-const int WATERLEVEL_WETFEET = 1;
-const int WATERLEVEL_SWIMMING = 2;
-const int WATERLEVEL_SUBMERGED = 3;
-
 // server flags
 const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
 const int SERVERFLAG_TEAMPLAY = 2;
 const int SERVERFLAG_PLAYERSTATS = 4;
 
-#ifdef SVQC
-// FIXME/EXPLAINME: why? Mario: because
-vector autocvar_sv_player_maxs = '16 16 45';
-vector autocvar_sv_player_mins = '-16 -16 -24';
-vector autocvar_sv_player_viewoffset = '0 0 35';
-vector autocvar_sv_player_crouch_maxs = '16 16 25';
-vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
-vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
-//vector autocvar_sv_player_headsize = '24 24 12';
-
-// temporary array used to dump weapon and turret settings
-const int MAX_CONFIG_SETTINGS = 256;
-string config_queue[MAX_CONFIG_SETTINGS];
-
-#endif
-
-
 // a bit more constant
 const vector PL_MAX_CONST = '16 16 45';
 const vector PL_MIN_CONST = '-16 -16 -24';
 
-// spawnpoint prios
-const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
-const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
-const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50;
-const int SPAWN_PRIO_GOOD_DISTANCE = 10;
-
 // gametype vote flags
 const int GTV_FORBIDDEN = 0; // Cannot be voted
 const int GTV_AVAILABLE = 1; // Can be voted
index 62a7cac61123efc52393d6f814c48521612a4eee..d77a4aa61827d36f302c5c0d2b53d5506d7b6899 100644 (file)
@@ -5,6 +5,10 @@
 /** Additional networked waypoint state, used for items, weapons, buffs */
 .int wp_extra;
 
+const int SPRITERULE_DEFAULT = 0;
+const int SPRITERULE_TEAMPLAY = 1;
+const int SPRITERULE_SPECTATOR = 2;
+
 #ifdef CSQC
 entityclass(WaypointSprite);
 class(WaypointSprite) .float helpme;
index 4cd184e9ec6de1557665415ecef80d36b5ad5706..dbd765d983df928a9e6b262121cd9526b4813286 100644 (file)
@@ -1,5 +1,11 @@
 #pragma once
 
+// water levels
+const int WATERLEVEL_NONE = 0;
+const int WATERLEVEL_WETFEET = 1;
+const int WATERLEVEL_SWIMMING = 2;
+const int WATERLEVEL_SUBMERGED = 3;
+
 #define IS_ONGROUND(s)                      boolean((s).flags & FL_ONGROUND)
 #define SET_ONGROUND(s)                     ((s).flags |= FL_ONGROUND)
 #define UNSET_ONGROUND(s)                   ((s).flags &= ~FL_ONGROUND)
index 07c3d1cb9baaae1c481d65847c9f422406a96dcf..88c735c630fac40950ba1e9eb965f1decc5f83ea 100644 (file)
@@ -292,6 +292,17 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
 
 #endif
 
+#ifdef SVQC
+// FIXME/EXPLAINME: why? Mario: because
+vector autocvar_sv_player_maxs = '16 16 45';
+vector autocvar_sv_player_mins = '-16 -16 -24';
+vector autocvar_sv_player_viewoffset = '0 0 35';
+vector autocvar_sv_player_crouch_maxs = '16 16 25';
+vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
+vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
+//vector autocvar_sv_player_headsize = '24 24 12';
+#endif
+
 REGISTER_NET_C2S(setpause)
 #ifdef CSQC
 void unpause_update()
index 0451fd9c2e30fd02f910c5b576ae58d4bb97bd98..646638a80ca704778f8628513a6225021c154566 100644 (file)
@@ -14,6 +14,7 @@ STATIC_INIT(Scores_renumber) { FOREACH(Scores, true, it.m_id = i); }
  * Score indices
  */
 
+// game mode specific indices are not in common/, but in server/scores_rules.qc!
 #ifdef GAMEQC
 REGISTER_SP(END);
 
index d74275a9c970bdc990be1575665df09d11868276..6e9b31a74f394a3ca38cab1e74ebf807078bc3c3 100644 (file)
@@ -4,6 +4,12 @@
 vector real_origin(entity ent);
 #endif
 
+#ifdef SVQC
+// temporary array used to dump weapon and turret settings
+const int MAX_CONFIG_SETTINGS = 256;
+string config_queue[MAX_CONFIG_SETTINGS];
+#endif
+
 .string netname;
 .string message;
 
index d8c76dbf39fbb81b3199407229e0fee7cefc91b8..94deed55197c21056d7f8a56b03bbed4af1aa14f 100644 (file)
@@ -26,7 +26,7 @@
     #include "../constants.qh"
     #include "../stats.qh"
     #include "../teams.qh"
-    #include "../util.qh"
+    #include <common/util.qh>
     #include "../monsters/_mod.qh"
     #include "config.qh"
     #include <server/weapons/csqcprojectile.qh>
index 7f87388db13b3b1964a360597b45ea013b28373b..a8194772cc69fad609edcd5e7cd1a299f69a49e8 100644 (file)
@@ -2,7 +2,7 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../util.qh"
+    #include <common/util.qh>
     #include "all.qh"
 #endif
 
index 05e1d3d3890474e7871fb4299642420b31b23066..84094df6bdf3a684ee64303c9d444310e4da5f23 100644 (file)
@@ -72,6 +72,8 @@
 #include <server/pathlib/pathlib.qh>
 #include <common/vehicles/all.qh>
 
+#include <common/mutators/mutator/waypoints/waypointsprites.qh>
+
 #include <server/client.qh>
 #include <server/player.qh>
 #include <server/impulse.qh>
index 56e00b5ac5258c7bc7b8f8a82bea0a0f75eb8bf3..92af8df66fe017167bf2b64a6127235a2e6e2d50 100644 (file)
@@ -1,5 +1,11 @@
 #pragma once
 
+// spawnpoint prios
+const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
+const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
+const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50;
+const int SPAWN_PRIO_GOOD_DISTANCE = 10;
+
 .vector spawnpoint_score;
 float spawnpoint_nag;
 bool SpawnEvent_Send(entity this, entity to, int sf);