]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
Add a new notification for joining a specific team, also fix the unnecessary "connect...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 4494c104db136b94ebdc2cfb5c3d4763b50601e8..5c052e2d91e70fa45393b558bc5cc50fff772352 100644 (file)
@@ -1,4 +1,4 @@
-#include "../../common/command/command.qh"
+#include <common/command/command.qh>
 #include "cmd.qh"
 
 #include "common.qh"
 #include "../mutators/all.qh"
 
 #ifdef SVQC
-       #include "../../common/vehicles/all.qh"
+       #include <common/vehicles/all.qh>
 #endif
 
-#include "../../common/constants.qh"
-#include "../../common/deathtypes/all.qh"
-#include "../../common/mapinfo.qh"
-#include "../../common/notifications.qh"
-#include "../../common/physics/player.qh"
-#include "../../common/teams.qh"
-#include "../../common/util.qh"
-#include "../../common/triggers/triggers.qh"
+#include <common/constants.qh>
+#include <common/deathtypes/all.qh>
+#include <common/mapinfo.qh>
+#include <common/notifications.qh>
+#include <common/physics/player.qh>
+#include <common/teams.qh>
+#include <common/util.qh>
+#include <common/triggers/triggers.qh>
 
-#include "../../common/minigames/sv_minigames.qh"
+#include <common/minigames/sv_minigames.qh>
 
-#include "../../common/monsters/all.qc"
-#include "../../common/monsters/spawn.qh"
-#include "../../common/monsters/sv_monsters.qh"
+#include <common/monsters/all.qc>
+#include <common/monsters/spawn.qh>
+#include <common/monsters/sv_monsters.qh>
 
-#include "../../lib/warpzone/common.qh"
+#include <lib/warpzone/common.qh>
 
 void ClientKill_TeamChange(float targetteam);  // 0 = don't change, -1 = auto, -2 = spec
 
@@ -180,7 +180,7 @@ void ClientCommand_join(float request)
                                                self.classname = STR_PLAYER;
                                                PlayerScore_Clear(self);
                                                Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_PREVENT_JOIN);
-                                               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
+                                               Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay) ? APP_TEAM_ENT_4(this, INFO_JOIN_PLAY_TEAM_) : INFO_JOIN_PLAY), self.netname);
                                                PutClientInServer();
                                        }
                                        else
@@ -372,7 +372,7 @@ void ClientCommand_selectteam(float request, float argc)
 
                                                                if (selection)
                                                                {
-                                                                       if (self.team == selection && self.deadflag == DEAD_NO)
+                                                                       if (self.team == selection && !IS_DEAD(self))
                                                                        {
                                                                                sprint(self, "^7You already are on that team.\n");
                                                                        }