From 584cc09dcd51625702dce41b4ccfd443b32a1515 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Mar 2017 13:43:30 +1000 Subject: [PATCH] Fix waypoints --- qcsrc/server/race.qc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index abe230810..2bd9f9668 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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; }); }); -- 2.39.2