# WeaponBullets record

> Bullets a weapon fires through IWeaponHolder.Fire.

Namespace `EvilEngine.Api.Weapons`, assembly `EvilEngine.Api`. Engine commit 4ff877b1.

```csharp
public sealed record WeaponBullets
```

Bullets a weapon fires through [IWeaponHolder.Fire](/docs/api/iweaponholder#fire).

```csharp
holder.Fire(new WeaponBullets(1, 0.0087, holder.Record?.Damage ?? 0, 668 * WeaponBullets.Unit) { TracerEvery = 2 });
```

## Members

### WeaponBullets (constructor)

```csharp
public WeaponBullets(int Count, double Spread, double Damage, double Impulse)
```

How many pellets, the cone's spread as the sine of its half angle, each pellet's damage and the impulse each pushes a prop with, in kg·m/s.

### Unit (field)

```csharp
public const double Unit = 0.0254
```

One Source unit in metres, 0.0254, for weapons whose numbers are Source's.

### MostPellets (field)

```csharp
public const int MostPellets = 100
```

The most pellets one shot fires, 100. Half-Life 2's shotgun fires 7, or 12 on its double blast.

### Count (property)

```csharp
public int Count { get; init; }
```

How many pellets fire at once, from 1 to [MostPellets](#mostpellets). Fewer than 1 fires 1, and more than `MostPellets` throws `ArgumentOutOfRangeException`.

### Spread (property)

```csharp
public double Spread { get; init; }
```

The sine of the cone's half angle: 0.0087 is a 1° cone.

### Damage (property)

```csharp
public double Damage { get; init; }
```

Each pellet's damage.

### Impulse (property)

```csharp
public double Impulse { get; init; }
```

The push each pellet gives what it hits, along its direction.

### Distance (property)

```csharp
public double Distance { get; init; }
```

How far each pellet reaches, 56,756 units by default.

### TracerEvery (property)

```csharp
public int TracerEvery { get; init; }
```

A tracer every so many pellets this body fires, or none at 0.

### PersonDamage (property)

```csharp
public double? PersonDamage { get; init; }
```

Each pellet's damage to a person, where it differs from what it does to props, or `null` for [Damage](#damage).

### Tracer (property)

```csharp
public ContentId? Tracer { get; init; }
```

A `tracer` record these bullets draw in place of the weapon's, or `null` for the weapon's own.

### Impact (property)

```csharp
public ContentId? Impact { get; init; }
```

An `effect` record played where each pellet hits in place of the weapon's impact, or `null` for the weapon's own, then the surface's.

### Muzzle (property)

```csharp
public ContentId? Muzzle { get; init; }
```

An `effect` record flashed at the muzzle in place of the weapon's, or `null` for the weapon's own. Naming one also flashes it in first person when the view model's own events would have.

### Decal (property)

```csharp
public ContentId? Decal { get; init; }
```

A `decal` record each pellet leaves where it hits in place of the struck surface's `decals.bullet`, or `null` for the surface's own. The server picks one of its pictures and every player sees the same (see `Scopes/Decals.md`).
