entity WaypointSprite_DeployFixed(
entity spr,
float limited_range,
+ entity player,
vector ofs,
entity icon // initial icon
)
-{SELFPARAM();
+{
float t;
if (teamplay)
- t = self.team;
+ t = player.team;
else
t = 0;
float maxdistance;
maxdistance = waypointsprite_limitedrange;
else
maxdistance = 0;
- return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, self, waypointsprite_deployed_fixed, false, icon);
+ return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, player, waypointsprite_deployed_fixed, false, icon);
}
entity WaypointSprite_DeployPersonal(
entity spr,
+ entity player,
vector ofs,
entity icon // initial icon
)
-{SELFPARAM();
- return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, false, icon);
+{
+ return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, player, waypointsprite_deployed_personal, false, icon);
}
entity WaypointSprite_Attach(
entity spr,
+ entity player,
float limited_range,
entity icon // initial icon
)
-{SELFPARAM();
+{
float t;
- if (self.waypointsprite_attachedforcarrier)
+ if (player.waypointsprite_attachedforcarrier)
return world; // can't attach to FC
if (teamplay)
- t = self.team;
+ t = player.team;
else
t = 0;
float maxdistance;
maxdistance = waypointsprite_limitedrange;
else
maxdistance = 0;
- return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, self, '0 0 64', world, t, self, waypointsprite_attached, false, icon);
+ return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, player, '0 0 64', world, t, player, waypointsprite_attached, false, icon);
}
entity WaypointSprite_AttachCarrier(
WaypointSprite_Disown(carrier.waypointsprite_attachedforcarrier, waypointsprite_deadlifetime);
}
-void WaypointSprite_ClearPersonal()
-{SELFPARAM();
- WaypointSprite_Kill(self.waypointsprite_deployed_personal);
+void WaypointSprite_ClearPersonal(entity this)
+{
+ WaypointSprite_Kill(this.waypointsprite_deployed_personal);
}
-void WaypointSprite_ClearOwned()
-{SELFPARAM();
- WaypointSprite_Kill(self.waypointsprite_deployed_fixed);
- WaypointSprite_Kill(self.waypointsprite_deployed_personal);
- WaypointSprite_Kill(self.waypointsprite_attached);
+void WaypointSprite_ClearOwned(entity this)
+{
+ WaypointSprite_Kill(this.waypointsprite_deployed_fixed);
+ WaypointSprite_Kill(this.waypointsprite_deployed_personal);
+ WaypointSprite_Kill(this.waypointsprite_attached);
}
void WaypointSprite_PlayerDead(entity this)
WaypointSprite_DetachCarrier(this);
}
-void WaypointSprite_PlayerGone()
-{SELFPARAM();
- WaypointSprite_Disown(self.waypointsprite_deployed_fixed, waypointsprite_deadlifetime);
- WaypointSprite_Kill(self.waypointsprite_deployed_personal);
- WaypointSprite_Disown(self.waypointsprite_attached, waypointsprite_deadlifetime);
- WaypointSprite_DetachCarrier(self);
+void WaypointSprite_PlayerGone(entity this)
+{
+ WaypointSprite_Disown(this.waypointsprite_deployed_fixed, waypointsprite_deadlifetime);
+ WaypointSprite_Kill(this.waypointsprite_deployed_personal);
+ WaypointSprite_Disown(this.waypointsprite_attached, waypointsprite_deadlifetime);
+ WaypointSprite_DetachCarrier(this);
}
#endif
#endif
IMPULSE(waypoint_personal_here)
{
- entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, this.origin, RADARICON_WAYPOINT);
+ entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, this, this.origin, RADARICON_WAYPOINT);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "personal waypoint spawned at location\n");
}
IMPULSE(waypoint_personal_crosshair)
{
WarpZone_crosshair_trace(this);
- entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, trace_endpos, RADARICON_WAYPOINT);
+ entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, this, trace_endpos, RADARICON_WAYPOINT);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "personal waypoint spawned at crosshair\n");
}
IMPULSE(waypoint_personal_death)
{
if (!this.death_origin) return;
- entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, this.death_origin, RADARICON_WAYPOINT);
+ entity wp = WaypointSprite_DeployPersonal(WP_Waypoint, this, this.death_origin, RADARICON_WAYPOINT);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "personal waypoint spawned at death location\n");
}
if (IS_DEAD(this)) return;
if (!MUTATOR_CALLHOOK(HelpMePing, this))
{
- entity wp = WaypointSprite_Attach(WP_Helpme, true, RADARICON_HELPME);
+ entity wp = WaypointSprite_Attach(WP_Helpme, this, true, RADARICON_HELPME);
if (!wp) WaypointSprite_HelpMePing(this.waypointsprite_attachedforcarrier);
else WaypointSprite_Ping(wp);
}
IMPULSE(waypoint_here_here)
{
- entity wp = WaypointSprite_DeployFixed(WP_Here, false, this.origin, RADARICON_HERE);
+ entity wp = WaypointSprite_DeployFixed(WP_Here, false, this, this.origin, RADARICON_HERE);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "HERE spawned at location\n");
}
IMPULSE(waypoint_here_crosshair)
{
WarpZone_crosshair_trace(this);
- entity wp = WaypointSprite_DeployFixed(WP_Here, false, trace_endpos, RADARICON_HERE);
+ entity wp = WaypointSprite_DeployFixed(WP_Here, false, this, trace_endpos, RADARICON_HERE);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "HERE spawned at crosshair\n");
}
IMPULSE(waypoint_here_death)
{
if (!this.death_origin) return;
- entity wp = WaypointSprite_DeployFixed(WP_Here, false, this.death_origin, RADARICON_HERE);
+ entity wp = WaypointSprite_DeployFixed(WP_Here, false, this, this.death_origin, RADARICON_HERE);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "HERE spawned at death location\n");
}
IMPULSE(waypoint_danger_here)
{
- entity wp = WaypointSprite_DeployFixed(WP_Danger, false, this.origin, RADARICON_DANGER);
+ entity wp = WaypointSprite_DeployFixed(WP_Danger, false, this, this.origin, RADARICON_DANGER);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "DANGER spawned at location\n");
}
IMPULSE(waypoint_danger_crosshair)
{
WarpZone_crosshair_trace(this);
- entity wp = WaypointSprite_DeployFixed(WP_Danger, false, trace_endpos, RADARICON_DANGER);
+ entity wp = WaypointSprite_DeployFixed(WP_Danger, false, this, trace_endpos, RADARICON_DANGER);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "DANGER spawned at crosshair\n");
}
IMPULSE(waypoint_danger_death)
{
if (!this.death_origin) return;
- entity wp = WaypointSprite_DeployFixed(WP_Danger, false, this.death_origin, RADARICON_DANGER);
+ entity wp = WaypointSprite_DeployFixed(WP_Danger, false, this, this.death_origin, RADARICON_DANGER);
if (wp) WaypointSprite_Ping(wp);
sprint(this, "DANGER spawned at death location\n");
}
IMPULSE(waypoint_clear_personal)
{
- WaypointSprite_ClearPersonal();
+ WaypointSprite_ClearPersonal(this);
if (this.personal)
{
remove(this.personal);
IMPULSE(waypoint_clear)
{
- WaypointSprite_ClearOwned();
+ WaypointSprite_ClearOwned(this);
if (this.personal)
{
remove(this.personal);