void buff_Waypoint_Spawn(entity e)
{
+ if(autocvar_g_buffs_waypoint_distance <= 0) return;
+
entity buff = buff_FirstFromFlags(STAT(BUFFS, e));
entity wp = WaypointSprite_Spawn(WP_Buff, 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, NULL, e.team, e, buff_waypoint, true, RADARICON_Buff);
wp.wp_extra = buff.m_id;
if(!this.buff_waypoint)
buff_Waypoint_Spawn(this);
- WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + cd);
+ if(this.buff_waypoint)
+ WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + cd);
+
this.buff_activetime = cd;
this.buff_active = !cd;
}
void buff_Think(entity this)
{
+ if(this.buff_waypoint && autocvar_g_buffs_waypoint_distance <= 0)
+ WaypointSprite_Kill(this.buff_waypoint);
+
if(STAT(BUFFS, this) != this.oldbuffs)
{
entity buff = buff_FirstFromFlags(STAT(BUFFS, this));