Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh
Go to the documentation of this file.
1#pragma once
2
3#include "sound.qh"
4
5#ifdef SVQC
6void soundat(entity e, vector o, float chan, string samp, float vol, float _atten);
7
8void stopsoundto(float _dest, entity e, float chan);
9
10void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten, float _pitch);
11
12bool sound_allowed(int dest, entity e);
13
14float spamsound(entity e, float chan, Sound samp, float vol, float _atten);
15
16void play2(entity e, string filename);
17
18void play2all(string samp);
19
20void play2team(float t, string filename);
21
22void soundto(float dest, entity e, float chan, string samp, float vol, float atten, float _pitch);
23
24void stopsound(entity e, float chan);
25#endif
26
27REGISTRY(Sounds, BITS(9))
29
30#define SOUND(name, path) \
31 string SND_##name##_get() { return path; } \
32 REGISTER(Sounds, SND, name, m_id, NEW(Sound, SND_##name##_get))
33
35#define SND(id) Sound_fixpath(SND_##id)
36
37PRECACHE(Sounds) {
38 FOREACH(Sounds, true, it.sound_precache(it));
39}
40
41SOUND(Null, "misc/null");
42REGISTRY_DEFINE_GET(Sounds, SND_Null)
43#include "all.inc"
44#include "all.qc"
#define BITS(n)
Definition bits.qh:9
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define FOREACH(list, cond, body)
Definition iter.qh:19
vector dest
Definition jumppads.qh:54
#define REGISTER_REGISTRY(id)
Definition registry.qh:229
#define REGISTRY(id, max)
Declare a new registry.
Definition registry.qh:26
#define REGISTRY_DEFINE_GET(id, null)
Definition registry.qh:40
vector
Definition self.qh:92
void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten, float _pitch)
void play2(entity e, string filename)
Definition all.qc:116
void play2team(float t, string filename)
Definition all.qc:136
void stopsoundto(float _dest, entity e, float chan)
void soundat(entity e, vector o, float chan, string samp, float vol, float _atten)
bool sound_allowed(int dest, entity e)
Definition all.qc:9
void play2all(string samp)
Definition all.qc:142
void stopsound(entity e, float chan)
#define SOUND(name, path)
Definition all.qh:30
float spamsound(entity e, float chan, Sound samp, float vol, float _atten)
void soundto(float dest, entity e, float chan, string samp, float vol, float atten, float _pitch)
#define PRECACHE(func)
directly after STATIC_INIT_LATE
Definition static.qh:42
float atten
Definition triggers.qh:47