]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also add the extra args to WaypointSprite_DeployFixed
authorRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:23:37 +0000 (19:23 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:23:37 +0000 (19:23 +0200)
qcsrc/server/cl_impulse.qc
qcsrc/server/waypointsprites.qc

index 8ce1cec132695d169f893767d681385de3ac8277..968a5e9ff4eb70b80fcaf5a28f95f599349c201a 100644 (file)
@@ -179,64 +179,46 @@ void ImpulseCommands (void)
                                }
                                break;
                        case 34:
-                               wp = WaypointSprite_DeployFixed("here", FALSE, self.origin);
+                               wp = WaypointSprite_DeployFixed("here", FALSE, self.origin, RADARICON_HERE, '0 1 0');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_HERE, '0 1 0');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "HERE spawned at location\n");
                                break;
                        case 35:
                                WarpZone_crosshair_trace(self);
-                               wp = WaypointSprite_DeployFixed("here", FALSE, trace_endpos);
+                               wp = WaypointSprite_DeployFixed("here", FALSE, trace_endpos, RADARICON_HERE, '0 1 0');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_HERE, '0 1 0');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "HERE spawned at crosshair\n");
                                break;
                        case 36:
                                if(vlen(self.death_origin))
                                {
-                                       wp = WaypointSprite_DeployFixed("here", FALSE, self.death_origin);
+                                       wp = WaypointSprite_DeployFixed("here", FALSE, self.death_origin, RADARICON_HERE, '0 1 0');
                                        if(wp)
-                                       {
-                                               WaypointSprite_UpdateTeamRadar(wp, RADARICON_HERE, '0 1 0');
                                                WaypointSprite_Ping(wp);
-                                       }
                                        sprint(self, "HERE spawned at death location\n");
                                }
                                break;
                        case 37:
-                               wp = WaypointSprite_DeployFixed("danger", FALSE, self.origin);
+                               wp = WaypointSprite_DeployFixed("danger", FALSE, self.origin, RADARICON_DANGER, '1 0.5 0');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_DANGER, '1 0.5 0');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "DANGER spawned at location\n");
                                break;
                        case 38:
                                WarpZone_crosshair_trace(self);
-                               wp = WaypointSprite_DeployFixed("danger", FALSE, trace_endpos);
+                               wp = WaypointSprite_DeployFixed("danger", FALSE, trace_endpos, RADARICON_DANGER, '1 0.5 0');
                                if(wp)
-                               {
-                                       WaypointSprite_UpdateTeamRadar(wp, RADARICON_DANGER, '1 0.5 0');
                                        WaypointSprite_Ping(wp);
-                               }
                                sprint(self, "DANGER spawned at crosshair\n");
                                break;
                        case 39:
                                if(vlen(self.death_origin))
                                {
-                                       wp = WaypointSprite_DeployFixed("danger", FALSE, self.death_origin);
+                                       wp = WaypointSprite_DeployFixed("danger", FALSE, self.death_origin, RADARICON_DANGER, '1 0.5 0');
                                        if(wp)
-                                       {
-                                               WaypointSprite_UpdateTeamRadar(wp, RADARICON_DANGER, '1 0.5 0');
                                                WaypointSprite_Ping(wp);
-                                       }
                                        sprint(self, "DANGER spawned at death location\n");
                                }
                                break;
index e794c29d33ca0ba8c9e7c36b6490e5b975274245..c1e3b0ee60c7707ff880a0d6c4644ff39bf8e500 100644 (file)
@@ -354,7 +354,8 @@ entity WaypointSprite_SpawnFixed(
 entity WaypointSprite_DeployFixed(
        string spr,
        float limited_range,
-       vector ofs
+       vector ofs,
+       float icon, vector rgb // initial icon and color
 )
 {
        float t, maxdistance;
@@ -366,7 +367,7 @@ entity WaypointSprite_DeployFixed(
                maxdistance = waypointsprite_limitedrange;
        else
                maxdistance = 0;
-       return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, self, waypointsprite_deployed_fixed, FALSE, RADARICON_NONE, '0 0 0');
+       return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, self, waypointsprite_deployed_fixed, FALSE, icon, rgb);
 }
 
 .entity waypointsprite_deployed_personal;