Beispiel #1
0
 // Token: 0x060033DE RID: 13278 RVA: 0x001512E4 File Offset: 0x0014F6E4
 public static void damage(InteractableVehicle vehicle, bool damageTires, Vector3 position, bool isRepairing, float vehicleDamage, float times, bool canRepair, out EPlayerKill kill)
 {
     kill = EPlayerKill.NONE;
     if (vehicle == null)
     {
         return;
     }
     if (isRepairing)
     {
         if (!vehicle.isExploded && !vehicle.isRepaired)
         {
             VehicleManager.repair(vehicle, vehicleDamage, times);
         }
     }
     else
     {
         if (!vehicle.isDead)
         {
             VehicleManager.damage(vehicle, vehicleDamage, times, canRepair);
         }
         if (damageTires && !vehicle.isExploded)
         {
             int hitTireIndex = vehicle.getHitTireIndex(position);
             if (hitTireIndex != -1)
             {
                 vehicle.askDamageTire(hitTireIndex);
             }
         }
     }
 }