mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-18 02:58:13 -05:00
Encounter: change teammate waypoint icon position based on stance
This commit is contained in:
@ -943,9 +943,10 @@ team_player_waypoint()
|
|||||||
{
|
{
|
||||||
flag_wait( "initial_blackscreen_passed" );
|
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 setmodel( "tag_origin" );
|
||||||
self.player_waypoint_origin linkto( self );
|
self.player_waypoint_origin linkto( self );
|
||||||
|
self thread team_player_waypoint_origin_think();
|
||||||
|
|
||||||
self.player_waypoint = [];
|
self.player_waypoint = [];
|
||||||
self.player_waypoint = newTeamHudElem(self.team);
|
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()
|
headstomp_watcher()
|
||||||
{
|
{
|
||||||
level endon("end_game");
|
level endon("end_game");
|
||||||
|
Reference in New Issue
Block a user