spr = WaypointSprite_SpawnFixed(WP_AssaultDefend, 0.5 * (it.absmin + it.absmax), it, assault_sprite, RADARICON_OBJECTIVE);
spr.assault_decreaser = this;
spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible;
- spr.classname = "sprite_waypoint";
WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
if(it.classname == "func_assault_destructible")
{
REGISTER_NET_LINKED(waypointsprites)
#ifdef SVQC
-/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
{
WriteHeader(MSG_ENTITY, waypointsprites);
if (this.max_health || (this.pain_finished && (time < this.pain_finished + 0.25)))
sendflags |= 0x80;
- int f = 0;
- if(this.currentammo == 1)
- f |= 1; // hideable
- if(this.exteriormodeltoclient == to)
- f |= 2; // my own
- if(this.currentammo == 2)
- f |= 2; // radar only
+ int hide_flags = 0;
+ if(this.currentammo == 1) hide_flags |= 1; // hideable
+ else if(this.currentammo == 2) hide_flags |= 2; // radar only
+ if(this.exteriormodeltoclient == to) hide_flags |= 2; // my own
- MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, f);
+ MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, hide_flags);
sendflags = M_ARGV(2, int);
- f = M_ARGV(3, int);
+ hide_flags = M_ARGV(3, int);
WriteByte(MSG_ENTITY, sendflags);
WriteByte(MSG_ENTITY, this.wp_extra);
WriteCoord(MSG_ENTITY, this.fade_time);
WriteCoord(MSG_ENTITY, this.teleport_time);
WriteShort(MSG_ENTITY, this.fade_rate); // maxdist
- WriteByte(MSG_ENTITY, f);
+ WriteByte(MSG_ENTITY, hide_flags);
}
if (sendflags & 32)
strfree(this.netname3);
}
-/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
void Ent_WaypointSprite(entity this, bool isnew)
{
int sendflags = ReadByte();