]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Merge branch 'master' into divVerent/4team_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index 752cb147889ef744dc073cfc82a5a6a81590e430..63d846f1fd03ad861dc53de314b1c155356896ec 100644 (file)
@@ -277,7 +277,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                        {
                                e.race_completed = 1;
                                MAKE_INDEPENDENT_PLAYER(e);
-                               bprint(e.netname, "^7 has finished the race.\n");
+                               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_RACE_FINISHED, e.netname);
                                ClientData_Touch(e);
                        }
                }
@@ -457,7 +457,7 @@ void checkpoint_passed()
        /*
         * Trigger targets
         */
-       if not((self.spawnflags & 2) && (other.classname == "player"))
+       if not((self.spawnflags & 2) && (IS_PLAYER(other)))
        {
                activator = other;
                oldmsg = self.message;
@@ -466,7 +466,7 @@ void checkpoint_passed()
                self.message = oldmsg;
        }
 
-       if(other.classname != "player")
+       if not(IS_PLAYER(other))
                return;
 
        /*
@@ -894,7 +894,7 @@ void race_AbandonRaceCheck(entity p)
        {
                p.race_completed = 1;
                MAKE_INDEPENDENT_PLAYER(p);
-               bprint(p.netname, "^7 has abandoned the race.\n");
+               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_RACE_ABANDONED, p.netname);
                ClientData_Touch(p);
        }
 }