Skip to content
EvilEngine.Formats.Records

WeaponWorldModel record

public sealed record WeaponWorldModel

The model everyone else sees in a weapon holder’s hand, and the holder sees in third person: a record’s worldmodel, either a model id or a table of model, bone, offset, angles, skin and body (In other people’s hands).

With no Bone, a model that shares any bone with the holder’s body by name, as Garry’s Mod’s w_ models share ValveBiped.Bip01_R_Hand, is merged onto those bones and sits as its game holds it. Any other model sits on a bone of the body, Hand unless set, placed by Offset and Angles. A body without that bone warns once and the model stays at its feet.

worldmodel = { model = "blaster:models/blaster", bone = "RightHand", offset = [0.02, 0.08, 0.03], angles = [0, 0, 90] }
Assembly
EvilEngine.Formats
Commit
4ff877b1

Members

WeaponWorldModel constructor

public WeaponWorldModel(ContentId Model)

Makes a world model of model, placed by bone merging or on Hand, with the model’s own skin and body groups.

Hand field

public const string Hand = "RightHand"

"RightHand", the humanoid bone a model that isn’t merged sits on when Bone is null.

Model property

public ContentId Model { get; init; }

The model drawn, from model, or the whole value when worldmodel is a plain id.

Bone property

public string? Bone { get; init; }

The bone the model sits on, from bone: a humanoid bone’s name such as RightHand, LeftHand or Chest, or one of the body’s own. null merges a model that shares bones with the body, and puts any other on Hand. It can’t be empty.

Offset property

public MapVector Offset { get; init; }

Where the model sits from its bone, from offset, in metres in the bone’s own space. Zero unless set. Unused when the model is merged.

Angles property

public MapVector Angles { get; init; }

How the model is turned on its bone, from angles, as three angles in degrees about the bone’s own X, Y and Z axes. Zero unless set. Unused when the model is merged. A bone’s own space differs from rig to rig, so place a model on the bodies your players wear.

Skin property

public int? Skin { get; init; }

The model’s skin, from skin, a whole number from 0 up, or null for 0.

Body property

public string? Body { get; init; }

The model’s body group choices, from body, as a string of one digit a group, "01" for the second choice of the second group. null, or a group past the string’s end, takes the group’s first choice.

Plain property

public bool Plain { get; }

Whether only Model is set, so the record writes it back as a plain id.