if(autocvar_g_powerups_dropondeath != 2)
Item_SetExpiring(e, true);
-
- // Create expiring waypoint
- entity wp = WaypointSprite_Spawn(WP_Item, time_to_live * -1, 0, e, '0 0 1' * e.maxs.z, NULL, 0, e, waypointsprite_attached, true, RADARICON_Item);
- wp.wp_extra = item.m_id;
- wp.wp_reverse = 1;
- WaypointSprite_UpdateBuildFinished(e.waypointsprite_attached, time + time_to_live);
-}
-
-MUTATOR_HOOKFUNCTION(powerups, ItemTouched)
-{
- entity e = M_ARGV(0, entity);
- if(e.waypointsprite_attached)
- WaypointSprite_Kill(e.waypointsprite_attached);
}
MUTATOR_HOOKFUNCTION(powerups, PlayerDies)
dt = bound(0, dt * 32, 16383);
WriteByte(MSG_ENTITY, (dt & 0xFF00) / 256 + 192);
WriteByte(MSG_ENTITY, (dt & 0x00FF));
- WriteByte(MSG_ENTITY, this.wp_reverse);
}
}
else
this.build_starthealth = 0;
this.build_finished = servertime + t / 32;
- this.build_reverse = ReadByte();
}
}
else
a *= (bound(0, (this.maxdistance - dist) / (this.maxdistance - maxnormdistance), 1) ** waypointsprite_distancealphaexponent);
}
- vector rgb;
- if(this.build_reverse)
- rgb = '1 0 0';
- else
- rgb = spritelookupcolor(this, spriteimage, this.teamradar_color);
-
+ vector rgb = spritelookupcolor(this, spriteimage, this.teamradar_color);
if (rgb == '0 0 0')
{
this.teamradar_color = '1 0 1';
drawhealthbar(
o,
0,
- (this.build_reverse ? 1 - GetResource(this, RES_HEALTH) : GetResource(this, RES_HEALTH)),
+ GetResource(this, RES_HEALTH),
'0 0 0',
'0 0 0',
SPRITE_HEALTHBAR_WIDTH * t,
/** Additional networked waypoint state, used for items, weapons, buffs */
.int wp_extra;
-.int wp_reverse;
const int SPRITERULE_DEFAULT = 0;
const int SPRITERULE_TEAMPLAY = 1;
classfield(WaypointSprite) .float build_started;
classfield(WaypointSprite) .float build_starthealth;
classfield(WaypointSprite) .float build_finished;
-classfield(WaypointSprite) .int build_reverse;
bool autocvar_cl_hidewaypoints;
set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
set g_powerups -1 "if set to 0 no powerups will spawn, if 1 they will spawn in all game modes, -1 is game mode default"
set g_powerups_dropondeath 0 "players will drop their powerups on death (1 = timer continues, 2 = timer freezes until picked up)"
-set g_powerups_dropondeath_ttl 20 "seconds before a dropped powerup disappears if g_powerups_dropondeath is set to 2"
+set g_powerups_dropondeath_ttl 20 "seconds before a dropped powerup disappears if dropondeath is set to 2"
set g_powerups_stack 0 "enables stacking of powerup timers when picking up a powerup you already have; otherwise timer is reset to the time granted by the item, if greater than the time you currently have"
set g_powerups_strength 1 "allow strength powerups to spawn"
set g_powerups_shield 1 "allow shield powerups to spawn"