diff --git a/scripts/zm/zgrief/zgrief_reimagined.gsc b/scripts/zm/zgrief/zgrief_reimagined.gsc index b786be82..0d6d5da1 100644 --- a/scripts/zm/zgrief/zgrief_reimagined.gsc +++ b/scripts/zm/zgrief/zgrief_reimagined.gsc @@ -943,9 +943,10 @@ team_player_waypoint() { flag_wait( "initial_blackscreen_passed" ); - self.player_waypoint_origin = spawn( "script_model", self.origin + (0, 0, 72) ); + self.player_waypoint_origin = spawn( "script_model", self.origin ); self.player_waypoint_origin setmodel( "tag_origin" ); self.player_waypoint_origin linkto( self ); + self thread team_player_waypoint_origin_think(); self.player_waypoint = []; self.player_waypoint = newTeamHudElem(self.team); @@ -968,6 +969,38 @@ team_player_waypoint() } } +team_player_waypoint_origin_think() +{ + prev_stance = "none"; + + while (isDefined(self.player_waypoint_origin)) + { + if (self getStance() != prev_stance) + { + prev_stance = self getStance(); + + self.player_waypoint_origin unlink(); + + if (self getStance() == "stand") + { + self.player_waypoint_origin.origin = self.origin + (0, 0, 72); + } + else if (self getStance() == "crouch") + { + self.player_waypoint_origin.origin = self.origin + (0, 0, 56); + } + else if (self getStance() == "prone") + { + self.player_waypoint_origin.origin = self.origin + (0, 0, 30); + } + + self.player_waypoint_origin linkto(self); + } + + wait 0.05; + } +} + headstomp_watcher() { level endon("end_game");