Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.inc
Go to the documentation of this file.
1#pragma once
2
3// Global list of sounds
4// TODO: remove uses of _sound
5
6#include "../teams.qh"
7string W_Sound(string w_snd);
8string Item_Sound(string it_snd);
9
10SOUND(DRYFIRE, W_Sound("dryfire"));
11SOUND(GRENADE_BOUNCE1, W_Sound("grenade_bounce1"));
12SOUND(GRENADE_BOUNCE2, W_Sound("grenade_bounce2"));
13SOUND(GRENADE_BOUNCE3, W_Sound("grenade_bounce3"));
14SOUND(GRENADE_BOUNCE4, W_Sound("grenade_bounce4"));
15SOUND(GRENADE_BOUNCE5, W_Sound("grenade_bounce5"));
16SOUND(GRENADE_BOUNCE6, W_Sound("grenade_bounce6"));
18 return REGISTRY_GET(Sounds, SND_GRENADE_BOUNCE1.m_id + rint(random() * 5));
19}
20
21SOUND(LASERIMPACT, W_Sound("laserimpact"));
22SOUND(NEXWHOOSH1, W_Sound("nexwhoosh1"));
23SOUND(NEXWHOOSH2, W_Sound("nexwhoosh2"));
24SOUND(NEXWHOOSH3, W_Sound("nexwhoosh3"));
26 return REGISTRY_GET(Sounds, SND_NEXWHOOSH1.m_id + rint(random() * 2));
27}
28SOUND(RELOAD, W_Sound("reload")); // until weapons have individual reload sounds, precache the reload sound here
29
30SOUND(RIC1, W_Sound("ric1"));
31SOUND(RIC2, W_Sound("ric2"));
32SOUND(RIC3, W_Sound("ric3"));
34 return REGISTRY_GET(Sounds, SND_RIC1.m_id + rint(random() * 2));
35}
36
37SOUND(ROCKET_IMPACT, W_Sound("rocket_impact")); // heavily used as a generic explosion sound
38SOUND(STRENGTH_FIRE, W_Sound("strength_fire"));
39SOUND(UNAVAILABLE, W_Sound("unavailable"));
40SOUND(WEAPONPICKUP, W_Sound("weaponpickup"));
41SOUND(WEAPONPICKUP_NEW_TOYS, W_Sound("weaponpickup_new_toys"));
42SOUND(WEAPON_SWITCH, W_Sound("weapon_switch"));
43
44SOUND(CTF_CAPTURE_NEUTRAL, "ctf/capture");
45SOUND(CTF_CAPTURE_RED, "ctf/red_capture");
46SOUND(CTF_CAPTURE_BLUE, "ctf/blue_capture");
47SOUND(CTF_CAPTURE_YELLOW, "ctf/yellow_capture");
48SOUND(CTF_CAPTURE_PINK, "ctf/pink_capture");
50 switch (teamid) {
51 case NUM_TEAM_1: return SND_CTF_CAPTURE_RED;
52 case NUM_TEAM_2: return SND_CTF_CAPTURE_BLUE;
53 case NUM_TEAM_3: return SND_CTF_CAPTURE_YELLOW;
54 case NUM_TEAM_4: return SND_CTF_CAPTURE_PINK;
55 default: return SND_CTF_CAPTURE_NEUTRAL;
56 }
57}
58
59SOUND(CTF_DROPPED_NEUTRAL, "ctf/neutral_dropped");
60SOUND(CTF_DROPPED_RED, "ctf/red_dropped");
61SOUND(CTF_DROPPED_BLUE, "ctf/blue_dropped");
62SOUND(CTF_DROPPED_YELLOW, "ctf/yellow_dropped");
63SOUND(CTF_DROPPED_PINK, "ctf/pink_dropped");
65 switch (teamid) {
66 case NUM_TEAM_1: return SND_CTF_DROPPED_RED;
67 case NUM_TEAM_2: return SND_CTF_DROPPED_BLUE;
68 case NUM_TEAM_3: return SND_CTF_DROPPED_YELLOW;
69 case NUM_TEAM_4: return SND_CTF_DROPPED_PINK;
70 default: return SND_CTF_DROPPED_NEUTRAL;
71 }
72}
73
74SOUND(CTF_PASS, "ctf/pass");
75SOUND(CTF_RESPAWN, "ctf/flag_respawn");
76
77SOUND(CTF_RETURNED_NEUTRAL, "ctf/return");
78SOUND(CTF_RETURNED_RED, "ctf/red_returned");
79SOUND(CTF_RETURNED_BLUE, "ctf/blue_returned");
80SOUND(CTF_RETURNED_YELLOW, "ctf/yellow_returned");
81SOUND(CTF_RETURNED_PINK, "ctf/pink_returned");
83 switch (teamid) {
84 case NUM_TEAM_1: return SND_CTF_RETURNED_RED;
85 case NUM_TEAM_2: return SND_CTF_RETURNED_BLUE;
86 case NUM_TEAM_3: return SND_CTF_RETURNED_YELLOW;
87 case NUM_TEAM_4: return SND_CTF_RETURNED_PINK;
88 default: return SND_CTF_RETURNED_NEUTRAL;
89 }
90}
91
92SOUND(CTF_TAKEN_NEUTRAL, "ctf/neutral_taken");
93SOUND(CTF_TAKEN_RED, "ctf/red_taken");
94SOUND(CTF_TAKEN_BLUE, "ctf/blue_taken");
95SOUND(CTF_TAKEN_YELLOW, "ctf/yellow_taken");
96SOUND(CTF_TAKEN_PINK, "ctf/pink_taken");
97Sound SND_CTF_TAKEN(int teamid) {
98 switch (teamid) {
99 case NUM_TEAM_1: return SND_CTF_TAKEN_RED;
100 case NUM_TEAM_2: return SND_CTF_TAKEN_BLUE;
101 case NUM_TEAM_3: return SND_CTF_TAKEN_YELLOW;
102 case NUM_TEAM_4: return SND_CTF_TAKEN_PINK;
103 default: return SND_CTF_TAKEN_NEUTRAL;
104 }
105}
106
107SOUND(CTF_TOUCH, "ctf/touch");
108
109SOUND(DOM_CLAIM, "domination/claim");
110
111SOUND(KA_DROPPED, "keepaway/dropped");
112SOUND(KA_PICKEDUP, "keepaway/pickedup");
113SOUND(KA_RESPAWN, "keepaway/respawn");
114SOUND(KA_TOUCH, "keepaway/touch");
115
116SOUND(KH_ALARM, "kh/alarm");
117SOUND(KH_CAPTURE, "kh/capture");
118SOUND(KH_COLLECT, "kh/collect");
119SOUND(KH_DESTROY, "kh/destroy");
120SOUND(KH_DROP, "kh/drop");
121
122SOUND(NB_BOUNCE, "nexball/bounce");
123SOUND(NB_DROP, "nexball/drop");
124SOUND(NB_SHOOT1, "nexball/shoot1");
125SOUND(NB_SHOOT2, "nexball/shoot2");
126SOUND(NB_STEAL, "nexball/steal");
127
128SOUND(ONS_CONTROLPOINT_BUILD, "onslaught/controlpoint_build");
129SOUND(ONS_CONTROLPOINT_BUILT, "onslaught/controlpoint_built");
130SOUND(ONS_CONTROLPOINT_UNDERATTACK, "onslaught/controlpoint_underattack");
131SOUND(ONS_DAMAGEBLOCKEDBYSHIELD, "onslaught/damageblockedbyshield");
132SOUND(ONS_ELECTRICITY_EXPLODE, "onslaught/electricity_explode");
133#define SND_ONS_GENERATOR_ALARM SND_KH_ALARM
134//SOUND(ONS_GENERATOR_ALARM, "kh/alarm"); // FIXME: unique sound
135SOUND(ONS_GENERATOR_DECAY, "onslaught/generator_decay");
136SOUND(ONS_GENERATOR_UNDERATTACK, "onslaught/generator_underattack");
137SOUND(ONS_GENERATOR_EXPLODE, W_Sound("grenade_impact"));
138SOUND(ONS_HIT1, "onslaught/ons_hit1");
139SOUND(ONS_HIT2, "onslaught/ons_hit2");
140SOUND(ONS_SPARK1, "onslaught/ons_spark1");
141SOUND(ONS_SPARK2, "onslaught/ons_spark2");
142SOUND(ONS_SHOCKWAVE, "onslaught/shockwave");
143
144SOUND(MON_GOLEM_LIGHTNING_IMPACT, W_Sound("electro_impact"));
145
146SOUND(FLACEXP1, W_Sound("hagexp1"));
147SOUND(FLACEXP2, W_Sound("hagexp2"));
148SOUND(FLACEXP3, W_Sound("hagexp3"));
150 return REGISTRY_GET(Sounds, SND_FLACEXP1.m_id + rint(random() * 2));
151}
152SOUND(TUR_PHASER, "turrets/phaser");
153SOUND(TUR_PLASMA_IMPACT, W_Sound("electro_impact"));
154SOUND(TUR_WALKER_FIRE, W_Sound("hagar_fire"));
155
156SOUND(VEH_ALARM, "vehicles/alarm");
157SOUND(VEH_ALARM_SHIELD, "vehicles/alarm_shield");
158SOUND(VEH_MISSILE_ALARM, "vehicles/missile_alarm");
159
160SOUND(VEH_BUMBLEBEE_FIRE, W_Sound("flacexp3"));
161SOUND(VEH_BUMBLEBEE_IMPACT, W_Sound("fireball_impact2"));
162
163SOUND(VEH_RACER_BOOST, "vehicles/racer_boost");
164SOUND(VEH_RACER_IDLE, "vehicles/racer_idle");
165SOUND(VEH_RACER_MOVE, "vehicles/racer_move");
166SOUND(VEH_RACER_ROCKET_FLY, W_Sound("tag_rocket_fly"));
167
168SOUND(VEH_RAPTOR_FLY, "vehicles/raptor_fly");
169SOUND(VEH_RAPTOR_SPEED, "vehicles/raptor_speed");
170
171SOUND(VEH_SPIDERBOT_DIE, "vehicles/spiderbot_die");
172SOUND(VEH_SPIDERBOT_IDLE, "vehicles/spiderbot_idle");
173SOUND(VEH_SPIDERBOT_JUMP, "vehicles/spiderbot_jump");
174SOUND(VEH_SPIDERBOT_LAND, "vehicles/spiderbot_land");
175SOUND(VEH_SPIDERBOT_STRAFE, "vehicles/spiderbot_strafe");
176SOUND(VEH_SPIDERBOT_WALK, "vehicles/spiderbot_walk");
177SOUND(VEH_SPIDERBOT_MINIGUN_FIRE, W_Sound("uzi_fire"));
178SOUND(VEH_SPIDERBOT_ROCKET_FLY, W_Sound("tag_rocket_fly"));
179SOUND(VEH_SPIDERBOT_ROCKET_FIRE, W_Sound("rocket_fire"));
180
181SOUND(NADE_BEEP, "overkill/grenadebip");
182 // FIXME: unique sounds
183#define SND_NADE_BONUS SND_KH_ALARM
184//SOUND(NADE_BONUS, "kh/alarm");
185#define SND_NADE_NAPALM_FIRE SND_FIREBALL_FIRE
186//SOUND(NADE_NAPALM_FIRE, W_Sound("fireball_fire"));
187#define SND_NADE_NAPALM_FLY SND_FIREBALL_FLY2
188//SOUND(NADE_NAPALM_FLY, W_Sound("fireball_fly2"));
189
190SOUND(BUFF_LOST, "relics/relic_effect");
191
192SOUND(POWEROFF, Item_Sound("poweroff"));
193SOUND(POWERUP, Item_Sound("powerup"));
194SOUND(SHIELD_RESPAWN, Item_Sound("shield_respawn"));
195SOUND(STRENGTH_RESPAWN, Item_Sound("strength_respawn"));
196
197SOUND(ARMOR25, Item_Sound("armor25"));
198SOUND(ARMORIMPACT, "misc/armorimpact");
199SOUND(BODYIMPACT1, "misc/bodyimpact1");
200SOUND(BODYIMPACT2, "misc/bodyimpact2");
201
202SOUND(ITEMPICKUP, Item_Sound("itempickup"));
203SOUND(ITEMRESPAWNCOUNTDOWN, Item_Sound("itemrespawncountdown"));
204SOUND(ITEMRESPAWN, Item_Sound("itemrespawn"));
205SOUND(MEGAHEALTH, Item_Sound("megahealth"));
206
207SOUND(LAVA, "player/lava");
208SOUND(SLIME, "player/slime");
209
210SOUND(GIB, "misc/gib");
211SOUND(GIB_SPLAT01, "misc/gib_splat01");
212SOUND(GIB_SPLAT02, "misc/gib_splat02");
213SOUND(GIB_SPLAT03, "misc/gib_splat03");
214SOUND(GIB_SPLAT04, "misc/gib_splat04");
216 return REGISTRY_GET(Sounds, SND_GIB_SPLAT01.m_id + floor(prandom() * 4));
217}
218
219SOUND(HIT, "misc/hit");
220SOUND(TYPEHIT, "misc/typehit");
221SOUND(KILL, "misc/kill");
222
223SOUND(SPAWN, "misc/spawn");
224
225SOUND(TALK, "misc/talk");
226SOUND(TALK2, "misc/talk2");
227
228SOUND(BLIND, "misc/blind");
229SOUND(TELEPORT, "misc/teleport");
230SOUND(INVSHOT, "misc/invshot");
231SOUND(JETPACK_FLY, "misc/jetpack_fly");
float random(void)
float rint(float f)
float floor(float f)
float prandom()
Predictable random number generator (not seeded yet)
Definition random.qc:108
#define REGISTRY_GET(id, i)
Definition registry.qh:43
Sound SND_GRENADE_BOUNCE_RANDOM()
Definition all.inc:17
Sound SND_RIC_RANDOM()
Definition all.inc:33
Sound SND_CTF_DROPPED(int teamid)
Definition all.inc:64
Sound SND_GIB_SPLAT_RANDOM()
Definition all.inc:215
Sound SND_NEXWHOOSH_RANDOM()
Definition all.inc:25
Sound SND_CTF_TAKEN(int teamid)
Definition all.inc:97
string W_Sound(string w_snd)
Definition all.qc:225
string Item_Sound(string it_snd)
Definition all.qc:18
Sound SND_CTF_RETURNED(int teamid)
Definition all.inc:82
Sound SND_CTF_CAPTURE(int teamid)
Definition all.inc:49
Sound SND_FLACEXP_RANDOM()
Definition all.inc:149
#define SOUND(name, path)
Definition all.qh:30
const int NUM_TEAM_2
Definition teams.qh:14
const int NUM_TEAM_4
Definition teams.qh:16
const int NUM_TEAM_3
Definition teams.qh:15
const int NUM_TEAM_1
Definition teams.qh:13