Xonotic
all.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "sound.qh"
4 
5 #ifdef SVQC
6 void soundat(entity e, vector o, float chan, string samp, float vol, float _atten);
7 
8 void stopsoundto(float _dest, entity e, float chan);
9 
10 void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten, float _pitch);
11 
12 bool sound_allowed(int dest, entity e);
13 
14 float spamsound(entity e, float chan, Sound samp, float vol, float _atten);
15 
16 void play2(entity e, string filename);
17 
18 void play2all(string samp);
19 
20 void play2team(float t, string filename);
21 
22 void soundto(float dest, entity e, float chan, string samp, float vol, float atten, float _pitch);
23 
24 void stopsound(entity e, float chan);
25 #endif
26 
27 REGISTRY(Sounds, BITS(9))
28 REGISTER_REGISTRY(Sounds)
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 
37 PRECACHE(Sounds) {
38  FOREACH(Sounds, true, it.sound_precache(it));
39 }
40 
41 SOUND(Null, "misc/null");
42 REGISTRY_DEFINE_GET(Sounds, SND_Null)
43 #include "all.inc"
44 #include "all.qc"
REGISTRY(Weapons, 72) STATIC_INIT(WeaponPickup)
Definition: all.qh:28
PRECACHE(Models)
Definition: all.qh:17
vector dest
Definition: jumppads.qh:41
entity() spawn
float atten
Definition: triggers.qh:47
#define REGISTER_REGISTRY(id)
Definition: registry.qh:212
#define REGISTRY_DEFINE_GET(id, null)
Definition: registry.qh:40
Definition: sound.qh:119
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define SOUND(name, path)
Definition: all.qh:30
#define FOREACH(list, cond, body)
Definition: iter.qh:19
#define BITS(n)
Definition: bits.qh:9