]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qh
Rename defs to qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qh
index 010d56b060f0b763073a21625c4636afd12ff1d7..2b2aaaf3736b48fd3781b26fe1d4763b3f4b1290 100644 (file)
@@ -1,9 +1,99 @@
+#ifndef COMMAND_COMMON_H
+#define COMMAND_COMMON_H
+
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+    #include "../../common/util-pre.qh"
+    #include "../sys-pre.qh"
+    #include "../../dpdefs/progsdefs.qh"
+    #include "../../dpdefs/dpextensions.qh"
+    #include "../sys-post.qh"
+    #include "../../warpzonelib/anglestransform.qh"
+    #include "../../warpzonelib/mathlib.qh"
+    #include "../../warpzonelib/common.qh"
+    #include "../../warpzonelib/util_server.qh"
+    #include "../../warpzonelib/server.qh"
+    #include "../../common/constants.qh"
+    #include "../../common/stats.qh"
+    #include "../../common/teams.qh"
+    #include "../../common/util.qh"
+    #include "../../common/nades.qh"
+    #include "../../common/buffs.qh"
+    #include "../../common/test.qh"
+    #include "../../common/counting.qh"
+    #include "../../common/urllib.qh"
+    #include "../../common/command/markup.qh"
+    #include "../../common/command/rpn.qh"
+    #include "../../common/command/generic.qh"
+    #include "../../common/command/shared_defs.qh"
+    #include "../../common/net_notice.qh"
+    #include "../../common/animdecide.qh"
+    #include "../../common/monsters/monsters.qh"
+    #include "../../common/monsters/sv_monsters.qh"
+    #include "../../common/monsters/spawn.qh"
+    #include "../../common/weapons/config.qh"
+    #include "../../common/weapons/weapons.qh"
+    #include "../weapons/accuracy.qh"
+    #include "../weapons/common.qh"
+    #include "../weapons/csqcprojectile.qh"
+    #include "../weapons/hitplot.qh"
+    #include "../weapons/selection.qh"
+    #include "../weapons/spawning.qh"
+    #include "../weapons/throwing.qh"
+    #include "../weapons/tracing.qh"
+    #include "../weapons/weaponstats.qh"
+    #include "../weapons/weaponsystem.qh"
+    #include "../t_items.qh"
+    #include "../autocvars.qh"
+    #include "../constants.qh"
+    #include "../defs.qh"
+    #include "../../common/notifications.qh"
+    #include "../../common/deathtypes.qh"
+    #include "../mutators/mutators_include.qh"
+    #include "../tturrets/include/turrets_early.qh"
+    #include "../vehicles/vehicles_def.qh"
+    #include "../campaign.qh"
+    #include "../../common/campaign_common.qh"
+    #include "../../common/mapinfo.qh"
+#endif
+
 // ============================================================
 //  Shared declarations for server commands, written by Samual
-//  Last updated: December 13th, 2011
+//  Last updated: December 30th, 2011
 // ============================================================
 
-#define CLIENT_ACCEPTABLE 1
-#define CLIENT_DOESNT_EXIST -1
-#define CLIENT_NOT_REAL -2
-#define CLIENT_NOT_BOT -3
\ No newline at end of file
+// client verification results
+const float CLIENT_ACCEPTABLE = 1;
+const float CLIENT_DOESNT_EXIST = -1;
+const float CLIENT_NOT_REAL = -2;
+const float CLIENT_NOT_BOT = -3;
+
+// definitions for timeouts
+const float TIMEOUT_INACTIVE = 0;
+const float TIMEOUT_LEADTIME = 1;
+const float TIMEOUT_ACTIVE = 2;
+
+// timeout which pauses the game by setting the slowmo value extremely low.
+const float TIMEOUT_SLOWMO_VALUE = 0.0001;
+
+// global timeout information declarations
+entity timeout_caller; // contains the entity of the player who started the last timeout
+entity timeout_handler; // responsible for centerprinting the timeout countdowns and playing sounds
+float sys_frametime; // gets initialised in worldspawn, saves the value from autocvar_sys_ticrate
+float orig_slowmo; // contains the value of autocvar_slowmo so that, after timeout finished, it isn't set to slowmo 1 necessarily
+float timeout_time; // contains the time in seconds that the active timeout has left
+float timeout_leadtime; // contains the number of seconds left of the leadtime (before the timeout starts)
+float timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2)
+.float allowed_timeouts; // contains the number of allowed timeouts for each player
+.vector lastV_angle; //used when pausing the game in order to force the player to keep his old view angle fixed
+
+// allow functions to be used in other code like g_world.qc and teamplay.qc
+void timeout_handler_think();
+
+// used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
+void CommonCommand_macro_write_aliases(float fh);
+
+// keep track of the next token to use for argc
+float next_token;
+#endif
\ No newline at end of file