#include "waypointsprites.qh"
-#ifdef IMPLEMENTATION
-
REGISTER_MUTATOR(waypointsprites, true);
REGISTER_NET_LINKED(waypointsprites)
sendflags |= 0x80;
int f = 0;
- if(this.currentammo)
+ if(this.currentammo == 1)
f |= 1; // hideable
if(this.exteriormodeltoclient == to)
f |= 2; // my own
+ if(this.currentammo == 2)
+ f |= 2; // radar only
MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, f);
sendflags = M_ARGV(2, int);
InterpolateOrigin_Do(this);
- float t = entcs_GetTeam(player_localnum) + 1;
string spriteimage = "";
// choose the sprite
switch (this.rule)
{
case SPRITERULE_SPECTATOR:
+ float t = entcs_GetTeam(player_localnum) + 1;
if (!(
(autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1)
|| (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage || STAT(ITEMSTIME) == 2))
case SPRITERULE_DEFAULT:
if (this.team)
{
- if (this.team == t)
+ if (this.team == myteam + 1)
spriteimage = this.netname;
else
spriteimage = "";
spriteimage = this.netname;
break;
case SPRITERULE_TEAMPLAY:
- if (t == NUM_SPECTATOR + 1)
+ if (myteam == NUM_SPECTATOR)
spriteimage = this.netname3;
- else if (this.team == t)
+ else if (this.team == myteam + 1)
spriteimage = this.netname2;
else
spriteimage = this.netname;
(vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o.x,
(vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o.y);
- float vidscale = max(vid_conwidth / vid_width, vid_conheight / vid_height);
-
float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
- t = waypointsprite_scale * vidscale;
+ float t = waypointsprite_scale;
a *= waypointsprite_alpha;
{
WaypointSprite_DetachCarrier(this);
}
#endif
-#endif