]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix waypoints 421/head
authorMario <mario@smbclan.net>
Sun, 12 Mar 2017 03:43:30 +0000 (13:43 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Mar 2017 03:43:30 +0000 (13:43 +1000)
qcsrc/server/race.qc

index abe2308104a33f5f6d373be44c1f667cea2223c4..2bd9f9668bc443bd021a7499656be2040c55e606 100644 (file)
@@ -728,9 +728,13 @@ void checkpoint_use(entity this, entity actor, entity trigger)
 
 bool race_waypointsprite_visible_for_player(entity this, entity player, entity view)
 {
-       if(view.race_checkpoint == -1 || this.owner.race_checkpoint == -2)
+       entity own = this.owner;
+       if(this.realowner)
+               own = this.realowner; // target support
+
+       if(view.race_checkpoint == -1 || own.race_checkpoint == -2)
                return true;
-       else if(view.race_checkpoint == this.owner.race_checkpoint)
+       else if(view.race_checkpoint == own.race_checkpoint)
                return true;
        else
                return false;
@@ -825,6 +829,7 @@ void trigger_race_checkpoint_verify(entity this)
                        else
                                WaypointSprite_SpawnFixed(WP_RaceCheckpoint, org, it, sprite, RADARICON_NONE);
 
+                       it.sprite.realowner = cpt;
                        it.sprite.waypointsprite_visible_for_player = race_waypointsprite_visible_for_player;
                });
        });