]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
battle royale: remove vehicle waypoint if vehicle gets destroyed
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Sat, 10 Jun 2023 00:11:58 +0000 (02:11 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Sat, 10 Jun 2023 00:11:58 +0000 (02:11 +0200)
qcsrc/common/vehicles/sv_vehicles.qc

index 76237339cb1ef128fe3728f5780f4a8d38b46d36..8893bcd3ecf5420e62778e6a17e8759c91deb9cf 100644 (file)
@@ -710,6 +710,9 @@ void vehicles_damage(entity this, entity inflictor, entity attacker, float damag
 
        if(GetResource(this, RES_HEALTH) <= 0)
        {
+               if(this.br_vehicle_drop && this.waypointsprite_attached)
+                       WaypointSprite_Kill(this.waypointsprite_attached);
+
                if(this.owner)
                {
                        if(this.vehicle_flags & VHF_DEATHEJECT)