Xonotic
all.inc
Go to the documentation of this file.
1 #pragma once
2 // Global list of effects, networked to CSQC by ID to save bandwidth and to use client particle numbers (allows mismatching effectinfos to some degree)
3 // Not too concerned about the order of this list, just keep the weapon effects together!
4 
5 #include "../teams.qh"
6 
7 // EFFECT(istrail, EFFECT_NAME, "effectinfo_string")
8 EFFECT(0, EXPLOSION_SMALL, "explosion_small")
9 EFFECT(0, EXPLOSION_MEDIUM, "explosion_medium")
10 EFFECT(0, EXPLOSION_BIG, "explosion_big")
11 
12 EFFECT(0, SMOKE_SMALL, "smoke_small")
13 EFFECT(0, SMOKE_LARGE, "smoke_large")
14 
15 
16 EFFECT(0, ARC_MUZZLEFLASH, "electro_muzzleflash")
17 
18 EFFECT(0, BLASTER_IMPACT, "laser_impact")
19 EFFECT(0, BLASTER_MUZZLEFLASH, "laser_muzzleflash")
20 
21 EFFECT(0, SHOTGUN_IMPACT, "shotgun_impact")
22 EFFECT(0, SHOTGUN_MUZZLEFLASH, "shotgun_muzzleflash")
23 
24 EFFECT(0, ARC_BEAM, "arc_beam")
25 EFFECT(0, ARC_BEAM_HEAL, "arc_beam_heal")
26 EFFECT(0, ARC_BEAM_HEAL_IMPACT, "arc_beam_healimpact")
27 EFFECT(0, ARC_BEAM_HEAL_IMPACT2, "healray_impact")
28 // TODO: effect needs updating
29 //EFFECT(0, ARC_BOLT_EXPLODE, "arc_bolt_explode")
30 EFFECT(0, ARC_OVERHEAT, "arc_overheat")
31 EFFECT(0, ARC_OVERHEAT_FIRE, "arc_overheat_fire")
32 EFFECT(0, ARC_SMOKE, "arc_smoke")
33 EFFECT(0, ARC_LIGHTNING, "arc_lightning")
34 EFFECT(0, ARC_LIGHTNING2, "electro_lightning")
35 
36 EFFECT(0, MACHINEGUN_IMPACT, "machinegun_impact")
37 EFFECT(0, MACHINEGUN_MUZZLEFLASH, "uzi_muzzleflash")
38 
39 EFFECT(0, GRENADE_EXPLODE, "grenade_explode")
40 EFFECT(0, GRENADE_MUZZLEFLASH, "grenadelauncher_muzzleflash")
41 
42 EFFECT(0, ELECTRO_BALLEXPLODE, "electro_ballexplode")
43 EFFECT(0, ELECTRO_COMBO, "electro_combo")
44 EFFECT(0, ELECTRO_IMPACT, "electro_impact")
45 EFFECT(0, ELECTRO_MUZZLEFLASH, "electro_muzzleflash")
46 
47 EFFECT(0, CRYLINK_IMPACT, "crylink_impactbig")
48 EFFECT(0, CRYLINK_IMPACT2, "crylink_impact")
49 EFFECT(0, CRYLINK_JOINEXPLODE, "crylink_joinexplode")
50 EFFECT(0, CRYLINK_MUZZLEFLASH, "crylink_muzzleflash")
51 
52 EFFECT(0, VORTEX_BEAM, "nex_beam")
53 EFFECT(0, VORTEX_BEAM_OLD, "TE_TEI_G3")
54 EFFECT(0, VORTEX_IMPACT, "nex_impact")
55 EFFECT(0, VORTEX_MUZZLEFLASH, "nex_muzzleflash")
56 
57 EFFECT(1, VAPORIZER_RED, "TE_TEI_G3RED")
58 EFFECT(1, VAPORIZER_HIT_RED, "TE_TEI_G3RED_HIT")
59 EFFECT(1, VAPORIZER_BLUE, "TE_TEI_G3BLUE")
60 EFFECT(1, VAPORIZER_HIT_BLUE, "TE_TEI_G3BLUE_HIT")
61 EFFECT(1, VAPORIZER_YELLOW, "TE_TEI_G3YELLOW")
62 EFFECT(1, VAPORIZER_HIT_YELLOW, "TE_TEI_G3YELLOW_HIT")
63 EFFECT(1, VAPORIZER_PINK, "TE_TEI_G3PINK")
64 EFFECT(1, VAPORIZER_HIT_PINK, "TE_TEI_G3PINK_HIT")
65 EFFECT(1, VAPORIZER_NEUTRAL, "TE_TEI_G3")
66 EFFECT(1, VAPORIZER_HIT_NEUTRAL, "TE_TEI_G3_HIT")
68 {
69  switch (teamid) {
70  case NUM_TEAM_1: return EFFECT_VAPORIZER_RED;
71  case NUM_TEAM_2: return EFFECT_VAPORIZER_BLUE;
72  case NUM_TEAM_3: return EFFECT_VAPORIZER_YELLOW;
73  case NUM_TEAM_4: return EFFECT_VAPORIZER_PINK;
74  default: return EFFECT_VAPORIZER_NEUTRAL;
75  }
76 }
78 {
79  switch (teamid) {
80  case NUM_TEAM_1: return EFFECT_VAPORIZER_HIT_RED;
81  case NUM_TEAM_2: return EFFECT_VAPORIZER_HIT_BLUE;
82  case NUM_TEAM_3: return EFFECT_VAPORIZER_HIT_YELLOW;
83  case NUM_TEAM_4: return EFFECT_VAPORIZER_HIT_PINK;
84  default: return EFFECT_VAPORIZER_HIT_NEUTRAL;
85  }
86 }
87 
88 EFFECT(0, RIFLE_IMPACT, "machinegun_impact")
89 EFFECT(0, RIFLE_MUZZLEFLASH, "rifle_muzzleflash")
90 EFFECT(1, RIFLE, "tr_rifle")
91 EFFECT(1, RIFLE_WEAK, "tr_rifle_weak")
92 
93 EFFECT(0, HAGAR_BOUNCE, "hagar_bounce")
94 EFFECT(0, HAGAR_EXPLODE, "hagar_explode")
95 EFFECT(0, HAGAR_MUZZLEFLASH, "hagar_muzzleflash")
96 EFFECT(1, HAGAR_ROCKET, "tr_hagar")
97 
98 EFFECT(0, ROCKET_EXPLODE, "rocket_explode")
99 EFFECT(0, ROCKET_GUIDE, "rocket_guide")
100 EFFECT(0, ROCKET_MUZZLEFLASH, "rocketlauncher_muzzleflash")
101 
102 EFFECT(0, HOOK_EXPLODE, "hookbomb_explode")
103 EFFECT(0, HOOK_IMPACT, "grapple_impact")
104 EFFECT(0, HOOK_MUZZLEFLASH, "grapple_muzzleflash")
105 
106 EFFECT(0, SEEKER_MUZZLEFLASH, "seeker_muzzleflash")
107 
108 EFFECT(1, FIREBALL, "fireball")
109 EFFECT(0, FIREBALL_BFGDAMAGE, "fireball_bfgdamage")
110 EFFECT(0, FIREBALL_EXPLODE, "fireball_explode")
111 EFFECT(0, FIREBALL_LASER, "fireball_laser")
112 EFFECT(0, FIREBALL_MUZZLEFLASH, "fireball_muzzleflash")
113 EFFECT(0, FIREBALL_PRE_MUZZLEFLASH, "fireball_preattack_muzzleflash")
114 
115 
116 
117 EFFECT(0, RAPTOR_CANNON_IMPACT, "raptor_cannon_impact")
118 EFFECT(0, RAPTOR_BOMB_IMPACT, "raptor_bomb_impact")
119 EFFECT(0, RAPTOR_BOMB_SPREAD, "raptor_bomb_spread")
120 EFFECT(0, RAPTOR_MUZZLEFLASH, "raptor_cannon_muzzleflash")
121 
122 EFFECT(0, RACER_BOOSTER, "wakizashi_booster_smoke")
123 EFFECT(0, RACER_IMPACT, "wakizashi_gun_impact")
124 EFFECT(0, RACER_MUZZLEFLASH, "wakizashi_gun_muzzleflash")
125 EFFECT(0, RACER_ROCKETLAUNCH, "wakizashi_rocket_launch")
126 EFFECT(0, RACER_ROCKET_EXPLODE, "wakizashi_rocket_explode")
127 EFFECT(1, RACER_ROCKET_TRAIL, "wakizashi_rocket_thrust")
128 
129 EFFECT(0, SPIDERBOT_ROCKETLAUNCH, "spiderbot_rocket_launch")
130 EFFECT(1, SPIDERBOT_ROCKET_TRAIL, "spiderbot_rocket_thrust")
131 EFFECT(0, SPIDERBOT_ROCKET_EXPLODE, "spiderbot_rocket_explode")
132 EFFECT(0, SPIDERBOT_MINIGUN_IMPACT, "spiderbot_minigun_impact")
133 EFFECT(0, SPIDERBOT_MINIGUN_MUZZLEFLASH, "spiderbot_minigun_muzzleflash")
134 
135 EFFECT(0, BUMBLEBEE_HEAL_MUZZLEFLASH, "healray_muzzleflash")
136 EFFECT(0, BUMBLEBEE_HEAL_IMPACT, "healray_impact")
137 
138 EFFECT(0, BIGPLASMA_IMPACT, "bigplasma_impact")
139 EFFECT(0, BIGPLASMA_MUZZLEFLASH, "bigplasma_muzzleflash")
140 
141 EFFECT(0, TELEPORT, "teleport")
142 
143 EFFECT(0, SPAWNPOINT_RED, "spawn_point_red")
144 EFFECT(0, SPAWNPOINT_BLUE, "spawn_point_blue")
145 EFFECT(0, SPAWNPOINT_YELLOW, "spawn_point_yellow")
146 EFFECT(0, SPAWNPOINT_PINK, "spawn_point_pink")
147 EFFECT(0, SPAWNPOINT_NEUTRAL, "spawn_point_neutral")
149 {
150  switch (teamid) {
151  case NUM_TEAM_1: return EFFECT_SPAWNPOINT_RED;
152  case NUM_TEAM_2: return EFFECT_SPAWNPOINT_BLUE;
153  case NUM_TEAM_3: return EFFECT_SPAWNPOINT_YELLOW;
154  case NUM_TEAM_4: return EFFECT_SPAWNPOINT_PINK;
155  default: return EFFECT_SPAWNPOINT_NEUTRAL;
156  }
157 }
158 
159 EFFECT(0, SPAWN_RED, "spawn_event_red")
160 EFFECT(0, SPAWN_BLUE, "spawn_event_blue")
161 EFFECT(0, SPAWN_YELLOW, "spawn_event_yellow")
162 EFFECT(0, SPAWN_PINK, "spawn_event_pink")
163 EFFECT(0, SPAWN_NEUTRAL, "spawn_event_neutral")
164 entity EFFECT_SPAWN(int teamid)
165 {
166  switch (teamid) {
167  case NUM_TEAM_1: return EFFECT_SPAWN_RED;
168  case NUM_TEAM_2: return EFFECT_SPAWN_BLUE;
169  case NUM_TEAM_3: return EFFECT_SPAWN_YELLOW;
170  case NUM_TEAM_4: return EFFECT_SPAWN_PINK;
171  default: return EFFECT_SPAWN_NEUTRAL;
172  }
173 }
174 
175 EFFECT(0, ICEORGLASS, "iceorglass")
176 EFFECT(0, ICEFIELD, "icefield")
177 EFFECT(0, FIREFIELD, "firefield")
178 EFFECT(0, HEALING, "healing_fx")
179 EFFECT(0, ARMOR_REPAIR, "armorrepair_fx")
180 EFFECT(0, AMMO_REGEN, "ammoregen_fx")
181 EFFECT(1, LASER_BEAM_FAST, "nex242_misc_laser_beam_fast")
182 EFFECT(0, RESPAWN_GHOST, "respawn_ghost")
183 
184 EFFECT(0, FLAG_TOUCH_RED, "redflag_touch")
185 EFFECT(0, FLAG_TOUCH_BLUE, "blueflag_touch")
186 EFFECT(0, FLAG_TOUCH_YELLOW, "yellowflag_touch")
187 EFFECT(0, FLAG_TOUCH_PINK, "pinkflag_touch")
188 EFFECT(0, FLAG_TOUCH_NEUTRAL, "neutralflag_touch")
190 {
191  switch (teamid) {
192  case NUM_TEAM_1: return EFFECT_FLAG_TOUCH_RED;
193  case NUM_TEAM_2: return EFFECT_FLAG_TOUCH_BLUE;
194  case NUM_TEAM_3: return EFFECT_FLAG_TOUCH_YELLOW;
195  case NUM_TEAM_4: return EFFECT_FLAG_TOUCH_PINK;
196  default: return EFFECT_FLAG_TOUCH_NEUTRAL;
197  }
198 }
199 
200 EFFECT(1, PASS_RED, "red_pass")
201 EFFECT(1, PASS_BLUE, "blue_pass")
202 EFFECT(1, PASS_YELLOW, "yellow_pass")
203 EFFECT(1, PASS_PINK, "pink_pass")
204 EFFECT(1, PASS_NEUTRAL, "neutral_pass")
205 entity EFFECT_PASS(int teamid)
206 {
207  switch (teamid) {
208  case NUM_TEAM_1: return EFFECT_PASS_RED;
209  case NUM_TEAM_2: return EFFECT_PASS_BLUE;
210  case NUM_TEAM_3: return EFFECT_PASS_YELLOW;
211  case NUM_TEAM_4: return EFFECT_PASS_PINK;
212  default: return EFFECT_PASS_NEUTRAL;
213  }
214 }
215 
216 EFFECT(0, CAP_RED, "red_cap")
217 EFFECT(0, CAP_BLUE, "blue_cap")
218 EFFECT(0, CAP_YELLOW, "yellow_cap")
219 EFFECT(0, CAP_PINK, "pink_cap")
220 EFFECT(0, CAP_NEUTRAL, "neutral_cap")
221 entity EFFECT_CAP(int teamid)
222 {
223  switch (teamid) {
224  case NUM_TEAM_1: return EFFECT_CAP_RED;
225  case NUM_TEAM_2: return EFFECT_CAP_BLUE;
226  case NUM_TEAM_3: return EFFECT_CAP_YELLOW;
227  case NUM_TEAM_4: return EFFECT_CAP_PINK;
228  default: return EFFECT_CAP_NEUTRAL;
229  }
230 }
231 
232 EFFECT(0, ITEM_PICKUP, "item_pickup")
233 EFFECT(0, ITEM_RESPAWN, "item_respawn")
234 
235 EFFECT(0, ONS_GENERATOR_DAMAGED, "torch_small")
236 EFFECT(0, ONS_GENERATOR_GIB, "onslaught_generator_gib_explode")
237 EFFECT(0, ONS_GENERATOR_EXPLODE, "onslaught_generator_smallexplosion")
238 EFFECT(0, ONS_GENERATOR_EXPLODE2, "onslaught_generator_finalexplosion")
239 
240 
241 
242 EFFECT(0, LASER_DEADLY, "laser_deadly")
243 EFFECT(1, FLAC_TRAIL, "TR_SEEKER")
244 EFFECT(1, SEEKER_TRAIL, "TR_SEEKER")
245 EFFECT(1, FIREMINE, "firemine")
246 EFFECT(0, BALL_SPARKS, "kaball_sparks")
247 EFFECT(0, ELECTRIC_SPARKS, "electricity_sparks")
248 EFFECT(0, SPARKS, "sparks")
249 EFFECT(0, RAGE, "rage")
250 EFFECT(0, SMOKING, "smoking")
251 EFFECT(0, SMOKE_RING, "smoke_ring")
252 EFFECT(0, JUMPPAD, "jumppad_activate")
253 EFFECT(1, BULLET, "tr_bullet")
254 EFFECT(1, BULLET_WEAK, "tr_bullet_weak")
255 EFFECT(0, EF_FLAME, "EF_FLAME")
256 EFFECT(0, EF_STARDUST, "EF_STARDUST")
257 EFFECT(0, TE_EXPLOSION, "TE_EXPLOSION")
258 EFFECT(1, TR_NEXUIZPLASMA, "TR_NEXUIZPLASMA")
259 EFFECT(1, TR_CRYLINKPLASMA, "TR_CRYLINKPLASMA")
260 EFFECT(1, TR_ROCKET, "TR_ROCKET")
261 EFFECT(1, TR_GRENADE, "TR_GRENADE")
262 EFFECT(1, TR_BLOOD, "TR_BLOOD")
263 EFFECT(1, TR_WIZSPIKE, "TR_WIZSPIKE")
264 EFFECT(1, TR_SLIGHTBLOOD, "TR_SLIGHTBLOOD")
265 EFFECT(1, TR_KNIGHTSPIKE, "TR_KNIGHTSPIKE")
266 EFFECT(1, TR_VORESPIKE, "TR_VORESPIKE")
267 EFFECT(0, TE_SPARK, "TE_SPARK")
268 
269 EFFECT(1, ROCKETMINSTA_LASER_RED, "rocketminsta_laser_red")
270 EFFECT(1, ROCKETMINSTA_LASER_BLUE, "rocketminsta_laser_blue")
271 EFFECT(1, ROCKETMINSTA_LASER_YELLOW, "rocketminsta_laser_yellow")
272 EFFECT(1, ROCKETMINSTA_LASER_PINK, "rocketminsta_laser_pink")
273 EFFECT(1, ROCKETMINSTA_LASER_NEUTRAL, "rocketminsta_laser_neutral")
275 {
276  entity e;
277  switch (teamid) {
278  case NUM_TEAM_1: e = EFFECT_ROCKETMINSTA_LASER_RED; break;
279  case NUM_TEAM_2: e = EFFECT_ROCKETMINSTA_LASER_BLUE; break;
280  case NUM_TEAM_3: e = EFFECT_ROCKETMINSTA_LASER_YELLOW; break;
281  case NUM_TEAM_4: e = EFFECT_ROCKETMINSTA_LASER_PINK; break;
282  default: e = EFFECT_ROCKETMINSTA_LASER_NEUTRAL; break;
283  }
284  if (particleeffectnum(e) < 0 || !Team_IsValidTeam(teamid)) { e = EFFECT_TR_NEXUIZPLASMA; }
285  return e;
286 }
entity EFFECT_SPAWN(int teamid)
Definition: all.inc:164
entity EFFECT_SPAWNPOINT(int teamid)
Definition: all.inc:148
const int NUM_TEAM_2
Definition: teams.qh:19
entity EFFECT_VAPORIZER_HIT(int teamid)
Definition: all.inc:77
const float EF_FLAME
Definition: csprogsdefs.qc:302
entity() spawn
entity EFFECT_ROCKETMINSTA_LASER(int teamid)
Definition: all.inc:274
entity EFFECT_PASS(int teamid)
Definition: all.inc:205
#define TE_TEI_G3(name, colormin1, colormax1, colormin2, colormax2)
#define EFFECT(istrail, name, realname)
Definition: all.qh:14
const int NUM_TEAM_4
Definition: teams.qh:21
entity EFFECT_FLAG_TOUCH(int teamid)
Definition: all.inc:189
const int NUM_TEAM_1
Definition: teams.qh:18
const float TE_EXPLOSION
Definition: csprogsdefs.qc:278
entity EFFECT_VAPORIZER(int teamid)
Definition: all.inc:67
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
Definition: teams.qh:133
entity EFFECT_CAP(int teamid)
Definition: all.inc:221
const float EF_STARDUST
Definition: csprogsdefs.qc:308
const int NUM_TEAM_3
Definition: teams.qh:20
#define particleeffectnum(e)
Definition: effect.qh:3