]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index c03b874d1ba17d43115174053d0e839aa8b3638b..14965d8c73be1189f3c0abb44675cd0af0ffcedc 100644 (file)
@@ -1,10 +1,11 @@
+#include "common.qh"
 #include <common/command/command.qh>
 #include "common.qh"
 
 #include "../scores.qh"
 
 #include <common/monsters/all.qh>
-#include <common/notifications.qh>
+#include <common/notifications/all.qh>
 #include <lib/warpzone/common.qh>
 
 
@@ -320,7 +321,6 @@ void CommonCommand_cvar_purechanges(float request, entity caller)
 
 void CommonCommand_editmob(int request, entity caller, int argc)
 {
-       SELFPARAM();
        switch (request)
        {
                case CMD_REQUEST_COMMAND:
@@ -330,8 +330,8 @@ void CommonCommand_editmob(int request, entity caller, int argc)
 
                        if (caller)
                        {
-                               makevectors(self.v_angle);
-                               WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
+                               makevectors(caller.v_angle);
+                               WarpZone_TraceLine(caller.origin + caller.view_ofs, caller.origin + caller.view_ofs + v_forward * 100, MOVE_NORMAL, caller);
                        }
 
                        entity mon = trace_ent;
@@ -377,8 +377,8 @@ void CommonCommand_editmob(int request, entity caller, int argc)
                                        if (!IS_PLAYER(caller)) { print_to(caller, "You must be playing to spawn a monster"); return; }
                                        if (MUTATOR_CALLHOOK(AllowMobSpawning)) { print_to(caller, ret_string); return; }
                                        if (caller.vehicle) { print_to(caller, "You can't spawn monsters while driving a vehicle"); return; }
-                                       if (caller.frozen) { print_to(caller, "You can't spawn monsters while frozen"); return; }
-                                       if (caller.deadflag != DEAD_NO) { print_to(caller, "You can't spawn monsters while dead"); return; }
+                                       if (STAT(FROZEN, caller)) { print_to(caller, "You can't spawn monsters while frozen"); return; }
+                                       if (IS_DEAD(caller)) { print_to(caller, "You can't spawn monsters while dead"); return; }
                                        if (tmp_moncount >= autocvar_g_monsters_max) { print_to(caller, "The maximum monster count has been reached"); return; }
                                        if (tmp_moncount >= autocvar_g_monsters_max_perplayer) { print_to(caller, "You can't spawn any more monsters"); return; }