]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
Merge branch 'master' into terencehill/string_prefixes_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 29f46c9cd1a803a8470264ac92108b454d5c12fb..4a8b59eba651d8b8b1c3099858854ce7cbfca127 100644 (file)
@@ -1,3 +1,32 @@
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+       #include "../../dpdefs/progsdefs.qh"
+    #include "../../dpdefs/dpextensions.qh"
+    #include "../../warpzonelib/common.qh"
+    #include "../../common/constants.qh"
+    #include "../../common/teams.qh"
+    #include "../../common/util.qh"
+    #include "../../common/command/shared_defs.qh"
+    #include "../../common/monsters/monsters.qh"
+    #include "../../common/monsters/sv_monsters.qh"
+    #include "../../common/monsters/spawn.qh"
+    #include "../autocvars.qh"
+    #include "../defs.qh"
+    #include "../../common/notifications.qh"
+    #include "../../common/deathtypes.qh"
+    #include "../mutators/mutators_include.qh"
+    #include "../vehicles/vehicles_def.qh"
+    #include "../campaign.qh"
+    #include "../../common/mapinfo.qh"
+    #include "common.qh"
+    #include "vote.qh"
+    #include "cmd.qh"
+    #include "../cheats.qh"
+    #include "../scores.qh"
+    #include "../ipban.qh"
+#endif
+
 // =========================================================
 //  Server side networked commands code, reworked by Samual
 //  Last updated: December 28th, 2011
@@ -194,7 +223,7 @@ void ClientCommand_mobedit(float request, float argc)
                        {
                                makevectors(self.v_angle);
                                WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
-                               
+
                                if(!autocvar_g_monsters_edit) { sprint(self, "Monster property editing is not enabled.\n"); return; }
                                if(trace_ent.flags & FL_MONSTER)
                                {
@@ -236,7 +265,7 @@ void ClientCommand_mobkill(float request)
                {
                        makevectors(self.v_angle);
                        WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
-                       
+
                        if(trace_ent.flags & FL_MONSTER)
                        {
                                if(trace_ent.realowner != self)
@@ -249,7 +278,7 @@ void ClientCommand_mobkill(float request)
                                return;
                        }
                }
-       
+
                default:
                        sprint(self, "Incorrect parameters for ^2mobkill^7\n");
                case CMD_REQUEST_USAGE:
@@ -270,22 +299,22 @@ void ClientCommand_mobspawn(float request, float argc)
                        entity e;
                        string tospawn;
                        float moveflag, monstercount = 0;
-                       
+
                        moveflag = (argv(2) ? stof(argv(2)) : 1); // follow owner if not defined
                        tospawn = strtolower(argv(1));
-                       
+
                        if(tospawn == "list")
                        {
                                sprint(self, monsterlist_reply);
                                return;
                        }
-                       
+
                        FOR_EACH_MONSTER(e)
                        {
                                if(e.realowner == self)
                                        ++monstercount;
                        }
-                       
+
                        if(autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { sprint(self, "Monster spawning is disabled.\n"); return; }
                        else if(!IS_PLAYER(self)) { sprint(self, "You can't spawn monsters while spectating.\n"); return; }
                        else if(MUTATOR_CALLHOOK(AllowMobSpawning)) { sprint(self, "Monster spawning is currently disabled by a mutator.\n"); return; }
@@ -300,7 +329,7 @@ void ClientCommand_mobspawn(float request, float argc)
                        {
                                float found = 0, i;
                                entity mon;
-                               
+
                                for(i = MON_FIRST; i <= MON_LAST; ++i)
                                {
                                        mon = get_monsterinfo(i);
@@ -314,20 +343,20 @@ void ClientCommand_mobspawn(float request, float argc)
                                if(found || tospawn == "random")
                                {
                                        totalspawned += 1;
-                               
+
                                        makevectors(self.v_angle);
                                        WarpZone_TraceBox (CENTER_OR_VIEWOFS(self), PL_MIN, PL_MAX, CENTER_OR_VIEWOFS(self) + v_forward * 150, true, self);
                                        //WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 150, MOVE_NORMAL, self);
-                               
+
                                        e = spawnmonster(tospawn, 0, self, self, trace_endpos, false, false, moveflag);
-                                       
+
                                        sprint(self, strcat("Spawned ", e.monster_name, "\n"));
-                                       
+
                                        return;
                                }
                        }
                }
-       
+
                default:
                        sprint(self, "Incorrect parameters for ^2mobspawn^7\n");
                case CMD_REQUEST_USAGE: