]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Same for WaypointSprite_DeployPersonal()
authorRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:44:50 +0000 (19:44 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:44:50 +0000 (19:44 +0200)
qcsrc/server/cl_impulse.qc
qcsrc/server/waypointsprites.qc

index 968a5e9ff4eb70b80fcaf5a28f95f599349c201a..c78012bb8703710cdd3c42bf6e0da059c98f855f 100644 (file)
@@ -135,33 +135,24 @@ void ImpulseCommands (void)
                switch(imp)
                {
                        case 30:
-                               wp = WaypointSprite_DeployPersonal("waypoint", self.origin);
+                               wp = WaypointSprite_DeployPersonal("waypoint", self.origin, RADARICON_WAYPOINT, '0 1 1');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_WAYPOINT, '0 1 1');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "personal waypoint spawned at location\n");
                                break;
                        case 31:
                                WarpZone_crosshair_trace(self);
-                               wp = WaypointSprite_DeployPersonal("waypoint", trace_endpos);
+                               wp = WaypointSprite_DeployPersonal("waypoint", trace_endpos, RADARICON_WAYPOINT, '0 1 1');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_WAYPOINT, '0 1 1');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "personal waypoint spawned at crosshair\n");
                                break;
                        case 32:
                                if(vlen(self.death_origin))
                                {
-                                       wp = WaypointSprite_DeployPersonal("waypoint", self.death_origin);
+                                       wp = WaypointSprite_DeployPersonal("waypoint", self.death_origin, RADARICON_WAYPOINT, '0 1 1');
                                        if(wp)
-                                       {
-                                               WaypointSprite_UpdateTeamRadar(wp, RADARICON_WAYPOINT, '0 1 1');
                                                WaypointSprite_Ping(wp);
-                                       }
                                        sprint(self, "personal waypoint spawned at death location\n");
                                }
                                break;
index c1e3b0ee60c7707ff880a0d6c4644ff39bf8e500..2b980523e3f8a4d2521fbed58d122b20816b8e4c 100644 (file)
@@ -373,10 +373,11 @@ entity WaypointSprite_DeployFixed(
 .entity waypointsprite_deployed_personal;
 entity WaypointSprite_DeployPersonal(
        string spr,
-       vector ofs
+       vector ofs,
+       float icon, vector rgb // initial icon and color
 )
 {
-       return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, FALSE, 0, '0 0 0');
+       return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, FALSE, icon, rgb);
 }
 
 .entity waypointsprite_attached;