seta cl_buffs_autoreplace 1 "automatically drop current buff when picking up another"
set g_buffs -1 "enable buffs (requires buff items or powerups on the map)"
set g_buffs_effects 1 "show particle effects from carried buffs"
-set g_buffs_waypoint_distance 1024 "maximum distance at which buff waypoint can be seen from item"
+set g_buffs_waypoint_distance 1024 "maximum distance from item at which buff waypoint can be seen, 0 disables buff waypoints"
set g_buffs_pickup_anyway 0 "instantly respawn the buff when it is picked up, instead of waiting for the player to drop it"
set g_buffs_pickup_delay 0.7 "cooldown before player can pick up another buff after dropping one"
set g_buffs_randomize 1 "randomize buff type when player drops the buff, only applies to teamplay gamemodes if g_buffs_randomize_teamplay is enabled"
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));