QuakeServer.Contents (quake_server v0.1.0)

Copy Markdown View Source

FTE's contents as bits (bspfile.h), and the translation from the codes Quake and Half-Life maps store (Q1BSP_TranslateContents, and the contents a brush entity's negative skin forces on all of its brushes).

QuakeServer.Contents.of_code(-16)
#=> QuakeServer.Contents.bit(:ladder)

Half-Life's currents are water with a current bit; its translucent contents are empty; its clip brushes are player and monster clip.

Summary

Functions

The bit of contents name.

Water, slime, lava and sky: what Quake's code counts as a fluid.

Whether bits hold a fluid.

Quake's code for fluid bits: lava, slime, water, or sky for any other fluid.

The bits a brush entity's negative skin forces on every brush of its model; 0 for a skin that forces nothing.

Darkplaces contents bits (dphitcontentsmask) as FTE's.

Whether bits hold contents name.

The bits of contents code code a map's hull stores (Q1BSP_TranslateContents).

The bits a hull trace gives the leaf contents code code (q1toftecontents): clip is player clip alone, Half-Life's translucent contents are window, its currents are the current bits without water. A code below -16 counts as solid.

Quake's code for bits as the pointcontents builtin gives it: solid, sky, lava, slime, water, ladder or empty, the first held.

FTE contents bits as Darkplaces'.

Quake's code for bits as a program's watertype reads it: lava, slime, water or empty.

Functions

bit(name)

@spec bit(atom()) :: non_neg_integer()

The bit of contents name.

fluid()

@spec fluid() :: non_neg_integer()

Water, slime, lava and sky: what Quake's code counts as a fluid.

fluid?(bits)

@spec fluid?(non_neg_integer()) :: boolean()

Whether bits hold a fluid.

fluid_code(bits)

@spec fluid_code(non_neg_integer()) :: integer()

Quake's code for fluid bits: lava, slime, water, or sky for any other fluid.

forced(skin)

@spec forced(integer()) :: non_neg_integer()

The bits a brush entity's negative skin forces on every brush of its model; 0 for a skin that forces nothing.

from_dp(dp)

@spec from_dp(non_neg_integer()) :: non_neg_integer()

Darkplaces contents bits (dphitcontentsmask) as FTE's.

has?(bits, name)

@spec has?(non_neg_integer(), atom()) :: boolean()

Whether bits hold contents name.

of_code(arg1)

@spec of_code(integer()) :: non_neg_integer()

The bits of contents code code a map's hull stores (Q1BSP_TranslateContents).

of_leaf(code)

@spec of_leaf(integer()) :: non_neg_integer()

The bits a hull trace gives the leaf contents code code (q1toftecontents): clip is player clip alone, Half-Life's translucent contents are window, its currents are the current bits without water. A code below -16 counts as solid.

point_code(bits)

@spec point_code(non_neg_integer()) :: integer()

Quake's code for bits as the pointcontents builtin gives it: solid, sky, lava, slime, water, ladder or empty, the first held.

to_dp(bits)

@spec to_dp(non_neg_integer()) :: non_neg_integer()

FTE contents bits as Darkplaces'.

water_code(bits)

@spec water_code(non_neg_integer()) :: integer()

Quake's code for bits as a program's watertype reads it: lava, slime, water or empty.