]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/sv_vehicles.qc
Create waypoint definitions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / sv_vehicles.qc
index 79f59018d218dd937e86aaa58e1124598b8c5122..17e1d7388d0eac54e425a589ac3d0fbed6c12770 100644 (file)
@@ -529,7 +529,8 @@ void vehicles_showwp()
                rgb = Team_ColorRGB(self.team);
        else
                rgb = '1 1 1';
-       WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP, rgb);
+       entity wp = WaypointSprite_Spawn(WP_Vehicle, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP);
+       wp.colormod = rgb;
        if(self.waypointsprite_attached)
        {
                WaypointSprite_UpdateRule(self.waypointsprite_attached, self.wp00.team, SPRITERULE_DEFAULT);
@@ -1023,8 +1024,10 @@ void vehicles_enter(entity pl, entity veh)
 
                Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_SELF);
 
-               if(autocvar_g_vehicles_steal_show_waypoint)
-                       WaypointSprite_Spawn("intruder", 0, 0, pl, '0 0 68', world, veh.team, veh, wps_intruder, true, RADARICON_DANGER, Team_ColorRGB(pl.team));
+               if (autocvar_g_vehicles_steal_show_waypoint) {
+                       entity wp = WaypointSprite_Spawn(WP_VehicleIntruder, 0, 0, pl, '0 0 68', world, veh.team, veh, wps_intruder, true, RADARICON_DANGER);
+                       wp.colormod = Team_ColorRGB(pl.team);
+               }
        }
        else return;
 
@@ -1123,10 +1126,10 @@ void vehicles_enter(entity pl, entity veh)
 void vehicles_think()
 {
        self.nextthink = time;
-       
+
        if(self.owner)
                self.owner.vehicle_weapon2mode = self.vehicle_weapon2mode;
-       
+
        VEH_ACTION(self.vehicleid, VR_THINK);
 
        CSQCMODEL_AUTOUPDATE();
@@ -1190,7 +1193,7 @@ bool vehicle_initialize(entity veh, bool nodrop)
 
        if(!veh.vehicleid)
                return false;
-       
+
        if(!veh.tur_head) { VEH_ACTION(veh.vehicleid, VR_PRECACHE); }
 
        if(self.targetname && self.targetname != "")