QuakeServer.Extensions.Effects (quake_server v0.1.0)

Copy Markdown View Source

FTE's effect and sound builtins: named particle effects by number, effects at a point and along a trail, the te_ temporary effects, sounds at a point and with pitch, and sound numbers. Each becomes an event for the client (QuakeServer.Server.emit/2):

  • {:effect, name, %{origin:, direction:, count:}}
  • {:trail, name, %{entity:, from:, to:}}
  • {:temp, kind, map}, kind the effect's name without te_

sound (8) and pointsound (483) start sounds through QuakeServer.Sounds, with FTE's arguments: pitch in percent, flags and a start offset; under a QuakeWorld program without flags, channel bit 8 sends reliably and is taken out of the channel number.

Effect numbers are kept in the host's ext.effects, from 1 up, and reach the players as FTE's particle precaches (QuakeServer.Precaches). As FTE's PF_sv_pointparticles and PF_sv_trailparticles do, an effect with a number above 0 also goes to the players that may hear its point (QuakeServer.Multicast, unreliably): <<82, effect::little-16, origin>> (svcfte_pointparticles1) for one with count 1 and no direction, else <<81, effect::little-16, origin, direction, count::little-16>> (svcfte_pointparticles, count at most 65535); a trail as <<80, entity::little-16, effect::little-16, from, to>> (svcfte_trailparticles), its arguments taken in DarkPlaces' order (entity first) when the second is a non-zero number. Points are written as WriteCoord writes them.

getsoundindex(name) is the index of name in the server's sound list, adding it when it is not there, or 0 when the second argument is given and not 0 and the sound is not on the list.

Summary

Functions

Run effect builtin builtin (a number or a name).

The te_ builtin numbers.

Functions

call(s, number, argc)

@spec call(map(), integer() | String.t(), non_neg_integer()) :: map()

Run effect builtin builtin (a number or a name).

temps()

@spec temps() :: [integer()]

The te_ builtin numbers.