Commit 62a1af10 authored by terencehill's avatar terencehill

Make no sound if the waypoint isn't visible for the player

parent d1b150fd
......@@ -652,12 +652,25 @@ void Item_RespawnCountdown (void)
localcmd(sprintf("prvm_edict server %d\n", num_for_edict(self)));
}
}
sound (self, CH_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
if(self.waypointsprite_attached)
{
entity e;
entity it = self;
self = self.waypointsprite_attached;
FOR_EACH_REALCLIENT(e)
if(self.waypointsprite_visible_for_player(e))
{
msg_entity = e;
soundto(MSG_ONE, it, CH_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
}
self = it;
WaypointSprite_Ping(self.waypointsprite_attached);
//WaypointSprite_UpdateHealth(self.waypointsprite_attached, self.count);
}
else
sound(self, CH_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment