4 REGISTRY(IMPULSES, 255)
5 REGISTER_REGISTRY(IMPULSES)
6 REGISTRY_SORT(IMPULSES)
7 STATIC_INIT(IMPULSES_renumber)
9 FOREACH(IMPULSES, true, LAMBDA(it.m_id = i));
11 REGISTRY_CHECK(IMPULSES)
13 .void(entity this) impulse_handle;
16 #define IMPULSE_ALIAS(alias, id) localcmd("\nalias " #alias " \"" id "\"\n")
18 #define IMPULSE_ALIAS(alias, id)
21 #define REGISTER_IMPULSE(id, n) _REGISTER_IMPULSE(IMP_##id, id, n)
22 #define _REGISTER_IMPULSE(id, alias, n) \
23 REGISTER(IMPULSES, id, m_id, new(Impulse)) \
27 IMPULSE_ALIAS(alias, "impulse " #n); \
30 #define LEGACY_IMPULSE(alias, id, new) \
31 STATIC_INIT(legacy_##alias) { IMPULSE_ALIAS(alias, new); } \
32 SHUTDOWN(legacy_##alias) { IMPULSE_ALIAS(alias, "impulse " #id); }
34 #define X(slot, imp) \
35 REGISTER_IMPULSE(weapon_group_##slot, imp) \
36 LEGACY_IMPULSE(weapon_group_##slot, imp, "impulse " #imp)
49 #define X(slot, dir, imp) \
50 REGISTER_IMPULSE(weapon_priority_##slot##_##dir, imp) \
51 LEGACY_IMPULSE(weapon_priority_##slot##_##dir, imp, "impulse " #imp)
89 REGISTER_IMPULSE(weapon_byid_##i, imp)
116 REGISTER_IMPULSE(weapon_next_byid, 10)
117 LEGACY_IMPULSE(_weapnext_2, 10, "weapon_next_byid")
119 REGISTER_IMPULSE(weapon_prev_byid, 12)
120 LEGACY_IMPULSE(_weapprev_2, 12, "weapon_prev_byid")
122 REGISTER_IMPULSE(weapon_next_bygroup, 18)
123 LEGACY_IMPULSE(_weapnext_0, 18, "weapon_next_bygroup")
125 REGISTER_IMPULSE(weapon_prev_bygroup, 19)
126 LEGACY_IMPULSE(_weapprev_0, 19, "weapon_prev_bygroup")
128 REGISTER_IMPULSE(weapon_next_bypriority, 15)
129 LEGACY_IMPULSE(_weapnext_1, 15, "weapon_next_bypriority")
131 REGISTER_IMPULSE(weapon_prev_bypriority, 16)
132 LEGACY_IMPULSE(_weapprev_1, 16, "weapon_prev_bypriority")
134 REGISTER_IMPULSE(weapon_last, 11)
135 LEGACY_IMPULSE(weaplast, 11, "weapon_last")
137 REGISTER_IMPULSE(weapon_best, 13)
138 LEGACY_IMPULSE(weapbest, 13, "weapon_best")
140 REGISTER_IMPULSE(weapon_drop, 17)
141 LEGACY_IMPULSE(dropweapon, 17, "weapon_drop")
143 REGISTER_IMPULSE(weapon_reload, 20)
144 LEGACY_IMPULSE(reload, 20, "weapon_reload")
146 REGISTER_IMPULSE(use, 21)
147 LEGACY_IMPULSE(use, 21, "use")
149 REGISTER_IMPULSE(waypoint_personal_here, 30)
150 LEGACY_IMPULSE(g_waypointsprite_personal, 30, "waypoint_personal_here")
152 REGISTER_IMPULSE(waypoint_personal_crosshair, 31)
153 LEGACY_IMPULSE(g_waypointsprite_personal_p, 31, "waypoint_personal_crosshair")
155 REGISTER_IMPULSE(waypoint_personal_death, 32)
156 LEGACY_IMPULSE(g_waypointsprite_personal_d, 32, "waypoint_personal_death")
158 REGISTER_IMPULSE(waypoint_here_follow, 33)
159 LEGACY_IMPULSE(g_waypointsprite_team_helpme, 33, "waypoint_here_follow")
161 REGISTER_IMPULSE(waypoint_here_here, 34)
162 LEGACY_IMPULSE(g_waypointsprite_team_here, 34, "waypoint_here_here")
164 REGISTER_IMPULSE(waypoint_here_crosshair, 35)
165 LEGACY_IMPULSE(g_waypointsprite_team_here_p, 35, "waypoint_here_crosshair")
167 REGISTER_IMPULSE(waypoint_here_death, 36)
168 LEGACY_IMPULSE(g_waypointsprite_team_here_d, 36, "waypoint_here_death")
170 REGISTER_IMPULSE(waypoint_danger_here, 37)
171 LEGACY_IMPULSE(g_waypointsprite_team_danger, 37, "waypoint_danger_here")
173 REGISTER_IMPULSE(waypoint_danger_crosshair, 38)
174 LEGACY_IMPULSE(g_waypointsprite_team_danger_p, 38, "waypoint_danger_crosshair")
176 REGISTER_IMPULSE(waypoint_danger_death, 39)
177 LEGACY_IMPULSE(g_waypointsprite_team_danger_d, 39, "waypoint_danger_death")
179 REGISTER_IMPULSE(waypoint_clear_personal, 47)
180 LEGACY_IMPULSE(g_waypointsprite_clear_personal, 47, "waypoint_clear_personal")
182 REGISTER_IMPULSE(waypoint_clear, 48)
183 LEGACY_IMPULSE(g_waypointsprite_clear, 48, "waypoint_clear")
185 REGISTER_IMPULSE(navwaypoint_spawn, 103)
186 LEGACY_IMPULSE(g_waypointeditor_spawn, 103, "navwaypoint_spawn")
188 REGISTER_IMPULSE(navwaypoint_remove, 104)
189 LEGACY_IMPULSE(g_waypointeditor_remove, 104, "navwaypoint_remove")
191 REGISTER_IMPULSE(navwaypoint_relink, 105)
192 LEGACY_IMPULSE(g_waypointeditor_relinkall, 105, "navwaypoint_relink")
194 REGISTER_IMPULSE(navwaypoint_save, 106)
195 LEGACY_IMPULSE(g_waypointeditor_saveall, 106, "navwaypoint_save")
197 REGISTER_IMPULSE(navwaypoint_unreachable, 107)
198 LEGACY_IMPULSE(g_waypointeditor_unreachable, 107, "navwaypoint_unreachable")
200 #define CHIMPULSE(id, n) _CHIMPULSE(CHIMPULSE_##id, n)
201 #define _CHIMPULSE(id, n) \
202 REGISTER(IMPULSES, id, m_id, new(Impulse)) \
208 CHIMPULSE(SPEEDRUN_INIT, 30)
209 CHIMPULSE(GIVE_ALL, 99)
210 CHIMPULSE(CLONE_MOVING, 140)
211 CHIMPULSE(SPEEDRUN, 141)
212 CHIMPULSE(CLONE_STANDING, 142)
213 CHIMPULSE(TELEPORT, 143)