#ifdef SVQC
/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
float WaypointSprite_SendEntity(entity to, float sendflags)
-{
+{SELFPARAM();
WriteMutator(MSG_ENTITY, waypointsprites);
sendflags = sendflags & 0x7F;
}
void Ent_RemoveWaypointSprite()
-{
+{SELFPARAM();
if (self.netname) strunzone(self.netname);
if (self.netname2) strunzone(self.netname2);
if (self.netname3) strunzone(self.netname3);
/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
void Ent_WaypointSprite()
-{
+{SELFPARAM();
int sendflags = ReadByte();
self.wp_extra = ReadByte();
#ifdef CSQC
float spritelookupblinkvalue(string s)
-{
+{SELFPARAM();
if (s == WP_Weapon.netname) {
if (get_weaponinfo(self.wp_extra).spawnflags & WEP_FLAG_SUPERWEAPON)
return 2;
}
vector spritelookupcolor(string s, vector def)
-{
+{SELFPARAM();
if (s == WP_Weapon.netname) return get_weaponinfo(self.wp_extra).wpcolor;
if (s == WP_Item.netname) return ITEMS[self.wp_extra].m_color;
if (s == WP_Buff.netname) return BUFFS[self.wp_extra].m_color;
}
string spritelookuptext(string s)
-{
+{SELFPARAM();
if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
if (s == WP_Weapon.netname) return get_weaponinfo(self.wp_extra).message;
if (s == WP_Item.netname) return ITEMS[self.wp_extra].m_waypoint;
}
void Draw_WaypointSprite()
-{
+{SELFPARAM();
if (self.lifetime)
self.alpha = pow(bound(0, (self.fadetime - time) / self.lifetime, 1), waypointsprite_timealphaexponent);
else
}
void WaypointSprite_Think()
-{
+{SELFPARAM();
bool doremove = false;
if (self.fade_time && time >= self.teleport_time)
}
float WaypointSprite_visible_for_player(entity e)
-{
+{SELFPARAM();
// personal waypoints
if (self.enemy && self.enemy != e)
return false;
}
float WaypointSprite_Customize()
-{
+{SELFPARAM();
// this is not in SendEntity because it shall run every frame, not just every update
// make spectators see what the player would see
float WaypointSprite_SendEntity(entity to, float sendflags);
void WaypointSprite_Reset()
-{
+{SELFPARAM();
// if a WP wants to time out, let it time out immediately; other WPs ought to be reset/killed by their owners
if (self.fade_time) // there was there before: || g_keyhunt, do we really need this?
vector ofs,
float icon // initial icon
)
-{
+{SELFPARAM();
float t;
if (teamplay)
t = self.team;
vector ofs,
float icon // initial icon
)
-{
+{SELFPARAM();
return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, false, icon);
}
float limited_range,
float icon // initial icon
)
-{
+{SELFPARAM();
float t;
if (self.waypointsprite_attachedforcarrier)
return world; // can't attach to FC
}
void WaypointSprite_ClearPersonal()
-{
+{SELFPARAM();
WaypointSprite_Kill(self.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_PlayerDead()
-{
+{SELFPARAM();
WaypointSprite_Disown(self.waypointsprite_attached, waypointsprite_deadlifetime);
WaypointSprite_DetachCarrier(self);
}
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);