previous_game_starttime = startTime;
}
-#define ANNOUNCER_CHECKMINUTE(minute) MACRO_BEGIN \
- if(announcer_##minute##min) { \
- if(timeleft > minute * 60) \
- announcer_##minute##min = false; \
- } else { \
- if(timeleft < minute * 60 && timeleft > minute * 60 - 1) { \
- announcer_##minute##min = true; \
- Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_##minute); \
- } \
- } \
-MACRO_END
+#define ANNOUNCER_CHECKMINUTE(minute) MACRO_BEGIN if(announcer_##minute##min) { if(timeleft > minute * 60) announcer_##minute##min = false; } else { if(timeleft < minute * 60 && timeleft > minute * 60 - 1) { announcer_##minute##min = true; Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_##minute); } } MACRO_END
void Announcer_Time()
{
// These functions are here specifically to add special + - commands to the game, and are not really normal commands.
// Please add client commands to the function above this, as this is only for special reasons.
// NOTE: showaccuracy is kept as legacy command
-#define CONSOLE_COMMANDS_NORMAL() \
- CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) \
- CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) \
- CONSOLE_COMMAND("+showaccuracy", { }) \
- CONSOLE_COMMAND("-showaccuracy", { }) \
- /* nothing */
-
-#define CONSOLE_COMMANDS_MOVEMENT() \
- CONSOLE_COMMAND("+forward", { ++camera_direction.x; }) \
- CONSOLE_COMMAND("-forward", { --camera_direction.x; }) \
- CONSOLE_COMMAND("+back", { --camera_direction.x; }) \
- CONSOLE_COMMAND("-back", { ++camera_direction.x; }) \
- CONSOLE_COMMAND("+moveup", { ++camera_direction.z; }) \
- CONSOLE_COMMAND("-moveup", { --camera_direction.z; }) \
- CONSOLE_COMMAND("+movedown", { --camera_direction.z; }) \
- CONSOLE_COMMAND("-movedown", { ++camera_direction.z; }) \
- CONSOLE_COMMAND("+moveright", { --camera_direction.y; }) \
- CONSOLE_COMMAND("-moveright", { ++camera_direction.y; }) \
- CONSOLE_COMMAND("+moveleft", { ++camera_direction.y; }) \
- CONSOLE_COMMAND("-moveleft", { --camera_direction.y; }) \
- CONSOLE_COMMAND("+roll_right", { ++camera_roll; }) \
- CONSOLE_COMMAND("-roll_right", { --camera_roll; }) \
- CONSOLE_COMMAND("+roll_left", { --camera_roll; }) \
- CONSOLE_COMMAND("-roll_left", { ++camera_roll; }) \
- /* nothing */
+#define CONSOLE_COMMANDS_NORMAL() CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) CONSOLE_COMMAND("+showaccuracy", { }) CONSOLE_COMMAND("-showaccuracy", { }) /* nothing */
+
+#define CONSOLE_COMMANDS_MOVEMENT() CONSOLE_COMMAND("+forward", { ++camera_direction.x; }) CONSOLE_COMMAND("-forward", { --camera_direction.x; }) CONSOLE_COMMAND("+back", { --camera_direction.x; }) CONSOLE_COMMAND("-back", { ++camera_direction.x; }) CONSOLE_COMMAND("+moveup", { ++camera_direction.z; }) CONSOLE_COMMAND("-moveup", { --camera_direction.z; }) CONSOLE_COMMAND("+movedown", { --camera_direction.z; }) CONSOLE_COMMAND("-movedown", { ++camera_direction.z; }) CONSOLE_COMMAND("+moveright", { --camera_direction.y; }) CONSOLE_COMMAND("-moveright", { ++camera_direction.y; }) CONSOLE_COMMAND("+moveleft", { ++camera_direction.y; }) CONSOLE_COMMAND("-moveleft", { --camera_direction.y; }) CONSOLE_COMMAND("+roll_right", { ++camera_roll; }) CONSOLE_COMMAND("-roll_right", { --camera_roll; }) CONSOLE_COMMAND("+roll_left", { --camera_roll; }) CONSOLE_COMMAND("-roll_left", { ++camera_roll; }) /* nothing */
void ConsoleCommand_macro_init()
{
// first init normal commands
- #define CONSOLE_COMMAND(name, execution) \
- { registercommand(name); }
+ #define CONSOLE_COMMAND(name, execution) { registercommand(name); }
CONSOLE_COMMANDS_NORMAL();
#undef CONSOLE_COMMAND
if (isdemo())
{
#endif
- #define CONSOLE_COMMAND(name, execution) \
- registercommand(name);
+ #define CONSOLE_COMMAND(name, execution) registercommand(name);
CONSOLE_COMMANDS_MOVEMENT();
#undef CONSOLE_COMMAND
bool ConsoleCommand_macro_normal(string s, int argc)
{
- #define CONSOLE_COMMAND(name, execution) \
- { if (name == s) { { execution } return true; } }
+ #define CONSOLE_COMMAND(name, execution) { if (name == s) { { execution } return true; } }
CONSOLE_COMMANDS_NORMAL();
#undef CONSOLE_COMMAND
{
if (camera_active)
{
- #define CONSOLE_COMMAND(name, execution) \
- { if (name == s) { { execution } return true; } }
+ #define CONSOLE_COMMAND(name, execution) { if (name == s) { { execution } return true; } }
CONSOLE_COMMANDS_MOVEMENT();
#undef CONSOLE_COMMAND
REGISTER_REGISTRY(CLIENT_COMMANDS)
REGISTRY_SORT(CLIENT_COMMANDS)
-#define CLIENT_COMMAND(id, description) \
- CLASS(clientcommand_##id, Command) \
- ATTRIB(clientcommand_##id, m_name, string, #id); \
- ATTRIB(clientcommand_##id, m_description, string, description); \
- ENDCLASS(clientcommand_##id) \
- REGISTER(CLIENT_COMMANDS, CMD_CL, id, m_id, NEW(clientcommand_##id)); \
- METHOD(clientcommand_##id, m_invokecmd, void(clientcommand_##id this, int request, entity caller, int arguments, string command))
+#define CLIENT_COMMAND(id, description) CLASS(clientcommand_##id, Command) ATTRIB(clientcommand_##id, m_name, string, #id); ATTRIB(clientcommand_##id, m_description, string, description); ENDCLASS(clientcommand_##id) REGISTER(CLIENT_COMMANDS, CMD_CL, id, m_id, NEW(clientcommand_##id)); METHOD(clientcommand_##id, m_invokecmd, void(clientcommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(CLIENT_COMMANDS_aliases) {
FOREACH(CLIENT_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_cl")));
// player "pops in"
if(isnew)
{
-#define FIX_FRAMETIME(f,ft) MACRO_BEGIN \
- if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) \
- this.ft = this.death_time; \
-MACRO_END
+#define FIX_FRAMETIME(f,ft) MACRO_BEGIN if(IS_DEAD_FRAME(this.f) && this.ft != 0 && this.death_time != 0) this.ft = this.death_time; MACRO_END
FIX_FRAMETIME(frame, frame1time);
FIX_FRAMETIME(frame2, frame2time);
#ifdef CSQCMODEL_HAVE_TWO_FRAMES
else
{
square = eY * theSize.x;
- drawsubpic(theOrigin, width + square, pic, '0 0 0', '1 0.25 0', theColor, theAlpha, drawflag);
- drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0 0.25 0', '1 0.5 0', theColor, theAlpha, drawflag);
+ drawsubpic(theOrigin, width + square, pic, '0 0 0', '1 0.25 0', theColor, theAlpha, drawflag);
+ drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0 0.25 0', '1 0.5 0', theColor, theAlpha, drawflag);
drawsubpic(theOrigin + height - square, width + square, pic, '0 0.75 0', '1 0.25 0', theColor, theAlpha, drawflag);
}
} else {
else
{
square = eX * theSize.y;
- drawsubpic(theOrigin, height + square, pic, '0 0 0', '0.25 1 0', theColor, theAlpha, drawflag);
- drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0.25 0 0', '0.5 1 0', theColor, theAlpha, drawflag);
+ drawsubpic(theOrigin, height + square, pic, '0 0 0', '0.25 1 0', theColor, theAlpha, drawflag);
+ drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0.25 0 0', '0.5 1 0', theColor, theAlpha, drawflag);
drawsubpic(theOrigin + width - square, height + square, pic, '0.75 0 0', '0.25 1 0', theColor, theAlpha, drawflag);
}
}
#define hud_panels_from(i) _hud_panels_from(i, NULL)
REGISTER_REGISTRY(hud_panels)
-#define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
- void draw_func(); \
- REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { \
- this.panel_id = this.m_id; \
- this.panel_draw = draw_func; \
- this.panel_name = strzone(strtolower(#id)); \
- this.panel_configflags = configflags; \
- this.panel_showflags = showflags; \
- }
+#define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) void draw_func(); REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { this.panel_id = this.m_id; this.panel_draw = draw_func; this.panel_name = strzone(strtolower(#id)); this.panel_configflags = configflags; this.panel_showflags = showflags; }
#define HUD_PANEL(NAME) HUD_PANEL_##NAME
// draw the background/borders
-#define HUD_Panel_DrawBg() MACRO_BEGIN \
- if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") \
- draw_BorderPicture( \
- HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), \
- panel.current_panel_bg, \
- HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \
- panel_bg_color, panel_bg_alpha, \
- HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \
- ); \
-MACRO_END
+#define HUD_Panel_DrawBg() MACRO_BEGIN if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") draw_BorderPicture( HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), panel.current_panel_bg, HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), panel_bg_color, panel_bg_alpha, HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) ); MACRO_END
int panel_order[hud_panels_MAX];
string hud_panelorder_prev;
// Get value for panel.current_panel_bg: if "" fetch default, else use panel_bg_str
// comment on last line of macro: // we probably want to see a background in config mode at all times...
-#define HUD_Panel_GetBg() MACRO_BEGIN \
- string panel_bg; \
- if (!autocvar__hud_configure && panel_bg_str == "0") { \
- panel_bg = "0"; \
- } else { \
- if (panel_bg_str == "") { \
- panel_bg_str = autocvar_hud_panel_bg; \
- } \
- if (panel_bg_str == "0" && !autocvar__hud_configure) { \
- panel_bg = "0"; \
- } else { \
- if (panel_bg_str == "0" && autocvar__hud_configure) \
- panel_bg_alpha_str = "0"; \
- panel_bg = strcat(hud_skin_path, "/", panel_bg_str); \
- if (precache_pic(panel_bg) == "") { \
- panel_bg = strcat(hud_skin_path, "/", "border_default"); \
- if (precache_pic(panel_bg) == "") { \
- panel_bg = strcat("gfx/hud/default/", "border_default"); \
- } \
- } \
- } \
- } \
- strcpy(panel.current_panel_bg, panel_bg); \
-MACRO_END
+#define HUD_Panel_GetBg() MACRO_BEGIN string panel_bg; if (!autocvar__hud_configure && panel_bg_str == "0") { panel_bg = "0"; } else { if (panel_bg_str == "") { panel_bg_str = autocvar_hud_panel_bg; } if (panel_bg_str == "0" && !autocvar__hud_configure) { panel_bg = "0"; } else { if (panel_bg_str == "0" && autocvar__hud_configure) panel_bg_alpha_str = "0"; panel_bg = strcat(hud_skin_path, "/", panel_bg_str); if (precache_pic(panel_bg) == "") { panel_bg = strcat(hud_skin_path, "/", "border_default"); if (precache_pic(panel_bg) == "") { panel_bg = strcat("gfx/hud/default/", "border_default"); } } } } strcpy(panel.current_panel_bg, panel_bg); MACRO_END
// Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
-#define HUD_Panel_GetColor() MACRO_BEGIN \
- if ((teamplay) && panel_bg_color_team > 0) { \
- if (autocvar__hud_configure && myteam == NUM_SPECTATOR) \
- panel_bg_color = '1 0 0' * panel_bg_color_team; \
- else \
- panel_bg_color = myteamcolors * panel_bg_color_team; \
- } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team > 0) { \
- panel_bg_color = '1 0 0' * panel_bg_color_team; \
- } else { \
- if (panel_bg_color_str == "") { \
- panel_bg_color = autocvar_hud_panel_bg_color; \
- } else { \
- if (panel_bg_color_str == "shirt") { \
- panel_bg_color = colormapPaletteColor(floor(entcs_GetClientColors(current_player) / 16), 0); \
- } else if (panel_bg_color_str == "pants") { \
- panel_bg_color = colormapPaletteColor(entcs_GetClientColors(current_player) % 16, 1); \
- } else { \
- panel_bg_color = stov(panel_bg_color_str); \
- } \
- } \
- } \
-MACRO_END
+#define HUD_Panel_GetColor() MACRO_BEGIN if ((teamplay) && panel_bg_color_team > 0) { if (autocvar__hud_configure && myteam == NUM_SPECTATOR) panel_bg_color = '1 0 0' * panel_bg_color_team; else panel_bg_color = myteamcolors * panel_bg_color_team; } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team > 0) { panel_bg_color = '1 0 0' * panel_bg_color_team; } else { if (panel_bg_color_str == "") { panel_bg_color = autocvar_hud_panel_bg_color; } else { if (panel_bg_color_str == "shirt") { panel_bg_color = colormapPaletteColor(floor(entcs_GetClientColors(current_player) / 16), 0); } else if (panel_bg_color_str == "pants") { panel_bg_color = colormapPaletteColor(entcs_GetClientColors(current_player) % 16, 1); } else { panel_bg_color = stov(panel_bg_color_str); } } } MACRO_END
// Get value for panel_bg_color_team: if "" fetch default, else use panel_bg_color_team_str
-#define HUD_Panel_GetColorTeam() MACRO_BEGIN \
- if (panel_bg_color_team_str == "") { \
- panel_bg_color_team = autocvar_hud_panel_bg_color_team; \
- } else { \
- panel_bg_color_team = stof(panel_bg_color_team_str); \
- } \
-MACRO_END
+#define HUD_Panel_GetColorTeam() MACRO_BEGIN if (panel_bg_color_team_str == "") { panel_bg_color_team = autocvar_hud_panel_bg_color_team; } else { panel_bg_color_team = stof(panel_bg_color_team_str); } MACRO_END
// Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
// comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
-#define HUD_Panel_GetBgAlpha() MACRO_BEGIN \
- if (panel_bg_alpha_str == "") { \
- panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha); \
- } \
- panel_bg_alpha = stof(panel_bg_alpha_str); \
- if (autocvar__hud_configure) { \
- if (!panel_enabled) \
- panel_bg_alpha = 0.25; \
- else if (hud_configure_menu_open == 2 && panel == highlightedPanel) \
- panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
- else \
- panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha); \
- } \
-MACRO_END
+#define HUD_Panel_GetBgAlpha() MACRO_BEGIN if (panel_bg_alpha_str == "") { panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha); } panel_bg_alpha = stof(panel_bg_alpha_str); if (autocvar__hud_configure) { if (!panel_enabled) panel_bg_alpha = 0.25; else if (hud_configure_menu_open == 2 && panel == highlightedPanel) panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha; else panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha); } MACRO_END
// Get value for panel_fg_alpha. Also do various minalpha checks
// comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
-#define HUD_Panel_GetFgAlpha() MACRO_BEGIN \
- panel_fg_alpha = autocvar_hud_panel_fg_alpha; \
- if (autocvar__hud_configure && !panel_enabled) \
- panel_fg_alpha = 0.25; \
-MACRO_END
+#define HUD_Panel_GetFgAlpha() MACRO_BEGIN panel_fg_alpha = autocvar_hud_panel_fg_alpha; if (autocvar__hud_configure && !panel_enabled) panel_fg_alpha = 0.25; MACRO_END
// Get border. See comments above, it's similar.
-#define HUD_Panel_GetBorder() MACRO_BEGIN \
- if (panel_bg_border_str == "") { \
- panel_bg_border = autocvar_hud_panel_bg_border; \
- } else { \
- panel_bg_border = stof(panel_bg_border_str); \
- } \
-MACRO_END
+#define HUD_Panel_GetBorder() MACRO_BEGIN if (panel_bg_border_str == "") { panel_bg_border = autocvar_hud_panel_bg_border; } else { panel_bg_border = stof(panel_bg_border_str); } MACRO_END
// Get padding. See comments above, it's similar.
// last line is a port of the old function, basically always make sure the panel contents are at least 5 pixels tall/wide, to disallow extreme padding values
-#define HUD_Panel_GetPadding() MACRO_BEGIN \
- if (panel_bg_padding_str == "") { \
- panel_bg_padding = autocvar_hud_panel_bg_padding; \
- } else { \
- panel_bg_padding = stof(panel_bg_padding_str); \
- } \
- panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding); \
-MACRO_END
+#define HUD_Panel_GetPadding() MACRO_BEGIN if (panel_bg_padding_str == "") { panel_bg_padding = autocvar_hud_panel_bg_padding; } else { panel_bg_padding = stof(panel_bg_padding_str); } panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding); MACRO_END
// return smoothly faded pos and size of given panel when a dialog is active
// don't center too wide panels, it doesn't work with different resolutions
-#define HUD_Panel_UpdatePosSize_ForMenu() MACRO_BEGIN \
- vector new_size = panel_size; \
- float max_panel_width = 0.52 * vid_conwidth; \
- if(panel_size.x > max_panel_width) \
- { \
- new_size.x = max_panel_width; \
- new_size.y = panel_size.y * (new_size.x / panel_size.x); \
- } \
- vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; \
- panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; \
- panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; \
-MACRO_END
+#define HUD_Panel_UpdatePosSize_ForMenu() MACRO_BEGIN vector new_size = panel_size; float max_panel_width = 0.52 * vid_conwidth; if(panel_size.x > max_panel_width) { new_size.x = max_panel_width; new_size.y = panel_size.y * (new_size.x / panel_size.x); } vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; MACRO_END
// Scale the pos and size vectors to absolute coordinates
-#define HUD_Panel_ScalePosSize() MACRO_BEGIN \
- panel_pos.x *= vid_conwidth; panel_pos.y *= vid_conheight; \
- panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight; \
-MACRO_END
+#define HUD_Panel_ScalePosSize() MACRO_BEGIN panel_pos.x *= vid_conwidth; panel_pos.y *= vid_conheight; panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight; MACRO_END
float panel_fade_alpha;
void HUD_Panel_LoadCvars();
-#define Hud_Panel_GetPanelEnabled() \
- panel_enabled = ((panel.panel_configflags & PANEL_CONFIG_CANBEOFF) \
- ? cvar(strcat("hud_panel_", panel.panel_name)) : true)
-
-#define HUD_Panel_UpdatePosSize() MACRO_BEGIN \
- Hud_Panel_GetPanelEnabled(); \
- panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos"))); \
- panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size"))); \
- HUD_Panel_ScalePosSize(); \
- if (hud_configure_menu_open == 2 && panel == highlightedPanel) { \
- HUD_Panel_UpdatePosSize_ForMenu(); \
- } \
- panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border")); \
- HUD_Panel_GetBorder(); \
-MACRO_END
+#define Hud_Panel_GetPanelEnabled() panel_enabled = ((panel.panel_configflags & PANEL_CONFIG_CANBEOFF) ? cvar(strcat("hud_panel_", panel.panel_name)) : true)
+
+#define HUD_Panel_UpdatePosSize() MACRO_BEGIN Hud_Panel_GetPanelEnabled(); panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos"))); panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size"))); HUD_Panel_ScalePosSize(); if (hud_configure_menu_open == 2 && panel == highlightedPanel) { HUD_Panel_UpdatePosSize_ForMenu(); } panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border")); HUD_Panel_GetBorder(); MACRO_END
const int NOTIFY_MAX_ENTRIES = 10;
const float NOTIFY_ICON_MARGIN = 0.02;
return pos;
}
-#define InfoMessage(s) MACRO_BEGIN \
- pos = InfoMessages_drawstring(s, pos, mySize, ((img_curr_group >= 0) ? panel_fg_alpha * img_fade[img_curr_group] : panel_fg_alpha), fontsize); \
- img_curr_group = -1; \
-MACRO_END
+#define InfoMessage(s) MACRO_BEGIN pos = InfoMessages_drawstring(s, pos, mySize, ((img_curr_group >= 0) ? panel_fg_alpha * img_fade[img_curr_group] : panel_fg_alpha), fontsize); img_curr_group = -1; MACRO_END
void HUD_InfoMessages()
{
}
// when status CHANGES, set old status into prevstatus and current status into status
- #define X(team) MACRO_BEGIN \
- if (team##flag != team##flag_prevframe) { \
- team##flag_statuschange_time = time; \
- team##flag_prevstatus = team##flag_prevframe; \
- team##flag_prevframe = team##flag; \
- } \
- team##flag_statuschange_elapsedtime = time - team##flag_statuschange_time; \
- MACRO_END
+ #define X(team) MACRO_BEGIN if (team##flag != team##flag_prevframe) { team##flag_statuschange_time = time; team##flag_prevstatus = team##flag_prevframe; team##flag_prevframe = team##flag; } team##flag_statuschange_elapsedtime = time - team##flag_statuschange_time; MACRO_END
X(red);
X(blue);
X(yellow);
// ensure RMS == 1
const float BLINK_FREQ = 5; // circle frequency, = 2*pi*frequency in hertz
- #define X(team, cond) \
- string team##_icon = string_null, team##_icon_prevstatus = string_null; \
- int team##_alpha, team##_alpha_prevstatus; \
- team##_alpha = team##_alpha_prevstatus = 1; \
- MACRO_BEGIN \
- switch (team##flag) { \
- case 1: team##_icon = "flag_" #team "_taken"; break; \
- case 2: team##_icon = "flag_" #team "_lost"; break; \
- case 3: team##_icon = "flag_" #team "_carrying"; team##_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \
- default: \
- if ((stat_items & CTF_SHIELDED) && (cond)) { \
- team##_icon = "flag_" #team "_shielded"; \
- } else { \
- team##_icon = string_null; \
- } \
- break; \
- } \
- switch (team##flag_prevstatus) { \
- case 1: team##_icon_prevstatus = "flag_" #team "_taken"; break; \
- case 2: team##_icon_prevstatus = "flag_" #team "_lost"; break; \
- case 3: team##_icon_prevstatus = "flag_" #team "_carrying"; team##_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \
- default: \
- if (team##flag == 3) { \
- team##_icon_prevstatus = "flag_" #team "_carrying"; /* make it more visible */\
- } else if((stat_items & CTF_SHIELDED) && (cond)) { \
- team##_icon_prevstatus = "flag_" #team "_shielded"; \
- } else { \
- team##_icon_prevstatus = string_null; \
- } \
- break; \
- } \
- MACRO_END
+ #define X(team, cond) string team##_icon = string_null, team##_icon_prevstatus = string_null; int team##_alpha, team##_alpha_prevstatus; team##_alpha = team##_alpha_prevstatus = 1; MACRO_BEGIN switch (team##flag) { case 1: team##_icon = "flag_" #team "_taken"; break; case 2: team##_icon = "flag_" #team "_lost"; break; case 3: team##_icon = "flag_" #team "_carrying"; team##_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; default: if ((stat_items & CTF_SHIELDED) && (cond)) { team##_icon = "flag_" #team "_shielded"; } else { team##_icon = string_null; } break; } switch (team##flag_prevstatus) { case 1: team##_icon_prevstatus = "flag_" #team "_taken"; break; case 2: team##_icon_prevstatus = "flag_" #team "_lost"; break; case 3: team##_icon_prevstatus = "flag_" #team "_carrying"; team##_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; default: if (team##flag == 3) { team##_icon_prevstatus = "flag_" #team "_carrying"; /* make it more visible */ } else if((stat_items & CTF_SHIELDED) && (cond)) { team##_icon_prevstatus = "flag_" #team "_shielded"; } else { team##_icon_prevstatus = string_null; } break; } MACRO_END
X(red, myteam != NUM_TEAM_1 && (nteams & BIT(0)));
X(blue, myteam != NUM_TEAM_2 && (nteams & BIT(1)));
X(yellow, myteam != NUM_TEAM_3 && (nteams & BIT(2)));
neutralflag_pos = pos;
flag_size = e1 * fs * size1 + e2 * size2;
- #define X(team) MACRO_BEGIN \
- f = bound(0, team##flag_statuschange_elapsedtime * 2, 1); \
- if (team##_icon && ctf_stalemate) \
- drawpic_aspect_skin(team##flag_pos, "flag_stalemate", flag_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); \
- if (team##_icon_prevstatus && f < 1) \
- drawpic_aspect_skin_expanding(team##flag_pos, team##_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * team##_alpha_prevstatus, DRAWFLAG_NORMAL, f); \
- if (team##_icon) \
- drawpic_aspect_skin(team##flag_pos, team##_icon, flag_size, '1 1 1', panel_fg_alpha * team##_alpha * f, DRAWFLAG_NORMAL); \
- MACRO_END
+ #define X(team) MACRO_BEGIN f = bound(0, team##flag_statuschange_elapsedtime * 2, 1); if (team##_icon && ctf_stalemate) drawpic_aspect_skin(team##flag_pos, "flag_stalemate", flag_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); if (team##_icon_prevstatus && f < 1) drawpic_aspect_skin_expanding(team##flag_pos, team##_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * team##_alpha_prevstatus, DRAWFLAG_NORMAL, f); if (team##_icon) drawpic_aspect_skin(team##flag_pos, team##_icon, flag_size, '1 1 1', panel_fg_alpha * team##_alpha * f, DRAWFLAG_NORMAL); MACRO_END
X(red);
X(blue);
X(yellow);
}
-#define QUICKMENU_SMENU(submenu,eng_submenu) { \
- if(target_submenu == eng_submenu && target_submenu_found) \
- return; /* target_submenu entries are now loaded, exit */ \
- if(QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES) \
- QuickMenu_Buffer_Set(QM_TAG_SUBMENU, submenu); \
- ++QuickMenu_Buffer_Size; \
- if(target_submenu == eng_submenu && !target_submenu_found) { \
- QuickMenu_Buffer_Size = 0; /* enable load of next entries */ \
- target_submenu_found = true; \
- } \
-}
+#define QUICKMENU_SMENU(submenu,eng_submenu) { if(target_submenu == eng_submenu && target_submenu_found) return; /* target_submenu entries are now loaded, exit */ if(QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES) QuickMenu_Buffer_Set(QM_TAG_SUBMENU, submenu); ++QuickMenu_Buffer_Size; if(target_submenu == eng_submenu && !target_submenu_found) { QuickMenu_Buffer_Size = 0; /* enable load of next entries */ target_submenu_found = true; } }
-#define QUICKMENU_ENTRY(title,command) { \
- if(QuickMenu_Buffer_Size + 1 < QUICKMENU_BUFFER_MAXENTRIES) \
- { \
- QuickMenu_Buffer_Set(QM_TAG_TITLE, title); \
- ++QuickMenu_Buffer_Size; \
- QuickMenu_Buffer_Set(QM_TAG_COMMAND, command); \
- } \
- ++QuickMenu_Buffer_Size; \
-}
+#define QUICKMENU_ENTRY(title,command) { if(QuickMenu_Buffer_Size + 1 < QUICKMENU_BUFFER_MAXENTRIES) { QuickMenu_Buffer_Set(QM_TAG_TITLE, title); ++QuickMenu_Buffer_Size; QuickMenu_Buffer_Set(QM_TAG_COMMAND, command); } ++QuickMenu_Buffer_Size; }
-#define QUICKMENU_SMENU_PL(submenu,eng_submenu,command,teamplayers,without_me) { \
- if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES) {\
- QUICKMENU_SMENU(submenu,eng_submenu) \
- QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); \
- ++QuickMenu_Buffer_Size; \
- QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, command); \
- ++QuickMenu_Buffer_Size; \
- QUICKMENU_SMENU(submenu,eng_submenu) \
- } \
-}
+#define QUICKMENU_SMENU_PL(submenu,eng_submenu,command,teamplayers,without_me) { if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES) { QUICKMENU_SMENU(submenu,eng_submenu) QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); ++QuickMenu_Buffer_Size; QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, command); ++QuickMenu_Buffer_Size; QUICKMENU_SMENU(submenu,eng_submenu) } }
// useful to Translate a string inside the Command
-#define QUICKMENU_ENTRY_TC(title,command,text,translated_text) {\
- if(prvm_language == "en") { \
- tc_title = title; \
- tc_cmd = sprintf(command, text); \
- } \
- else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) { \
- tc_title = strcat("(en)", title); \
- tc_cmd = sprintf(command, text); \
- } \
- else { \
- tc_title = strcat("(", prvm_language, ")", title); \
- tc_cmd = sprintf(command, translated_text); \
- } \
- QUICKMENU_ENTRY(tc_title, tc_cmd) \
-}
+#define QUICKMENU_ENTRY_TC(title,command,text,translated_text) { if(prvm_language == "en") { tc_title = title; tc_cmd = sprintf(command, text); } else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) { tc_title = strcat("(en)", title); tc_cmd = sprintf(command, text); } else { tc_title = strcat("(", prvm_language, ")", title); tc_cmd = sprintf(command, translated_text); } QUICKMENU_ENTRY(tc_title, tc_cmd) }
void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me)
{
// make sure it's excluded in a previous exclusive rule, if any
// otherwise the previous exclusive rule warns anyway
// e.g. -teams,rc,cts,lms/kills ?+rc/kills
-#define SCOREBOARD_DEFAULT_COLUMNS \
-"ping pl fps name |" \
-" -teams,rc,cts,inv,lms/kills +ft,tdm/kills ?+rc,inv/kills" \
-" -teams,lms/deaths +ft,tdm/deaths" \
-" +tdm/sum" \
-" -teams,lms,rc,cts,inv,ka/suicides +ft,tdm/suicides ?+rc,inv/suicides" \
-" -cts,dm,tdm,ka,ft/frags" /* tdm already has this in "score" */ \
-" +tdm,ft,dom,ons,as/teamkills"\
-" -rc,cts,nb/dmg -rc,cts,nb/dmgtaken" \
-" +ctf/pickups +ctf/fckills +ctf/returns +ctf/caps +ons/takes +ons/caps" \
-" +lms/lives +lms/rank" \
-" +kh/kckills +kh/losses +kh/caps" \
-" ?+rc/laps ?+rc/time +rc,cts/fastest" \
-" +as/objectives +nb/faults +nb/goals" \
-" +ka/pickups +ka/bckills +ka/bctime +ft/revivals" \
-" +dom/ticks +dom/takes" \
-" -lms,rc,cts,inv,nb/score"
+#define SCOREBOARD_DEFAULT_COLUMNS "ping pl fps name |" " -teams,rc,cts,inv,lms/kills +ft,tdm/kills ?+rc,inv/kills" " -teams,lms/deaths +ft,tdm/deaths" " +tdm/sum" " -teams,lms,rc,cts,inv,ka/suicides +ft,tdm/suicides ?+rc,inv/suicides" " -cts,dm,tdm,ka,ft/frags" /* tdm already has this in "score" */ " +tdm,ft,dom,ons,as/teamkills"" -rc,cts,nb/dmg -rc,cts,nb/dmgtaken" " +ctf/pickups +ctf/fckills +ctf/returns +ctf/caps +ons/takes +ons/caps" " +lms/lives +lms/rank" " +kh/kckills +kh/losses +kh/caps" " ?+rc/laps ?+rc/time +rc,cts/fastest" " +as/objectives +nb/faults +nb/goals" " +ka/pickups +ka/bckills +ka/bctime +ft/revivals" " +dom/ticks +dom/takes" " -lms,rc,cts,inv,nb/score"
void Cmd_Scoreboard_SetFields(int argc)
{
return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
}
-#define HUD_WEAPONS_GET_FULL_LAYOUT() MACRO_BEGIN \
- int nHidden = 0; \
- FOREACH(Weapons, it != WEP_Null, { \
- if (weapons_stat & WepSet_FromWeapon(it)) continue; \
- if ((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) nHidden += 1; \
- }); \
- vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); \
- columns = table_size.x; \
- rows = table_size.y; \
- weapon_size.x = panel_size.x / columns; \
- weapon_size.y = panel_size.y / rows; \
-MACRO_END
+#define HUD_WEAPONS_GET_FULL_LAYOUT() MACRO_BEGIN int nHidden = 0; FOREACH(Weapons, it != WEP_Null, { if (weapons_stat & WepSet_FromWeapon(it)) continue; if ((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) nHidden += 1; }); vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); columns = table_size.x; rows = table_size.y; weapon_size.x = panel_size.x / columns; weapon_size.y = panel_size.y / rows; MACRO_END
void HUD_Weapons()
{
if(pic == "")
{
- drawfill(pos, img_size, '.5 .5 .5', .7 * theAlpha, DRAWFLAG_NORMAL);
+ drawfill(pos, img_size, '0.5 0.5 0.5', .7 * theAlpha, DRAWFLAG_NORMAL);
}
else
{
float stringwidth(string text, float handleColors, vector sz);
-#define drawpic(position, pic, size, rgb, alpha, flag) \
- drawpic_builtin(HUD_Shift(position), pic, HUD_Scale(size), rgb, alpha, flag)
+#define drawpic(position, pic, size, rgb, alpha, flag) drawpic_builtin(HUD_Shift(position), pic, HUD_Scale(size), rgb, alpha, flag)
-#define drawcharacter(position, character, scale, rgb, alpha, flag) \
- drawcharacter_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
+#define drawcharacter(position, character, scale, rgb, alpha, flag) drawcharacter_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
-#define drawstring(position, text, scale, rgb, alpha, flag) \
- drawstring_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
+#define drawstring(position, text, scale, rgb, alpha, flag) drawstring_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
-#define drawcolorcodedstring(position, text, scale, alpha, flag) \
- drawcolorcodedstring_builtin(HUD_Shift(position), text, scale, alpha, flag)
+#define drawcolorcodedstring(position, text, scale, alpha, flag) drawcolorcodedstring_builtin(HUD_Shift(position), text, scale, alpha, flag)
-#define drawcolorcodedstring2(position, text, scale, rgb, alpha, flag) \
- drawcolorcodedstring2_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
+#define drawcolorcodedstring2(position, text, scale, rgb, alpha, flag) drawcolorcodedstring2_builtin(HUD_Shift(position), text, scale, rgb, alpha, flag)
-#define drawfill(position, size, rgb, alpha, flag) \
- drawfill_builtin(HUD_Shift(position), HUD_Scale(size), rgb, alpha, flag)
+#define drawfill(position, size, rgb, alpha, flag) drawfill_builtin(HUD_Shift(position), HUD_Scale(size), rgb, alpha, flag)
-#define drawsetcliparea(xposition, yposition, w, h) \
- drawsetcliparea_builtin(HUD_ShiftX(xposition), HUD_ShiftY(yposition), HUD_ScaleX(w), HUD_ScaleY(h))
+#define drawsetcliparea(xposition, yposition, w, h) drawsetcliparea_builtin(HUD_ShiftX(xposition), HUD_ShiftY(yposition), HUD_ScaleX(w), HUD_ScaleY(h))
// Since drawsubpic usually gets called multiple times from within an
// utility function, instead of scaling pos and size in every call
// we scale them once for all in the beginning of that utility function.
// That's why drawsubpic isn't remapped.
/*
-#define drawsubpic(position, size, pic, srcPosition, srcSize, rgb, alpha, flag) \
- drawsubpic_builtin(HUD_Shift(position), HUD_Scale(size), pic, HUD_Shift(srcPosition), HUD_Scale(srcSize), rgb, alpha, flag)
+#define drawsubpic(position, size, pic, srcPosition, srcSize, rgb, alpha, flag) drawsubpic_builtin(HUD_Shift(position), HUD_Scale(size), pic, HUD_Shift(srcPosition), HUD_Scale(srcSize), rgb, alpha, flag)
*/
// drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
vector _drawpic_sz;
float _drawpic_oldsz;
string _drawpic_picpath;
-#define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag)\
- MACRO_BEGIN \
- _drawpic_imgsize = draw_getimagesize(pic);\
- if(_drawpic_imgsize != '0 0 0') {\
- _drawpic_imgaspect = _drawpic_imgsize.x/_drawpic_imgsize.y;\
- _drawpic_sz = mySize;\
- if(_drawpic_sz.x/_drawpic_sz.y > _drawpic_imgaspect) {\
- _drawpic_oldsz = _drawpic_sz.x;\
- _drawpic_sz.x = _drawpic_sz.y * _drawpic_imgaspect;\
- if(_drawpic_sz.x)\
- drawpic(pos + eX * 0.5 * (_drawpic_oldsz - _drawpic_sz.x), pic, _drawpic_sz, color, theAlpha, drawflag);\
- } else {\
- _drawpic_oldsz = _drawpic_sz.y;\
- _drawpic_sz.y = _drawpic_sz.x / _drawpic_imgaspect;\
- if(_drawpic_sz.y)\
- drawpic(pos + eY * 0.5 * (_drawpic_oldsz - _drawpic_sz.y), pic, _drawpic_sz, color, theAlpha, drawflag);\
- }\
- }\
- MACRO_END
+#define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag) MACRO_BEGIN _drawpic_imgsize = draw_getimagesize(pic); if(_drawpic_imgsize != '0 0 0') { _drawpic_imgaspect = _drawpic_imgsize.x/_drawpic_imgsize.y; _drawpic_sz = mySize; if(_drawpic_sz.x/_drawpic_sz.y > _drawpic_imgaspect) { _drawpic_oldsz = _drawpic_sz.x; _drawpic_sz.x = _drawpic_sz.y * _drawpic_imgaspect; if(_drawpic_sz.x) drawpic(pos + eX * 0.5 * (_drawpic_oldsz - _drawpic_sz.x), pic, _drawpic_sz, color, theAlpha, drawflag); } else { _drawpic_oldsz = _drawpic_sz.y; _drawpic_sz.y = _drawpic_sz.x / _drawpic_imgaspect; if(_drawpic_sz.y) drawpic(pos + eY * 0.5 * (_drawpic_oldsz - _drawpic_sz.y), pic, _drawpic_sz, color, theAlpha, drawflag); } } MACRO_END
// draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
-#define drawpic_aspect_skin(pos,pic,sz,color,theAlpha,drawflag)\
- MACRO_BEGIN \
- _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
- if(precache_pic(_drawpic_picpath) == "") {\
- _drawpic_picpath = strcat("gfx/hud/default/", pic);\
- }\
- drawpic_aspect(pos, _drawpic_picpath, sz, color, theAlpha, drawflag);\
- _drawpic_picpath = string_null;\
- MACRO_END
+#define drawpic_aspect_skin(pos,pic,sz,color,theAlpha,drawflag) MACRO_BEGIN _drawpic_picpath = strcat(hud_skin_path, "/", pic); if(precache_pic(_drawpic_picpath) == "") { _drawpic_picpath = strcat("gfx/hud/default/", pic); } drawpic_aspect(pos, _drawpic_picpath, sz, color, theAlpha, drawflag); _drawpic_picpath = string_null; MACRO_END
// draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
-#define drawpic_skin(pos,pic,sz,color,theAlpha,drawflag)\
- MACRO_BEGIN \
- _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
- if(precache_pic(_drawpic_picpath) == "") {\
- _drawpic_picpath = strcat("gfx/hud/default/", pic);\
- }\
- drawpic(pos, _drawpic_picpath, sz, color, theAlpha, drawflag);\
- _drawpic_picpath = string_null;\
- MACRO_END
+#define drawpic_skin(pos,pic,sz,color,theAlpha,drawflag) MACRO_BEGIN _drawpic_picpath = strcat(hud_skin_path, "/", pic); if(precache_pic(_drawpic_picpath) == "") { _drawpic_picpath = strcat("gfx/hud/default/", pic); } drawpic(pos, _drawpic_picpath, sz, color, theAlpha, drawflag); _drawpic_picpath = string_null; MACRO_END
void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
-#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) MACRO_BEGIN \
- float textaspect, oldsz; \
- vector dfs = drawfontscale; \
- drawfontscale = '1 1 0'; \
- textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; \
- drawfontscale = dfs; \
- if(sz.x/sz.y > textaspect) { \
- oldsz = sz.x; \
- sz.x = sz.y * textaspect; \
- pos.x += (oldsz - sz.x) * 0.5; \
- } else { \
- oldsz = sz.y; \
- sz.y = sz.x / textaspect; \
- pos.y += (oldsz - sz.y) * 0.5; \
- } \
-MACRO_END
+#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) MACRO_BEGIN float textaspect, oldsz; vector dfs = drawfontscale; drawfontscale = '1 1 0'; textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; drawfontscale = dfs; if(sz.x/sz.y > textaspect) { oldsz = sz.x; sz.x = sz.y * textaspect; pos.x += (oldsz - sz.x) * 0.5; } else { oldsz = sz.y; sz.y = sz.x / textaspect; pos.y += (oldsz - sz.y) * 0.5; } MACRO_END
// drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag);
* return false;
* }
*/
-#define EV_CSQC_ConsoleCommand(i, o) \
- /** command name */ i(string, MUTATOR_ARGV_0_string) \
- /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_1_int) \
- /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_2_string) \
- /**/
+#define EV_CSQC_ConsoleCommand(i, o) /** command name */ i(string, MUTATOR_ARGV_0_string) /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_1_int) /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_2_string) /**/
MUTATOR_HOOKABLE(CSQC_ConsoleCommand, EV_CSQC_ConsoleCommand);
/* Called when the crosshair is being updated */
MUTATOR_HOOKABLE(UpdateCrosshair, EV_NO_ARGS);
/** Called when a projectile is linked with CSQC */
-#define EV_Ent_Projectile(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Ent_Projectile(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Ent_Projectile, EV_Ent_Projectile);
/** Called when a projectile's properties are being modified */
-#define EV_EditProjectile(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_EditProjectile(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
/* Called when projectiles are precached */
MUTATOR_HOOKABLE(PrecacheProjectiles, EV_NO_ARGS);
/** Called when updating the attached tags index */
-#define EV_TagIndex_Update(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_TagIndex_Update(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(TagIndex_Update, EV_TagIndex_Update);
/** Called when setting the attached tags */
-#define EV_TagIndex_Apply(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_TagIndex_Apply(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(TagIndex_Apply, EV_TagIndex_Apply);
/** Called when setting up skeleton bones */
-#define EV_Skeleton_CheckBones(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Skeleton_CheckBones(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Skeleton_CheckBones, EV_Skeleton_CheckBones);
/** Called when setting up bones from the loaded model */
-#define EV_Skeleton_CheckModel(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Skeleton_CheckModel(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Skeleton_CheckModel, EV_Skeleton_CheckModel);
/** Called when clearing the global parameters for a model */
MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
/** Called when getting the global parameters for a model */
-#define EV_GetModelParams(i, o) \
- /** input */ i(string, MUTATOR_ARGV_0_string) \
- /** command */ i(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_GetModelParams(i, o) /** input */ i(string, MUTATOR_ARGV_0_string) /** command */ i(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
/** Called checking if 3rd person mode should be forced on */
-#define EV_WantEventchase(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_WantEventchase(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(WantEventchase, EV_WantEventchase);
/** allow customizing 3rd person mode effect */
-#define EV_CustomizeEventchase(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /* current_view_origin_override */ o(vector, MUTATOR_ARGV_0_vector) \
- /* view_offset_override */ o(vector, MUTATOR_ARGV_1_vector) \
- /* chase_distance_override */ o(float, MUTATOR_ARGV_0_float) \
- /**/
+#define EV_CustomizeEventchase(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /* current_view_origin_override */ o(vector, MUTATOR_ARGV_0_vector) /* view_offset_override */ o(vector, MUTATOR_ARGV_1_vector) /* chase_distance_override */ o(float, MUTATOR_ARGV_0_float) /**/
MUTATOR_HOOKABLE(CustomizeEventchase, EV_CustomizeEventchase);
-#define EV_AnnouncerOption(i, o) \
- /** announcer string */ i(string, MUTATOR_ARGV_0_string) \
- /** announcer string */ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_AnnouncerOption(i, o) /** announcer string */ i(string, MUTATOR_ARGV_0_string) /** announcer string */ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(AnnouncerOption, EV_AnnouncerOption);
MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
-#define EV_HUD_Draw_overlay(i, o) \
- /**/ o(vector, MUTATOR_ARGV_0_vector) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_HUD_Draw_overlay(i, o) /**/ o(vector, MUTATOR_ARGV_0_vector) /**/ o(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(HUD_Draw_overlay, EV_HUD_Draw_overlay);
MUTATOR_HOOKABLE(HUD_Powerups_add, EV_NO_ARGS);
/** Return true to not draw any vortex beam */
-#define EV_Particles_VortexBeam(i, o) \
- /** beam shot origin */ i(vector, MUTATOR_ARGV_0_vector) \
- /** beam end position */ i(vector, MUTATOR_ARGV_1_vector) \
- /**/
+#define EV_Particles_VortexBeam(i, o) /** beam shot origin */ i(vector, MUTATOR_ARGV_0_vector) /** beam end position */ i(vector, MUTATOR_ARGV_1_vector) /**/
MUTATOR_HOOKABLE(Particles_VortexBeam, EV_Particles_VortexBeam);
/** Return true to not draw any impact effect */
-#define EV_Weapon_ImpactEffect(i, o) \
- /** weapon */ i(entity, MUTATOR_ARGV_0_entity) \
- /** damage entity */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_Weapon_ImpactEffect(i, o) /** weapon */ i(entity, MUTATOR_ARGV_0_entity) /** damage entity */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(Weapon_ImpactEffect, EV_Weapon_ImpactEffect);
/* NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false;
*/
-#define EV_HUD_Command(i, o) \
- /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_0_int) \
- /**/
+#define EV_HUD_Command(i, o) /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_0_int) /**/
MUTATOR_HOOKABLE(HUD_Command, EV_HUD_Command);
/** Draw the grapple hook, allows changing hook texture and colour */
-#define EV_DrawGrapplingHook(i, o) \
- /** hook */ i(entity, MUTATOR_ARGV_0_entity) \
- /** texture */ i(string, MUTATOR_ARGV_1_string) \
- /***/ o(string, MUTATOR_ARGV_1_string) \
- /** colour */ i(vector, MUTATOR_ARGV_2_vector) \
- /***/ o(vector, MUTATOR_ARGV_2_vector) \
- /** team */ i(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_DrawGrapplingHook(i, o) /** hook */ i(entity, MUTATOR_ARGV_0_entity) /** texture */ i(string, MUTATOR_ARGV_1_string) /***/ o(string, MUTATOR_ARGV_1_string) /** colour */ i(vector, MUTATOR_ARGV_2_vector) /***/ o(vector, MUTATOR_ARGV_2_vector) /** team */ i(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(DrawGrapplingHook, EV_DrawGrapplingHook);
/** Called when an entity is updated (either by SVQC networking or PVS) */
-#define EV_Ent_Update(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /** is new to client */ i(bool, MUTATOR_ARGV_1_bool) \
- /**/
+#define EV_Ent_Update(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /** is new to client */ i(bool, MUTATOR_ARGV_1_bool) /**/
MUTATOR_HOOKABLE(Ent_Update, EV_Ent_Update);
/** Return true to not draw crosshair */
MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);
/** Called when drawing info messages, allows adding new info messages */
-#define EV_DrawInfoMessages(i, o) \
- /** pos */ i(vector, MUTATOR_ARGV_0_vector) \
- /** mySize */ i(vector, MUTATOR_ARGV_1_vector) \
- /**/
+#define EV_DrawInfoMessages(i, o) /** pos */ i(vector, MUTATOR_ARGV_0_vector) /** mySize */ i(vector, MUTATOR_ARGV_1_vector) /**/
MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages);
/** Called when drawing info messages, allows adding new info messages */
-#define EV_HUD_WriteCvars(i, o) \
- /** file */ i(float, MUTATOR_ARGV_0_float) \
- /**/
+#define EV_HUD_WriteCvars(i, o) /** file */ i(float, MUTATOR_ARGV_0_float) /**/
MUTATOR_HOOKABLE(HUD_WriteCvars, EV_HUD_WriteCvars);
/** Called when the view model is being animated (setorigin is called after the hook, so you only need to modify origin here if desired) */
-#define EV_DrawViewModel(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_DrawViewModel(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(DrawViewModel, EV_DrawViewModel);
/** Called when updating the view's liquid contents, return true to disable the standard checks and apply your own */
MUTATOR_HOOKABLE(HUD_Contents, EV_NO_ARGS);
/** Return true to disable player model/color forcing */
-#define EV_ForcePlayermodels_Skip(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /** is local */ i(bool, MUTATOR_ARGV_1_bool) \
- /**/
+#define EV_ForcePlayermodels_Skip(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /** is local */ i(bool, MUTATOR_ARGV_1_bool) /**/
MUTATOR_HOOKABLE(ForcePlayermodels_Skip, EV_ForcePlayermodels_Skip);
/** Called when damage info is received on the client, useful for playing explosion effects */
-#define EV_DamageInfo(i, o) \
- /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
- /** death type */ i(int, MUTATOR_ARGV_1_int) \
- /** hit origin */ i(vector, MUTATOR_ARGV_2_vector) \
- /**/
+#define EV_DamageInfo(i, o) /** entity id */ i(entity, MUTATOR_ARGV_0_entity) /** death type */ i(int, MUTATOR_ARGV_1_int) /** hit origin */ i(vector, MUTATOR_ARGV_2_vector) /**/
MUTATOR_HOOKABLE(DamageInfo, EV_DamageInfo);
#define avg_factor(avg_time) (1 - exp(-frametime / max(0.001, avg_time)))
-#define lowpass(value, frac, ref_store, ret) \
- ret = ref_store = ref_store * (1 - frac) + (value) * frac;
-
-#define lowpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
- float __ignore; lowpass(value, frac, ref_store, __ignore); \
- ret = ref_store = bound((value) - (limit), ref_store, (value) + (limit)); \
-MACRO_END
-
-#define highpass(value, frac, ref_store, ret) MACRO_BEGIN \
- float __f = 0; lowpass(value, frac, ref_store, __f); \
- ret = (value) - __f; \
-MACRO_END
-
-#define highpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
- float __f = 0; lowpass_limited(value, frac, limit, ref_store, __f); \
- ret = (value) - __f; \
-MACRO_END
-
-#define lowpass2(value, frac, ref_store, ref_out) MACRO_BEGIN \
- lowpass(value.x, frac, ref_store.x, ref_out.x); \
- lowpass(value.y, frac, ref_store.y, ref_out.y); \
-MACRO_END
-
-#define highpass2(value, frac, ref_store, ref_out) MACRO_BEGIN \
- highpass(value.x, frac, ref_store.x, ref_out.x); \
- highpass(value.y, frac, ref_store.y, ref_out.y); \
-MACRO_END
-
-#define highpass2_limited(value, frac, limit, ref_store, ref_out) MACRO_BEGIN \
- highpass_limited(value.x, frac, limit, ref_store.x, ref_out.x); \
- highpass_limited(value.y, frac, limit, ref_store.y, ref_out.y); \
-MACRO_END
-
-#define lowpass3(value, frac, ref_store, ref_out) MACRO_BEGIN \
- lowpass(value.x, frac, ref_store.x, ref_out.x); \
- lowpass(value.y, frac, ref_store.y, ref_out.y); \
- lowpass(value.z, frac, ref_store.z, ref_out.z); \
-MACRO_END
-
-#define highpass3(value, frac, ref_store, ref_out) MACRO_BEGIN \
- highpass(value.x, frac, ref_store.x, ref_out.x); \
- highpass(value.y, frac, ref_store.y, ref_out.y); \
- highpass(value.z, frac, ref_store.z, ref_out.z); \
-MACRO_END
+#define lowpass(value, frac, ref_store, ret) ret = ref_store = ref_store * (1 - frac) + (value) * frac;
+
+#define lowpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN float __ignore; lowpass(value, frac, ref_store, __ignore); ret = ref_store = bound((value) - (limit), ref_store, (value) + (limit)); MACRO_END
+
+#define highpass(value, frac, ref_store, ret) MACRO_BEGIN float __f = 0; lowpass(value, frac, ref_store, __f); ret = (value) - __f; MACRO_END
+
+#define highpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN float __f = 0; lowpass_limited(value, frac, limit, ref_store, __f); ret = (value) - __f; MACRO_END
+
+#define lowpass2(value, frac, ref_store, ref_out) MACRO_BEGIN lowpass(value.x, frac, ref_store.x, ref_out.x); lowpass(value.y, frac, ref_store.y, ref_out.y); MACRO_END
+
+#define highpass2(value, frac, ref_store, ref_out) MACRO_BEGIN highpass(value.x, frac, ref_store.x, ref_out.x); highpass(value.y, frac, ref_store.y, ref_out.y); MACRO_END
+
+#define highpass2_limited(value, frac, limit, ref_store, ref_out) MACRO_BEGIN highpass_limited(value.x, frac, limit, ref_store.x, ref_out.x); highpass_limited(value.y, frac, limit, ref_store.y, ref_out.y); MACRO_END
+
+#define lowpass3(value, frac, ref_store, ref_out) MACRO_BEGIN lowpass(value.x, frac, ref_store.x, ref_out.x); lowpass(value.y, frac, ref_store.y, ref_out.y); lowpass(value.z, frac, ref_store.z, ref_out.z); MACRO_END
+
+#define highpass3(value, frac, ref_store, ref_out) MACRO_BEGIN highpass(value.x, frac, ref_store.x, ref_out.x); highpass(value.y, frac, ref_store.y, ref_out.y); highpass(value.z, frac, ref_store.z, ref_out.z); MACRO_END
void calc_followmodel_ofs(entity view)
{
DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
}
-#define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
- MACRO_BEGIN \
- vector scaled_sz = sz * wcross_size; \
- if(wcross_blur > 0) \
- { \
- for(i = -2; i <= 2; ++i) \
- for(j = -2; j <= 2; ++j) \
- M(i,j,sz,scaled_sz,wcross_name,wcross_alpha*0.04); \
- } \
- else \
- { \
- M(0,0,sz,scaled_sz,wcross_name,wcross_alpha); \
- } \
- MACRO_END
-
-#define CROSSHAIR_DRAW_SINGLE(i,j,sz,scaled_sz,wcross_name,wcross_alpha) \
- drawpic(wcross_origin - ('0.5 0 0' * (scaled_sz.x + i * wcross_blur) + '0 0.5 0' * (scaled_sz.y + j * wcross_blur)), wcross_name, scaled_sz, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
-
-#define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
- CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
+#define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) MACRO_BEGIN vector scaled_sz = sz * wcross_size; if(wcross_blur > 0) { for(i = -2; i <= 2; ++i) for(j = -2; j <= 2; ++j) M(i,j,sz,scaled_sz,wcross_name,wcross_alpha*0.04); } else { M(0,0,sz,scaled_sz,wcross_name,wcross_alpha); } MACRO_END
+
+#define CROSSHAIR_DRAW_SINGLE(i,j,sz,scaled_sz,wcross_name,wcross_alpha) drawpic(wcross_origin - ('0.5 0 0' * (scaled_sz.x + i * wcross_blur) + '0 0.5 0' * (scaled_sz.y + j * wcross_blur)), wcross_name, scaled_sz, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+
+#define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
{
}
else if(STAT(FROZEN))
{
- vector col = '0.25 0.90 1';
+ vector col = '0.25 0.9 1';
if(STAT(REVIVE_PROGRESS))
col += vec3(STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS));
drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
if(!intermission)
if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
{
- vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
+ vector col = '0.25 0.9 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
}
else if(STAT(CAPTURE_PROGRESS))
{
- DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(CAPTURE_PROGRESS), '0.25 0.9 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
}
else if(STAT(REVIVE_PROGRESS))
{
- DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.9 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
}
HUD_Scale_Disable();
#define Animations_from(id) _Animations_from(id, NULL)
#define WriteAnimation(to, it) WriteRegistered(Animations, to, it)
#define ReadAnimation() ReadRegistered(Animations)
-#define REGISTER_ANIMATION(id, framenames) \
- .vector anim_##id; \
- REGISTER(Animations, ANIM_##id, m_id, NEW(Animation)) { \
- this.m_framenames = framenames; \
- }
+#define REGISTER_ANIMATION(id, framenames) .vector anim_##id; REGISTER(Animations, ANIM_##id, m_id, NEW(Animation)) { this.m_framenames = framenames; }
vector anim_vec(Animation anim, int mdlidx, int numframes, float framerate)
{
{
entlen = tokenize(l); // using insane tokenizer for CSV
-#define CAMPAIGN_GETARG \
- a = argv(++i); \
- if(a == ",") \
- a = ""; \
- else \
- ++i
+#define CAMPAIGN_GETARG a = argv(++i); if(a == ",") a = ""; else ++i
i = -1; // starts at -1 so I don't need postincrement; that is, i points to BEFORE the current arg!
CAMPAIGN_GETARG; campaign_gametype[campaign_entries] = strzone(a);
if(c != " ")
{
- rgb = hsl_to_rgb('1 0 0' * (j * i + f) + '0 1 .5');
+ rgb = hsl_to_rgb('1 0 0' * (j * i + f) + '0 1 0.5');
c = strcat(rgb_to_hexcolor(rgb), c);
}
s2 = strcat(s2, c);
REGISTER_REGISTRY(GENERIC_COMMANDS)
REGISTRY_SORT(GENERIC_COMMANDS)
-#define GENERIC_COMMAND(id, description) \
- CLASS(genericcommand_##id, Command) \
- ATTRIB(genericcommand_##id, m_name, string, #id); \
- ATTRIB(genericcommand_##id, m_description, string, description); \
- ENDCLASS(genericcommand_##id) \
- REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
- METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
+#define GENERIC_COMMAND(id, description) CLASS(genericcommand_##id, Command) ATTRIB(genericcommand_##id, m_name, string, #id); ATTRIB(genericcommand_##id, m_description, string, description); ENDCLASS(genericcommand_##id) REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(GENERIC_COMMANDS_aliases) {
FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
#endif
// add properties you want networked to CSQC here
-#define CSQCMODEL_EXTRAPROPERTIES \
- CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
- CSQCMODEL_PROPERTY(BIT(1), int, ReadInt24_t, WriteInt24_t, effects) \
- CSQCMODEL_PROPERTY(BIT(2), int, ReadByte, WriteByte, modelflags) \
- CSQCMODEL_PROPERTY_SCALED(BIT(3), float, ReadByte, WriteByte, alpha, 254, -1, 254) \
- CSQCMODEL_PROPERTY(BIT(4), int, ReadByte, WriteByte, skin) \
- CSQCMODEL_PROPERTY(BIT(5), float, ReadApproxPastTime, WriteApproxPastTime, death_time) \
- CSQCMODEL_PROPERTY(BIT(6), float, ReadByte, WriteByte, solid) \
- CSQCMODEL_IF(!isplayer) \
- CSQCMODEL_PROPERTY(BIT(7), TAG_ENTITY_TYPE, ReadShort, WriteEntity, TAG_ENTITY_NAME) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \
- CSQCMODEL_ENDIF \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) \
- CSQCMODEL_IF(isplayer) \
- CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \
- CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
- CSQCMODEL_IF(!islocalplayer) \
- CSQCMODEL_PROPERTY(BIT(8), float, ReadChar, WriteChar, anim_lower_action) \
- CSQCMODEL_PROPERTY(BIT(8), float, ReadApproxPastTime, WriteApproxPastTime, anim_lower_time) \
- CSQCMODEL_ENDIF \
- CSQCMODEL_PROPERTY(BIT(9), float, ReadChar, WriteChar, anim_upper_action) \
- CSQCMODEL_PROPERTY(BIT(9), float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \
- CSQCMODEL_ENDIF \
- CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \
- CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) \
- CSQCMODEL_PROPERTY(BIT(12), float, ReadCoord, WriteCoord, scale) \
- CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
- CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \
- CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) \
- CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype)
+#define CSQCMODEL_EXTRAPROPERTIES CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) CSQCMODEL_PROPERTY(BIT(1), int, ReadInt24_t, WriteInt24_t, effects) CSQCMODEL_PROPERTY(BIT(2), int, ReadByte, WriteByte, modelflags) CSQCMODEL_PROPERTY_SCALED(BIT(3), float, ReadByte, WriteByte, alpha, 254, -1, 254) CSQCMODEL_PROPERTY(BIT(4), int, ReadByte, WriteByte, skin) CSQCMODEL_PROPERTY(BIT(5), float, ReadApproxPastTime, WriteApproxPastTime, death_time) CSQCMODEL_PROPERTY(BIT(6), float, ReadByte, WriteByte, solid) CSQCMODEL_IF(!isplayer) CSQCMODEL_PROPERTY(BIT(7), TAG_ENTITY_TYPE, ReadShort, WriteEntity, TAG_ENTITY_NAME) CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) CSQCMODEL_ENDIF CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) CSQCMODEL_IF(isplayer) CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) CSQCMODEL_IF(!islocalplayer) CSQCMODEL_PROPERTY(BIT(8), float, ReadChar, WriteChar, anim_lower_action) CSQCMODEL_PROPERTY(BIT(8), float, ReadApproxPastTime, WriteApproxPastTime, anim_lower_time) CSQCMODEL_ENDIF CSQCMODEL_PROPERTY(BIT(9), float, ReadChar, WriteChar, anim_upper_action) CSQCMODEL_PROPERTY(BIT(9), float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) CSQCMODEL_ENDIF CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) CSQCMODEL_PROPERTY(BIT(12), float, ReadCoord, WriteCoord, scale) CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype)
// TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody
// add hook function calls here
-#define CSQCPLAYER_HOOK_POSTCAMERASETUP() \
- viewloc_SetViewLocation()
+#define CSQCPLAYER_HOOK_POSTCAMERASETUP() viewloc_SetViewLocation()
// force updates of player entities this frequently (per second) even if unchanged
#ifndef CSQCPLAYER_FORCE_UPDATES
.entity death_msgmurder;
.string death_msgextra;
-#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) \
- REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) { \
- this.m_id += DT_FIRST; \
- this.nent_name = #id; \
- this.death_msgextra = extra; \
- this.death_msgself = msg_death; \
- this.death_msgmurder = msg_death_by; \
- }
+#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) { this.m_id += DT_FIRST; this.nent_name = #id; this.death_msgextra = extra; this.death_msgself = msg_death; this.death_msgmurder = msg_death_by; }
const int DEATH_WEAPONMASK = BITS(8);
const int HITTYPE_SECONDARY = BITS(1) << 8;
#define Effects_from(i) _Effects_from(i, EFFECT_Null)
REGISTER_REGISTRY(Effects)
REGISTRY_CHECK(Effects)
-#define EFFECT(istrail, name, realname) \
- REGISTER(Effects, EFFECT, name, m_id, Create_Effect_Entity(realname, istrail));
+#define EFFECT(istrail, name, realname) REGISTER(Effects, EFFECT, name, m_id, Create_Effect_Entity(realname, istrail));
EFFECT(0, Null, string_null)
#include "all.inc"
#pragma once
-#define particleeffectnum(e) \
- _particleeffectnum(e.eent_eff_name)
+#define particleeffectnum(e) _particleeffectnum(e.eent_eff_name)
#if defined(SVQC)
- #define pointparticles(effect, org, vel, howmany) \
- Send_Effect(effect, org, vel, howmany)
- #define trailparticles(e, effect, org, vel) \
- ((!e) ? Send_Effect(effect, org, vel, 0) \
- : __trailparticles(e, particleeffectnum(effect), org, vel))
+ #define pointparticles(effect, org, vel, howmany) Send_Effect(effect, org, vel, howmany)
+ #define trailparticles(e, effect, org, vel) ((!e) ? Send_Effect(effect, org, vel, 0) : __trailparticles(e, particleeffectnum(effect), org, vel))
#elif defined(CSQC)
- #define pointparticles(effect, org, vel, howmany) \
- __pointparticles(particleeffectnum(effect), org, vel, howmany)
- #define trailparticles(e, effect, org, vel) \
- __trailparticles(e, particleeffectnum(effect), org, vel)
+ #define pointparticles(effect, org, vel, howmany) __pointparticles(particleeffectnum(effect), org, vel, howmany)
+ #define trailparticles(e, effect, org, vel) __trailparticles(e, particleeffectnum(effect), org, vel)
#endif
.int m_id;
MY(color_max) = "0x63f2EA";
MY(count) = 50;
MY(liquidfriction) = 2;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 2;
MY(size_max) = 2;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// laser impact
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 0.2 0.2';
+ MY(lightcolor) = '4 0.2 0.2';
MY(lightradiusfade) = 1000;
MY(lightradius) = 200;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(size_min) = 4;
MY(size_max) = 4;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// machinegun bullet impact
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 5;
MY(size_max) = 5;
MY(tex_min) = 56;
MY(size_max) = 3;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// dust/smoke staying at the impact
SUB(TE_SPIKE) {
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '64 64 64';
+ MY(velocityoffset) = '0 0 80';
}
// electro combo explosion
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '2.0 2.5 3.0';
+ MY(lightcolor) = '2 2.5 3';
MY(lightradiusfade) = 200;
MY(lightradius) = 400;
- MY(originjitter) = '34.0 34.0 34.0';
+ MY(originjitter) = '34 34 34';
MY(size_min) = 64;
MY(size_max) = 64;
MY(tex_min) = 59;
MY(size_min) = 32;
MY(size_max) = 32;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// quake effect
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 56;
MY(size_max) = 3;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// dust/smoke staying at the impact
SUB(TE_SUPERSPIKE) {
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '64 64 64';
+ MY(velocityoffset) = '0 0 80';
}
// quake effect
MY(lightcolor) = '0.2 0.2 1.5';
MY(lightradiusfade) = 500;
MY(lightradius) = 100;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 56;
MY(size_max) = 3;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// dust/smoke staying at the impact
SUB(TE_SUPERSPIKEQUAD) {
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '64 64 64';
+ MY(velocityoffset) = '0 0 80';
}
// shotgun pellet impact
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 56;
MY(size_max) = 3;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// dust/smoke staying at the impact
SUB(TE_GUNSHOT) {
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '64 64 64';
+ MY(velocityoffset) = '0 0 80';
}
// crylink impact effect
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '12.0 12.0 12.0';
+ MY(originjitter) = '12 12 12';
MY(size_min) = 8;
MY(size_max) = 8;
MY(tex_min) = 47;
MY(size_min) = 1;
MY(size_max) = 1;
MY(type) = "spark";
- MY(velocityjitter) = '128.0 128.0 128.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '128 128 128';
+ MY(velocityoffset) = '0 0 80';
}
// mortar/hagar explosion (smaller than rocket)
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 2.0 0.5';
+ MY(lightcolor) = '4 2 0.5';
MY(lightradiusfade) = 300;
MY(lightradius) = 150;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(size_min) = 48;
MY(size_max) = 48;
MY(tex_min) = 8;
MY(count) = 64;
MY(liquidfriction) = 4;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// underwater bubbles
SUB(TE_EXPLOSION) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// bouncing sparks
SUB(TE_EXPLOSION) {
MY(size_min) = 2;
MY(size_max) = 2;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '256 256 256';
+ MY(velocityoffset) = '0 0 80';
}
// quake effect
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 2.0 8.0';
+ MY(lightcolor) = '4 2 8';
MY(lightradiusfade) = 700;
MY(lightradius) = 350;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(size_min) = 48;
MY(size_max) = 48;
MY(tex_min) = 8;
MY(size_max) = 12;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '48.0 48.0 48.0';
+ MY(velocityjitter) = '48 48 48';
}
// underwater bubbles
SUB(TE_EXPLOSIONQUAD) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// sparks which go through walls
SUB(TE_EXPLOSIONQUAD) {
MY(size_min) = 1;
MY(size_max) = 1;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '256 256 256';
+ MY(velocityoffset) = '0 0 80';
}
// quake effect
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '1.6 0.8 2.0';
+ MY(lightcolor) = '1.6 0.8 2';
MY(lightradiusfade) = 1200;
MY(lightradius) = 600;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(size_min) = 48;
MY(size_max) = 48;
MY(tex_min) = 8;
MY(size_max) = 12;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '48.0 48.0 48.0';
+ MY(velocityjitter) = '48 48 48';
}
// underwater bubbles
SUB(TE_TAREXPLOSION) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// sparks which go through walls
SUB(TE_TAREXPLOSION) {
MY(size_min) = 1;
MY(size_max) = 1;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '256 256 256';
+ MY(velocityoffset) = '0 0 80';
}
// bloody impact effect indicating damage
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 1;
}
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 1;
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityoffset) = '0 0 80';
}
// vortex impact
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '1.0 1.0 1.0';
+ MY(lightcolor) = '1 1 1';
MY(lightradiusfade) = 400;
MY(lightradius) = 200;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(size_min) = 1;
MY(size_max) = 2;
MY(type) = "spark";
- MY(velocityjitter) = '128.0 128.0 128.0';
+ MY(velocityjitter) = '128 128 128';
}
// quake effect
DEF(TE_SMALLFLASH);
SUB(TE_SMALLFLASH) {
- MY(lightcolor) = '2.0 2.0 2.0';
+ MY(lightcolor) = '2 2 2';
MY(lightradiusfade) = 1000;
MY(lightradius) = 200;
}
MY(size_min) = 4;
MY(size_max) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '128.0 128.0 128.0';
+ MY(velocityjitter) = '128 128 128';
MY(velocitymultiplier) = 1;
}
MY(color_max) = "0xe3974f";
MY(count) = 32;
MY(gravity) = 0.050000;
- MY(originjitter) = '128.0 128.0 32.0';
- MY(originoffset) = '0.0 0.0 32.0';
+ MY(originjitter) = '128 128 32';
+ MY(originoffset) = '0 0 32';
MY(size_min) = 12;
MY(size_max) = 12;
MY(type) = "alphastatic";
- MY(velocityjitter) = '128.0 128.0 0.0';
- MY(velocityoffset) = '0.0 0.0 256.0';
+ MY(velocityjitter) = '128 128 0';
+ MY(velocityoffset) = '0 0 256';
}
// player teleport effect
MY(color_max) = "0xFFFFFF";
MY(count) = 56;
MY(liquidfriction) = 4;
- MY(originjitter) = '16.0 16.0 28.0';
- MY(originoffset) = '0.0 0.0 28.0';
+ MY(originjitter) = '16 16 28';
+ MY(originoffset) = '0 0 28';
MY(size_min) = 10;
MY(size_max) = 10;
MY(type) = "static";
- MY(velocityjitter) = '0.0 0.0 256.0';
+ MY(velocityjitter) = '0 0 256';
}
// vortex beam
MY(size_max) = 1;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// smoke effect
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 1;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 2.0 0.5';
+ MY(lightcolor) = '4 2 0.5';
MY(lightradiusfade) = 500;
MY(lightradius) = 500;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(size_min) = 72;
MY(size_max) = 72;
MY(tex_min) = 8;
MY(count) = 128;
MY(liquidfriction) = 4;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// underwater bubbles
SUB(TE_TEI_BIGEXPLOSION) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// bouncing sparks
SUB(TE_TEI_BIGEXPLOSION) {
MY(size_min) = 2;
MY(size_max) = 2;
MY(type) = "spark";
- MY(velocityjitter) = '384.0 384.0 384.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '384 384 384';
+ MY(velocityoffset) = '0 0 80';
}
// electro explosion
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '2.4 4.8 8.0';
+ MY(lightcolor) = '2.4 4.8 8';
MY(lightradiusfade) = 600;
MY(lightradius) = 200;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(size_min) = 32;
MY(size_max) = 32;
MY(tex_min) = 59;
MY(size_min) = 2;
MY(size_max) = 4;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// bloody impact effect indicating damage
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "spark";
- MY(velocityjitter) = '99.0 99.0 55.0';
+ MY(velocityjitter) = '99 99 55';
}
//blood mist
SUB(blood) {
MY(color_min) = "0x000000";
MY(color_max) = "0x420000";
MY(countabsolute) = 1;
- MY(originjitter) = '11.0 11.0 11.0';
+ MY(originjitter) = '11 11 11';
MY(sizeincrease) = 20;
MY(size_min) = 25;
MY(size_max) = 30;
MY(color_min) = "0x807aff";
MY(color_max) = "0x4463d5";
MY(count) = 500;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 1;
MY(stretchfactor) = 0.600000;
MY(tex_min) = 64;
MY(tex_max) = 64;
MY(type) = "spark";
- MY(velocityjitter) = '1000.0 1000.0 1500.0';
+ MY(velocityjitter) = '1000 1000 1500';
MY(velocitymultiplier) = 0.500000;
}
SUB(teleport) {
MY(tex_max) = 32;
MY(trailspacing) = 20;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = -0.100000;
}
// splash around gib
MY(tex_max) = 32;
MY(trailspacing) = 64;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 0.500000;
}
MY(count) = 37.500000;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '16.0 16.0 64.0';
+ MY(originjitter) = '16 16 64';
MY(size_min) = 1;
MY(size_max) = 2;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 0.0';
+ MY(velocityjitter) = '32 32 0';
}
// flare particle and light
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
DEF(jumppad_activate);
SUB(jumppad_activate) {
- MY(lightcolor) = '2.0 2.0 2.0';
+ MY(lightcolor) = '2 2 2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
}
MY(color_min) = "0xcc0000";
MY(color_max) = "0xff0000";
MY(countabsolute) = 1;
- MY(lightcolor) = '3.0 0.1 0.1';
+ MY(lightcolor) = '3 0.1 0.1';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(sizeincrease) = -100;
MY(color_min) = "0xb44215";
MY(color_max) = "0xff0000";
MY(count) = 3;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.200000;
}
// fire
MY(color_min) = "0xff4200";
MY(color_max) = "0xff0000";
MY(count) = 6;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -100;
MY(size_min) = 7;
MY(size_max) = 9;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.200000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 0.4 0.4';
+ MY(lightcolor) = '8 0.4 0.4';
MY(lightradiusfade) = 500;
MY(lightradius) = 200;
- MY(originjitter) = '14.0 14.0 14.0';
+ MY(originjitter) = '14 14 14';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(size_min) = 4;
MY(size_max) = 4;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
SUB(laser_impact) {
MY(alpha_min) = 128;
MY(color_min) = "0x800000";
MY(color_max) = "0xFF8020";
MY(count) = 4;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 6;
MY(size_min) = 12;
MY(size_max) = 12;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
MY(velocitymultiplier) = 0.010000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 1.500000;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.050000;
}
SUB(shotgun_muzzleflash) {
MY(color_min) = "0xffdb96";
MY(color_max) = "0xff5400";
MY(count) = 16;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 10;
MY(size_max) = 20;
MY(stretchfactor) = 2.500000;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.500000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(size_min) = 5;
MY(size_max) = 8;
MY(tex_min) = 56;
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.200000;
}
// dust/smoke staying at the impact
MY(tex_min) = 36;
MY(tex_max) = 36;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 11.0';
+ MY(velocityjitter) = '11 11 11';
MY(velocitymultiplier) = 0.030000;
}
// sparks
MY(count) = 0.500000;
MY(gravity) = 1;
MY(notunderwater) = true;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.600000;
MY(size_max) = 0.600000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.200000;
}
MY(color_max) = "0x404040";
MY(count) = 1;
MY(gravity) = -0.100000;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "static";
- MY(velocityjitter) = '1.0 1.0 1.0';
+ MY(velocityjitter) = '1 1 1';
MY(velocitymultiplier) = 0.030000;
}
SUB(uzi_muzzleflash) {
MY(color_min) = "0xff9c00";
MY(color_max) = "0xffd200";
MY(count) = 3;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.300000;
MY(size_max) = 0.400000;
MY(stretchfactor) = 0.150000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '555.0 555.0 555.0';
+ MY(velocityjitter) = '555 555 555';
MY(velocitymultiplier) = 3;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '6.0 3.6 0.6';
+ MY(lightcolor) = '6 3.6 0.6';
MY(lightradiusfade) = 800;
MY(lightradius) = 80;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(size_min) = 5;
MY(size_max) = 5;
MY(tex_min) = 56;
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.100000;
}
// dust/smoke staying at the impact
MY(tex_min) = 36;
MY(tex_max) = 36;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 11.0';
+ MY(velocityjitter) = '11 11 11';
MY(velocitymultiplier) = 0.030000;
}
// debris
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '350.0 350.0 350.0';
+ MY(velocityjitter) = '350 350 350';
MY(velocitymultiplier) = 0.200000;
}
// sparks
MY(count) = 1;
MY(gravity) = 1;
MY(notunderwater) = true;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.300000;
MY(size_max) = 0.300000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.200000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 1.500000;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '20.0 20.0 20.0';
+ MY(velocityjitter) = '20 20 20';
MY(velocitymultiplier) = 0.030000;
}
SUB(grenadelauncher_muzzleflash) {
MY(color_min) = "0xffdb96";
MY(color_max) = "0xff5400";
MY(count) = 16;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 10;
MY(size_max) = 20;
MY(stretchfactor) = 2.500000;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.500000;
}
MY(bounce) = 1;
MY(color_min) = "0x101010";
MY(color_max) = "0x000000";
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 10;
MY(size_min) = 3;
MY(size_max) = 2;
MY(tex_max) = 8;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '1.0 1.0 1.0';
+ MY(velocityjitter) = '1 1 1';
MY(velocitymultiplier) = -0.020000;
}
// fire
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = -1;
}
// bubbles
MY(trailspacing) = 16;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
// hookbomb trail
MY(color_max) = "0x000000";
MY(gravity) = -0.110000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = 11;
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_max) = 8;
MY(trailspacing) = 6;
MY(type) = "smoke";
- MY(velocityjitter) = '3.0 3.0 3.0';
+ MY(velocityjitter) = '3 3 3';
MY(velocitymultiplier) = -0.020000;
}
// marker
MY(trailspacing) = 32;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
DEF(grenade_explode);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 1.0';
+ MY(lightcolor) = '8 4 1';
MY(lightradiusfade) = 400;
MY(lightradius) = 250;
- MY(originjitter) = '26.0 26.0 26.0';
+ MY(originjitter) = '26 26 26';
MY(size_min) = 48;
MY(size_max) = 48;
MY(tex_min) = 8;
MY(count) = 40;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 20;
MY(size_min) = 16;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// fire effect which make bright dot inside
SUB(grenade_explode) {
MY(count) = 15;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 40;
MY(size_min) = 6;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// smoke
SUB(grenade_explode) {
MY(size_max) = 40;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// underwater bubbles
SUB(grenade_explode) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 6;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '196.0 196.0 196.0';
+ MY(velocityjitter) = '196 196 196';
}
// underwatershockwave
SUB(grenade_explode) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 0.100000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '424.0 424.0 624.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '424 424 624';
+ MY(velocityoffset) = '0 0 80';
}
// debris
SUB(grenade_explode) {
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '324.0 324.0 524.0';
+ MY(velocityjitter) = '324 324 524';
}
DEF(electro_muzzleflash);
MY(color_min) = "0x283880";
MY(color_max) = "0x283880";
MY(countabsolute) = 1;
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(tex_min) = 65;
MY(tex_max) = 65;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(electro_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0xD9FDFF";
MY(count) = 7;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 5;
MY(size_max) = 15;
MY(stretchfactor) = 1.500000;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.500000;
}
SUB(electro_muzzleflash) {
MY(color_max) = "0xD9FDFF";
MY(count) = 5;
MY(gravity) = 1.300000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 7;
MY(size_max) = 6;
MY(stretchfactor) = 0.100000;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '350.0 350.0 350.0';
+ MY(velocityjitter) = '350 350 350';
MY(velocitymultiplier) = 2.500000;
}
MY(alpha_fade) = 968;
MY(color_min) = "0x283880";
MY(color_max) = "0x283880";
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradius) = 90;
MY(size_min) = 3;
MY(size_max) = 3;
MY(color_min) = "0x629dff";
MY(color_max) = "0x0018ff";
MY(count) = 1.500000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = -20;
MY(size_min) = 2;
MY(size_max) = 4;
MY(tex_max) = 42;
MY(trailspacing) = 12;
MY(type) = "snow";
- MY(velocityjitter) = '50.0 50.0 50.0';
- MY(velocityoffset) = '0.0 0.0 15.0';
+ MY(velocityjitter) = '50 50 50';
+ MY(velocityoffset) = '0 0 15';
}
DEF(electro_impact);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '3.1 4.4 10.0';
+ MY(lightcolor) = '3.1 4.4 10';
MY(lightradiusfade) = 250;
MY(lightradius) = 250;
- MY(originjitter) = '17.0 17.0 17.0';
+ MY(originjitter) = '17 17 17';
MY(size_min) = 32;
MY(size_max) = 32;
MY(tex_min) = 59;
MY(color_max) = "0x0018ff";
MY(count) = 30;
MY(gravity) = -0.300000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -9999;
MY(tex_min) = 42;
MY(tex_max) = 42;
MY(type) = "smoke";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// inner cloud of smoke
SUB(electro_impact) {
MY(color_min) = "0x629dff";
MY(color_max) = "0x0018ff";
MY(count) = 30;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(sizeincrease) = 50;
MY(size_min) = 20;
MY(size_max) = 24;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '320.0 320.0 320.0';
+ MY(velocityjitter) = '320 320 320';
}
DEF(electro_ballexplode);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '3.1 4.4 10.0';
+ MY(lightcolor) = '3.1 4.4 10';
MY(lightradiusfade) = 250;
MY(lightradius) = 250;
- MY(originjitter) = '17.0 17.0 17.0';
+ MY(originjitter) = '17 17 17';
MY(size_min) = 32;
MY(size_max) = 32;
MY(tex_min) = 59;
MY(color_min) = "0xFDFFD9";
MY(color_max) = "0xFDFFD9";
MY(count) = 64;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 2;
MY(stretchfactor) = 0.400000;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// inner cloud of smoke
SUB(electro_ballexplode) {
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 8;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
DEF(electro_combo);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 5.0 6.0';
+ MY(lightcolor) = '4 5 6';
MY(lightradiusfade) = 300;
MY(lightradius) = 400;
- MY(originjitter) = '17.0 17.0 17.0';
+ MY(originjitter) = '17 17 17';
MY(size_min) = 64;
MY(size_max) = 64;
MY(tex_min) = 59;
MY(size_max) = 32;
MY(tex_max) = 7;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
SUB(electro_combo) {
MY(alpha_min) = 444;
MY(color_max) = "0x0054ff";
MY(count) = 32;
MY(gravity) = 0.300000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 2;
MY(size_max) = 4;
MY(stretchfactor) = 2;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '312.0 312.0 312.0';
+ MY(velocityjitter) = '312 312 312';
MY(velocitymultiplier) = 3;
}
// inner cloud of smoke
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 0.125000;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// shockwave
SUB(electro_combo) {
MY(color_min) = "0xdd9cff";
MY(color_max) = "0xff0090";
MY(count) = 0.500000;
- MY(lightcolor) = '1.6 0.2 2.0';
+ MY(lightcolor) = '1.6 0.2 2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(size_min) = 15;
MY(color_min) = "0xA080C0";
MY(color_max) = "0xA080C0";
MY(count) = 5;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 5;
MY(size_max) = 10;
MY(stretchfactor) = 1.500000;
MY(tex_min) = 35;
MY(tex_max) = 36;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.300000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '12.0 12.0 12.0';
+ MY(originjitter) = '12 12 12';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// purple splash
SUB(crylink_impact) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// purple splash
SUB(crylink_impact) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
DEF(nex_muzzleflash);
MY(color_min) = "0x202020";
MY(color_max) = "0x0072ff";
MY(count) = 12;
- MY(lightcolor) = '2.0 2.5 3.0';
+ MY(lightcolor) = '2 2.5 3';
MY(lightradiusfade) = 200;
MY(lightradius) = 200;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = -100;
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '180.0 180.0 180.0';
+ MY(velocityjitter) = '180 180 180';
MY(velocitymultiplier) = 1.400000;
}
SUB(nex_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0xD9FDFF";
MY(count) = 50;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '600.0 600.0 600.0';
+ MY(velocityjitter) = '600 600 600';
MY(velocitymultiplier) = 1.500000;
}
MY(tex_max) = 8;
MY(trailspacing) = 12;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
}
// bright core
SUB(nex_beam) {
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 6.0 8.0';
+ MY(lightcolor) = '4 6 8';
MY(lightradiusfade) = 250;
MY(lightradius) = 200;
- MY(originjitter) = '14.0 14.0 14.0';
+ MY(originjitter) = '14 14 14';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 24;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '600.0 600.0 600.0';
+ MY(velocityjitter) = '600 600 600';
MY(velocitymultiplier) = 0.500000;
}
// small sparks that live longer
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 600.0';
+ MY(velocityjitter) = '300 300 600';
MY(velocitymultiplier) = 2.500000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 2;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(hagar_muzzleflash) {
MY(color_min) = "0xff8400";
MY(color_max) = "0xff4200";
MY(count) = 15;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -400;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.500000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 2;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 300;
MY(lightradius) = 60;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(hagar_bounce) {
MY(color_max) = "0xFFFDD9";
MY(count) = 15;
MY(gravity) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '600.0 600.0 600.0';
+ MY(velocityjitter) = '600 600 600';
MY(velocitymultiplier) = 0.500000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 1.0';
+ MY(lightcolor) = '8 4 1';
MY(lightradiusfade) = 400;
MY(lightradius) = 120;
- MY(originjitter) = '14.0 14.0 14.0';
+ MY(originjitter) = '14 14 14';
MY(size_min) = 28;
MY(size_max) = 38;
MY(tex_min) = 8;
MY(count) = 3.500000;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 5;
MY(size_min) = 16;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
// fire effect which expands then slows
SUB(hagar_explode) {
MY(count) = 12;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 15;
MY(size_min) = 20;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '286.0 286.0 286.0';
+ MY(velocityjitter) = '286 286 286';
}
// smoke
SUB(hagar_explode) {
MY(size_max) = 40;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '244.0 244.0 244.0';
+ MY(velocityjitter) = '244 244 244';
}
// underwater bubbles
SUB(hagar_explode) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// bouncing sparks
SUB(hagar_explode) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 0.100000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '224.0 224.0 224.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '224 224 224';
+ MY(velocityoffset) = '0 0 80';
}
DEF(rocketlauncher_muzzleflash);
MY(size_max) = 1;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 40.0';
+ MY(velocityjitter) = '40 40 40';
MY(velocitymultiplier) = -0.130000;
}
SUB(rocketlauncher_muzzleflash) {
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(count) = 6;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(tex_min) = 35;
MY(tex_max) = 36;
MY(type) = "smoke";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.300000;
}
MY(bounce) = 1;
MY(color_min) = "0x000000";
MY(color_max) = "0x666666";
- MY(lightcolor) = '6.0 3.0 1.0';
+ MY(lightcolor) = '6 3 1';
MY(lightradius) = 150;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(tex_max) = 8;
MY(trailspacing) = 10;
MY(type) = "smoke";
- MY(velocityjitter) = '3.0 3.0 3.0';
+ MY(velocityjitter) = '3 3 3';
MY(velocitymultiplier) = -0.020000;
}
// fire
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = -1.500000;
}
// bubbles
MY(trailspacing) = 16;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
MY(velocitymultiplier) = -0.310000;
}
// sparks
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(notunderwater) = true;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.500000;
MY(size_max) = 0.500000;
MY(stretchfactor) = 0.300000;
MY(tex_max) = 40;
MY(trailspacing) = 20;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = -0.310000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 1.0';
+ MY(lightcolor) = '8 4 1';
MY(lightradiusfade) = 750;
MY(lightradius) = 400;
- MY(originjitter) = '23.0 23.0 23.0';
+ MY(originjitter) = '23 23 23';
MY(size_min) = 72;
MY(size_max) = 72;
MY(tex_min) = 8;
MY(count) = 32;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 45;
MY(size_min) = 33;
MY(size_max) = 44;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// fire effect 2
SUB(rocket_explode) {
MY(count) = 14;
MY(liquidfriction) = 19;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 55;
MY(size_min) = 33;
MY(size_max) = 44;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '912.0 912.0 912.0';
+ MY(velocityjitter) = '912 912 912';
}
// smoke
SUB(rocket_explode) {
MY(size_max) = 40;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '444.0 444.0 444.0';
+ MY(velocityjitter) = '444 444 444';
}
// underwater bubbles
SUB(rocket_explode) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// underwatershockwave
SUB(rocket_explode) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 0.100000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '424.0 424.0 624.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '424 424 624';
+ MY(velocityoffset) = '0 0 80';
}
// debris
SUB(rocket_explode) {
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '324.0 324.0 524.0';
+ MY(velocityjitter) = '324 324 524';
}
DEF(grapple_muzzleflash);
SUB(grapple_muzzleflash) {
- MY(lightcolor) = '1.0 0.0 0.0';
+ MY(lightcolor) = '1 0 0';
MY(lightradiusfade) = 800;
MY(lightradius) = 160;
}
DEF(grapple_impact);
SUB(grapple_impact) {
- MY(lightcolor) = '1.0 0.0 0.0';
+ MY(lightcolor) = '1 0 0';
MY(lightradiusfade) = 800;
MY(lightradius) = 160;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(size_min) = 0.400000;
MY(size_max) = 0.400000;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 100;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '12.0 12.0 12.0';
+ MY(originjitter) = '12 12 12';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// purple splash
SUB(crylink_impactbig) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// purple splash
SUB(crylink_impactbig) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
#include "effectinfo_gentle.inc"
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 5;
MY(size_max) = 5;
MY(tex_min) = 56;
MY(color_max) = "0xFFFFFF";
MY(count) = 0.025000;
MY(liquidfriction) = 16;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 2;
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '15.0 15.0 15.0';
+ MY(velocityjitter) = '15 15 15';
MY(velocitymultiplier) = 20;
}
// sparks
MY(count) = 0.025000;
MY(gravity) = 1;
MY(notunderwater) = true;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.600000;
MY(size_max) = 0.600000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 100;
}
MY(color_max) = "0xff5a00";
MY(count) = 8;
MY(gravity) = -0.500000;
- MY(originjitter) = '5.0 5.0 5.0';
+ MY(originjitter) = '5 5 5';
MY(sizeincrease) = -1;
MY(size_min) = 1;
MY(size_max) = 11;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '1.0 1.0 50.0';
+ MY(velocityjitter) = '1 1 50';
}
// smoke
SUB(torch_small) {
MY(color_max) = "0x111111";
MY(count) = 4;
MY(gravity) = -0.300000;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(sizeincrease) = 5;
MY(size_min) = 5;
MY(size_max) = 10;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
DEF(fountain01);
MY(color_max) = "0xcfd1ff";
MY(count) = 16;
MY(gravity) = 0.600000;
- MY(originjitter) = '5.0 5.0 5.0';
+ MY(originjitter) = '5 5 5';
MY(sizeincrease) = 20;
MY(size_min) = 10;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "snow";
- MY(velocityjitter) = '81.0 81.0 150.0';
+ MY(velocityjitter) = '81 81 150';
MY(velocitymultiplier) = 2;
}
MY(color_min) = "0x807aff";
MY(color_max) = "0x4463d5";
MY(count) = 25;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = -160;
MY(size_min) = 150;
MY(size_max) = 200;
MY(tex_min) = 38;
MY(tex_max) = 38;
MY(type) = "static";
- MY(velocityjitter) = '550.0 550.0 550.0';
+ MY(velocityjitter) = '550 550 550';
}
// decal in the air
SUB(hookbomb_explode) {
MY(color_min) = "0x807aff";
MY(color_max) = "0x4463d5";
MY(countabsolute) = 3;
- MY(originoffset) = '0.0 0.0 6.0';
+ MY(originoffset) = '0 0 6';
MY(sizeincrease) = -60;
MY(size_min) = 160;
MY(size_max) = 200;
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 80;
MY(size_max) = 100;
MY(tex_min) = 39;
MY(color_max) = "0x4463d5";
MY(count) = 30;
MY(gravity) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = -60;
MY(size_min) = 20;
MY(size_max) = 30;
MY(tex_min) = 38;
MY(tex_max) = 38;
MY(type) = "spark";
- MY(velocityjitter) = '1900.0 1900.0 1300.0';
+ MY(velocityjitter) = '1900 1900 1300';
MY(velocitymultiplier) = 0.500000;
}
MY(trailspacing) = 32;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
DEF(fire_big);
MY(color_max) = "0xff5a00";
MY(count) = 26;
MY(gravity) = -0.500000;
- MY(originjitter) = '33.0 33.0 33.0';
+ MY(originjitter) = '33 33 33';
MY(sizeincrease) = -3;
MY(size_min) = 11;
MY(size_max) = 31;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(fire_big) {
MY(color_max) = "0x111111";
MY(count) = 11;
MY(gravity) = -0.300000;
- MY(originjitter) = '44.0 44.0 44.0';
+ MY(originjitter) = '44 44 44';
MY(sizeincrease) = 11;
MY(size_min) = 22;
MY(size_max) = 33;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
-}
-
-#define flare(name, colormin, colormax) \
- DEF(name##_flare); \
- SUB(name##_flare) /* smoke */ { \
- MY(alpha_min) = 200; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 160; \
- MY(bounce) = 1; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(count) = 10.500000; \
- MY(gravity) = -0.240000; \
- MY(originjitter) = '2.0 2.0 0.0'; \
- MY(sizeincrease) = 11; \
- MY(size_min) = 1; \
- MY(size_max) = 11; \
- MY(tex_max) = 8; \
- MY(type) = "alphastatic"; \
- MY(velocityjitter) = '15.0 15.0 30.0'; \
- }
+ MY(velocityjitter) = '11 11 50';
+}
+
+#define flare(name, colormin, colormax) DEF(name##_flare); SUB(name##_flare) /* smoke */ { MY(alpha_min) = 200; MY(alpha_max) = 256; MY(alpha_fade) = 160; MY(bounce) = 1; MY(color_min) = colormin; MY(color_max) = colormax; MY(count) = 10.500000; MY(gravity) = -0.240000; MY(originjitter) = '2 2 0'; MY(sizeincrease) = 11; MY(size_min) = 1; MY(size_max) = 11; MY(tex_max) = 8; MY(type) = "alphastatic"; MY(velocityjitter) = '15 15 30'; }
flare(red, "0xff0000", "0xdc7171")
flare(blue, "0x0000ff", "0x7194dc")
MY(size_max) = 11;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '190.0 190.0 50.0';
+ MY(velocityjitter) = '190 190 50';
}
DEF(smoke_large);
MY(size_max) = 21;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '390.0 390.0 390.0';
+ MY(velocityjitter) = '390 390 390';
}
DEF(sparks);
MY(color_max) = "0xFFFDD9";
MY(count) = 15;
MY(gravity) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 200.0';
+ MY(velocityjitter) = '300 300 200';
MY(velocitymultiplier) = 1.500000;
}
MY(color_max) = "0x4463d5";
MY(count) = 35;
MY(gravity) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.500000;
}
MY(size_max) = 3;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '19.0 19.0 19.0';
+ MY(velocityjitter) = '19 19 19';
MY(velocitymultiplier) = 14;
}
MY(color_max) = "0x000000";
MY(count) = 10;
MY(gravity) = -0.100000;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 5;
MY(size_min) = 10;
MY(size_max) = 40;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '5.0 5.0 20.0';
+ MY(velocityjitter) = '5 5 20';
}
// golden dust (create it once per second to cover large area in small yellow particles)
MY(color_min) = "0xff9600";
MY(color_max) = "0xffefb8";
MY(count) = 25;
- MY(originjitter) = '500.0 500.0 500.0';
+ MY(originjitter) = '500 500 500';
MY(sizeincrease) = -0.300000;
MY(size_min) = 2;
MY(size_max) = 3;
MY(color_max) = "0xff0000";
MY(count) = 25;
MY(gravity) = -0.100000;
- MY(originjitter) = '5.0 5.0 100.0';
+ MY(originjitter) = '5 5 100';
MY(sizeincrease) = -0.050000;
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '50.0 50.0 0.0';
+ MY(velocityjitter) = '50 50 0';
}
DEF(armorrepair_fx);
MY(color_max) = "0x00ff00";
MY(count) = 25;
MY(gravity) = -0.100000;
- MY(originjitter) = '5.0 5.0 50.0';
+ MY(originjitter) = '5 5 50';
MY(sizeincrease) = -0.050000;
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '50.0 50.0 0.0';
+ MY(velocityjitter) = '50 50 0';
}
DEF(ammoregen_fx);
MY(color_max) = "0x0000ff";
MY(count) = 25;
MY(gravity) = -0.100000;
- MY(originjitter) = '5.0 5.0 50.0';
+ MY(originjitter) = '5 5 50';
MY(sizeincrease) = -0.050000;
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '50.0 50.0 0.0';
+ MY(velocityjitter) = '50 50 0';
}
// red-yellow flame like fx
MY(color_max) = "0xff7800";
MY(count) = 2.500000;
MY(gravity) = -0.060000;
- MY(originjitter) = '5.0 5.0 5.0';
+ MY(originjitter) = '5 5 5';
MY(sizeincrease) = 10;
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 35;
MY(tex_max) = 36;
MY(type) = "smoke";
- MY(velocityjitter) = '25.0 25.0 25.0';
+ MY(velocityjitter) = '25 25 25';
}
// pieces of glass or ice falling on the floor
MY(color_max) = "0xb2d3e6";
MY(count) = 15;
MY(gravity) = 1.300000;
- MY(originjitter) = '30.0 30.0 30.0';
+ MY(originjitter) = '30 30 30';
MY(size_min) = 3;
MY(size_max) = 7;
MY(tex_min) = 44;
MY(time_min) = 1;
MY(time_max) = 3;
MY(type) = "alphastatic";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
}
// cover small area in poison gas, spawn it once per second
MY(color_max) = "0x7db843";
MY(count) = 15;
MY(gravity) = -0.010000;
- MY(originjitter) = '333.0 333.0 50.0';
+ MY(originjitter) = '333 333 50';
MY(sizeincrease) = 30;
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '5.0 5.0 5.0';
+ MY(velocityjitter) = '5 5 5';
}
// cover small area in icy mist, spawn it once per second
MY(color_max) = "0x75e7ff";
MY(count) = 10;
MY(gravity) = -0.010000;
- MY(originjitter) = '333.0 333.0 0.0';
+ MY(originjitter) = '333 333 0';
MY(sizeincrease) = 10;
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '5.0 5.0 30.0';
+ MY(velocityjitter) = '5 5 30';
}
SUB(icefield) {
MY(alpha_min) = 256;
MY(color_max) = "0x75e7ff";
MY(count) = 5;
MY(gravity) = -0.001000;
- MY(originjitter) = '333.0 333.0 0.0';
+ MY(originjitter) = '333 333 0';
MY(sizeincrease) = 10;
MY(size_min) = 1;
MY(size_max) = 1;
MY(color_max) = "0xff5a00";
MY(count) = 100;
MY(gravity) = -0.060000;
- MY(originjitter) = '180.0 180.0 0.0';
+ MY(originjitter) = '180 180 0';
MY(sizeincrease) = 20;
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '5.0 5.0 30.0';
+ MY(velocityjitter) = '5 5 30';
}
// flames that stay on the ground
SUB(firefield) {
MY(color_min) = "0x8f0d00";
MY(color_max) = "0xff5a00";
MY(count) = 50;
- MY(originjitter) = '180.0 180.0 0.0';
+ MY(originjitter) = '180 180 0';
MY(sizeincrease) = 40;
MY(size_min) = 1;
MY(size_max) = 1;
MY(color_max) = "0x111111";
MY(count) = 20;
MY(gravity) = -0.020000;
- MY(originjitter) = '180.0 180.0 0.0';
+ MY(originjitter) = '180 180 0';
MY(sizeincrease) = 7;
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 11.0';
+ MY(velocityjitter) = '40 40 11';
MY(velocitymultiplier) = 30;
}
// slow fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 40.0';
+ MY(velocityjitter) = '40 40 40';
MY(velocitymultiplier) = 20;
}
// very slow and small fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '30.0 30.0 30.0';
+ MY(velocityjitter) = '30 30 30';
MY(velocitymultiplier) = 10;
}
// decreasing fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
MY(velocitymultiplier) = 15;
}
// smoke
MY(color_min) = "0x000000";
MY(color_max) = "0x111111";
MY(count) = 0.500000;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 7;
MY(size_min) = 5;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
MY(velocitymultiplier) = 20;
- MY(velocityoffset) = '0.0 0.0 10.0';
+ MY(velocityoffset) = '0 0 10';
}
// port-o-launch trail
MY(alpha_fade) = 968;
MY(color_min) = "0x404040";
MY(color_max) = "0x404040";
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradius) = 90;
MY(size_min) = 3;
MY(size_max) = 3;
MY(color_min) = "0x404040";
MY(color_max) = "0x404040";
MY(count) = 1.500000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = -20;
MY(size_min) = 2;
MY(size_max) = 4;
MY(tex_max) = 42;
MY(trailspacing) = 12;
MY(type) = "snow";
- MY(velocityjitter) = '50.0 50.0 50.0';
- MY(velocityoffset) = '0.0 0.0 15.0';
+ MY(velocityjitter) = '50 50 50';
+ MY(velocityoffset) = '0 0 15';
}
// TAG trail
MY(alpha_fade) = 968;
MY(color_min) = "0x804000";
MY(color_max) = "0x804000";
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradius) = 90;
MY(size_min) = 3;
MY(size_max) = 3;
MY(color_min) = "0xff8000";
MY(color_max) = "0xff8000";
MY(count) = 1.500000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = -20;
MY(size_min) = 2;
MY(size_max) = 4;
MY(tex_max) = 42;
MY(trailspacing) = 12;
MY(type) = "snow";
- MY(velocityjitter) = '50.0 50.0 50.0';
- MY(velocityoffset) = '0.0 0.0 15.0';
+ MY(velocityjitter) = '50 50 50';
+ MY(velocityoffset) = '0 0 15';
}
DEF(flac_explode);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 1.0';
+ MY(lightcolor) = '8 4 1';
MY(lightradiusfade) = 400;
MY(lightradius) = 150;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(size_min) = 18;
MY(size_max) = 28;
MY(tex_min) = 8;
MY(count) = 3;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 5;
MY(size_min) = 6;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
// fire effect which expands then slows
SUB(flac_explode) {
MY(count) = 6;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 15;
MY(size_min) = 10;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// smoke
SUB(flac_explode) {
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '244.0 244.0 244.0';
+ MY(velocityjitter) = '244 244 244';
}
// underwater bubbles
SUB(flac_explode) {
MY(count) = 8;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 2;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// bouncing sparks
SUB(flac_explode) {
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '256 256 256';
+ MY(velocityoffset) = '0 0 80';
}
// bullet trail (somewhat like a tracer)
MY(trailspacing) = 16;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
// smoke emitter for small pipes
MY(color_max) = "0x000000";
MY(count) = 10;
MY(gravity) = -0.100000;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 20;
MY(size_min) = 6;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '5.0 5.0 20.0';
+ MY(velocityjitter) = '5 5 20';
}
// crylink trail
MY(tex_max) = 32;
MY(trailspacing) = 128;
MY(type) = "static";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
MY(velocitymultiplier) = -0.010000;
}
// crylink main trail
MY(tex_max) = 3;
MY(trailspacing) = 16;
MY(type) = "static";
- MY(velocityjitter) = '2.0 2.0 2.0';
+ MY(velocityjitter) = '2 2 2';
MY(velocitymultiplier) = 0.010000;
}
MY(count) = 1.500000;
MY(gravity) = 0.050000;
MY(liquidfriction) = 1;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1.500000;
MY(size_max) = 2;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 0.0';
+ MY(velocityjitter) = '32 32 0';
}
DEF(alien_blood);
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "spark";
- MY(velocityjitter) = '99.0 99.0 55.0';
+ MY(velocityjitter) = '99 99 55';
}
// blood mist
SUB(alien_blood) {
MY(color_min) = "0xDC9BCD";
MY(color_max) = "0xDC9BCD";
MY(countabsolute) = 1;
- MY(originjitter) = '11.0 11.0 11.0';
+ MY(originjitter) = '11 11 11';
MY(sizeincrease) = 20;
MY(size_min) = 25;
MY(size_max) = 30;
MY(tex_min) = 70;
MY(tex_max) = 70;
MY(type) = "spark";
- MY(velocityjitter) = '264.0 264.0 264.0';
- MY(velocityoffset) = '0.0 0.0 100.0';
+ MY(velocityjitter) = '264 264 264';
+ MY(velocityoffset) = '0 0 100';
}
// shockwave
SUB(robot_blood) {
MY(color_min) = "0xff8400";
MY(color_max) = "0xffbb72";
MY(countabsolute) = 1;
- MY(originjitter) = '11.0 11.0 11.0';
+ MY(originjitter) = '11 11 11';
MY(sizeincrease) = 800;
MY(size_min) = 2;
MY(size_max) = 2;
MY(color_min) = "0xff3000";
MY(color_max) = "0xff8585";
MY(count) = 0.100000;
- MY(originjitter) = '41.0 41.0 21.0';
+ MY(originjitter) = '41 41 21';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_max) = 32;
MY(trailspacing) = 20;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = -0.100000;
}
MY(tex_max) = 32;
MY(trailspacing) = 16;
MY(type) = "spark";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = -0.300000;
}
// fire
MY(tex_max) = 55;
MY(trailspacing) = 16;
MY(type) = "spark";
- MY(velocityjitter) = '44.0 44.0 44.0';
+ MY(velocityjitter) = '44 44 44';
}
// arcs
SUB(robot_TR_BLOOD) {
MY(tex_max) = 73;
MY(trailspacing) = 128;
MY(type) = "smoke";
- MY(velocityjitter) = '44.0 44.0 44.0';
+ MY(velocityjitter) = '44 44 44';
}
DEF(alien_TR_SLIGHTBLOOD);
MY(tex_max) = 32;
MY(trailspacing) = 64;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 0.500000;
}
MY(tex_max) = 32;
MY(trailspacing) = 64;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 0.500000;
}
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
DEF(bloodshower);
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "spark";
- MY(velocityjitter) = '764.0 764.0 764.0';
+ MY(velocityjitter) = '764 764 764';
}
// center blood
SUB(bloodshower) {
MY(color_min) = "0xA8FFFF";
MY(color_max) = "0xA8FFFFF";
MY(countabsolute) = 0.100000;
- MY(originjitter) = '50.0 50.0 50.0';
+ MY(originjitter) = '50 50 50';
MY(sizeincrease) = 300;
MY(size_min) = 1;
MY(size_max) = 28;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "spark";
- MY(velocityjitter) = '764.0 764.0 764.0';
+ MY(velocityjitter) = '764 764 764';
}
// center blood
SUB(bloodshower) {
MY(color_min) = "0xA8FFFF";
MY(color_max) = "0xA8FFFFF";
MY(countabsolute) = 0.100000;
- MY(originjitter) = '50.0 50.0 50.0';
+ MY(originjitter) = '50 50 50';
MY(sizeincrease) = 300;
MY(size_min) = 1;
MY(size_max) = 28;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "spark";
- MY(velocityjitter) = '764.0 764.0 764.0';
+ MY(velocityjitter) = '764 764 764';
}
// arc
SUB(robot_bloodshower) {
MY(color_min) = "0xff3000";
MY(color_max) = "0xff8585";
MY(count) = 2.500000;
- MY(originjitter) = '150.0 150.0 150.0';
+ MY(originjitter) = '150 150 150';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 99;
MY(tex_min) = 71;
MY(tex_max) = 73;
MY(type) = "smoke";
- MY(velocityjitter) = '44.0 44.0 44.0';
+ MY(velocityjitter) = '44 44 44';
}
// shockwave
SUB(robot_bloodshower) {
MY(type) = "smoke";
}
-#define ground_quake(name, colormin, colormax) \
- DEF(name##_ground_quake); \
- SUB(name##_ground_quake) /* smoke */ { \
- MY(airfriction) = 3; \
- MY(alpha_min) = 100; \
- MY(alpha_max) = 126; \
- MY(alpha_fade) = 200; \
- MY(bounce) = 1.100000; \
- MY(color_min) = "0x111111"; \
- MY(color_max) = "0xbbbbbb"; \
- MY(count) = 90; \
- MY(gravity) = 0.500000; \
- MY(notunderwater) = true; \
- MY(sizeincrease) = 100; \
- MY(size_min) = 20; \
- MY(size_max) = 50; \
- MY(tex_max) = 8; \
- MY(time_min) = 5; \
- MY(time_max) = 10; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '190.0 190.0 50.0'; \
- } \
- SUB(name##_ground_quake) { \
- MY(airfriction) = 4; \
- MY(alpha_min) = 100; \
- MY(alpha_max) = 126; \
- MY(alpha_fade) = 200; \
- MY(bounce) = 1.200000; \
- MY(color_min) = "0x111111"; \
- MY(color_max) = "0x979797"; \
- MY(count) = 40; \
- MY(gravity) = 0.200000; \
- MY(notunderwater) = true; \
- MY(sizeincrease) = 60; \
- MY(size_min) = 10; \
- MY(size_max) = 30; \
- MY(tex_max) = 8; \
- MY(time_min) = 10; \
- MY(time_max) = 15; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '190.0 190.0 50.0'; \
- } \
- SUB(name##_ground_quake) { \
- MY(alpha_min) = 200; \
- MY(alpha_max) = 356; \
- MY(alpha_fade) = 512; \
- MY(bounce) = 6; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(count) = 16; \
- MY(gravity) = -0.500000; \
- MY(originjitter) = '33.0 33.0 33.0'; \
- MY(sizeincrease) = 5; \
- MY(size_min) = 4; \
- MY(size_max) = 20; \
- MY(tex_min) = 48; \
- MY(tex_max) = 55; \
- MY(time_min) = 15; \
- MY(time_max) = 25; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '22.0 22.0 50.0'; \
- } \
- SUB(name##_ground_quake) /* smoke */ { \
- MY(alpha_min) = 200; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 200; \
- MY(bounce) = 2; \
- MY(color_min) = "0x000000"; \
- MY(color_max) = "0xffffff"; \
- MY(count) = 11; \
- MY(gravity) = -0.300000; \
- MY(originjitter) = '44.0 44.0 44.0'; \
- MY(sizeincrease) = 11; \
- MY(size_min) = 22; \
- MY(size_max) = 33; \
- MY(tex_max) = 8; \
- MY(time_min) = 25; \
- MY(time_max) = 35; \
- MY(type) = "alphastatic"; \
- MY(velocityjitter) = '11.0 11.0 50.0'; \
- } \
- /**/
+#define ground_quake(name, colormin, colormax) DEF(name##_ground_quake); SUB(name##_ground_quake) /* smoke */ { MY(airfriction) = 3; MY(alpha_min) = 100; MY(alpha_max) = 126; MY(alpha_fade) = 200; MY(bounce) = 1.100000; MY(color_min) = "0x111111"; MY(color_max) = "0xbbbbbb"; MY(count) = 90; MY(gravity) = 0.500000; MY(notunderwater) = true; MY(sizeincrease) = 100; MY(size_min) = 20; MY(size_max) = 50; MY(tex_max) = 8; MY(time_min) = 5; MY(time_max) = 10; MY(type) = "smoke"; MY(velocityjitter) = '190 190 50'; } SUB(name##_ground_quake) { MY(airfriction) = 4; MY(alpha_min) = 100; MY(alpha_max) = 126; MY(alpha_fade) = 200; MY(bounce) = 1.200000; MY(color_min) = "0x111111"; MY(color_max) = "0x979797"; MY(count) = 40; MY(gravity) = 0.200000; MY(notunderwater) = true; MY(sizeincrease) = 60; MY(size_min) = 10; MY(size_max) = 30; MY(tex_max) = 8; MY(time_min) = 10; MY(time_max) = 15; MY(type) = "smoke"; MY(velocityjitter) = '190 190 50'; } SUB(name##_ground_quake) { MY(alpha_min) = 200; MY(alpha_max) = 356; MY(alpha_fade) = 512; MY(bounce) = 6; MY(color_min) = colormin; MY(color_max) = colormax; MY(count) = 16; MY(gravity) = -0.500000; MY(originjitter) = '33 33 33'; MY(sizeincrease) = 5; MY(size_min) = 4; MY(size_max) = 20; MY(tex_min) = 48; MY(tex_max) = 55; MY(time_min) = 15; MY(time_max) = 25; MY(type) = "smoke"; MY(velocityjitter) = '22 22 50'; } SUB(name##_ground_quake) /* smoke */ { MY(alpha_min) = 200; MY(alpha_max) = 256; MY(alpha_fade) = 200; MY(bounce) = 2; MY(color_min) = "0x000000"; MY(color_max) = "0xffffff"; MY(count) = 11; MY(gravity) = -0.300000; MY(originjitter) = '44 44 44'; MY(sizeincrease) = 11; MY(size_min) = 22; MY(size_max) = 33; MY(tex_max) = 8; MY(time_min) = 25; MY(time_max) = 35; MY(type) = "alphastatic"; MY(velocityjitter) = '11 11 50'; } /**/
ground_quake(red, "0x9E6A64", "0x91302D")
ground_quake(blue, "0x64679E", "0x2D4C91")
#include "effectinfo_gentle_morphed.inc"
// Team / hit vaporizer effects
-#define TE_TEI_G3(name, colormin1, colormax1, colormin2, colormax2) \
- DEF(TE_TEI_G3##name); \
- SUB(TE_TEI_G3##name) { \
- MY(alpha_min) = 128; \
- MY(alpha_max) = 128; \
- MY(alpha_fade) = 256; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(countabsolute) = 1; \
- MY(size_min) = 4; \
- MY(size_max) = 4; \
- MY(tex_min) = 200; \
- MY(tex_max) = 200; \
- MY(type) = "beam"; \
- } \
- SUB(TE_TEI_G3##name) { \
- MY(airfriction) = -4; \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 512; \
- MY(color_min) = colormin2; \
- MY(color_max) = colormax2; \
- MY(sizeincrease) = 3; \
- MY(size_min) = 0.300000; \
- MY(size_max) = 0.300000; \
- MY(tex_min) = 46; \
- MY(tex_max) = 46; \
- MY(trailspacing) = 8; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '3.0 3.0 3.0'; \
- } \
- DEF(TE_TEI_G3##name##_HIT); \
- SUB(TE_TEI_G3##name##_HIT) { \
- MY(alpha_min) = 128; \
- MY(alpha_max) = 128; \
- MY(alpha_fade) = 256; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(countabsolute) = 1; \
- MY(size_min) = 8; \
- MY(size_max) = 8; \
- MY(tex_min) = 200; \
- MY(tex_max) = 200; \
- MY(type) = "beam"; \
- } \
- SUB(TE_TEI_G3##name##_HIT) /* rings */ { \
- MY(airfriction) = -4; \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 512; \
- MY(color_min) = "0xFFFFFF"; \
- MY(color_max) = colormax1; \
- MY(sizeincrease) = -2; \
- MY(size_min) = 2; \
- MY(size_max) = 2; \
- MY(trailspacing) = 20; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '2.0 2.0 2.0'; \
- } \
- SUB(TE_TEI_G3##name##_HIT) { \
- MY(airfriction) = -4; \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 512; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(sizeincrease) = -6; \
- MY(size_min) = 10; \
- MY(size_max) = 10; \
- MY(trailspacing) = 40; \
- MY(type) = "smoke"; \
- } \
- /**/
+#define TE_TEI_G3(name, colormin1, colormax1, colormin2, colormax2) DEF(TE_TEI_G3##name); SUB(TE_TEI_G3##name) { MY(alpha_min) = 128; MY(alpha_max) = 128; MY(alpha_fade) = 256; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(countabsolute) = 1; MY(size_min) = 4; MY(size_max) = 4; MY(tex_min) = 200; MY(tex_max) = 200; MY(type) = "beam"; } SUB(TE_TEI_G3##name) { MY(airfriction) = -4; MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 512; MY(color_min) = colormin2; MY(color_max) = colormax2; MY(sizeincrease) = 3; MY(size_min) = 0.300000; MY(size_max) = 0.300000; MY(tex_min) = 46; MY(tex_max) = 46; MY(trailspacing) = 8; MY(type) = "smoke"; MY(velocityjitter) = '3 3 3'; } DEF(TE_TEI_G3##name##_HIT); SUB(TE_TEI_G3##name##_HIT) { MY(alpha_min) = 128; MY(alpha_max) = 128; MY(alpha_fade) = 256; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(countabsolute) = 1; MY(size_min) = 8; MY(size_max) = 8; MY(tex_min) = 200; MY(tex_max) = 200; MY(type) = "beam"; } SUB(TE_TEI_G3##name##_HIT) /* rings */ { MY(airfriction) = -4; MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 512; MY(color_min) = "0xFFFFFF"; MY(color_max) = colormax1; MY(sizeincrease) = -2; MY(size_min) = 2; MY(size_max) = 2; MY(trailspacing) = 20; MY(type) = "smoke"; MY(velocityjitter) = '2 2 2'; } SUB(TE_TEI_G3##name##_HIT) { MY(airfriction) = -4; MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 512; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(sizeincrease) = -6; MY(size_min) = 10; MY(size_max) = 10; MY(trailspacing) = 40; MY(type) = "smoke"; } /**/
TE_TEI_G3(RED, "0xFF0000", "0xFF0011", "0x200000", "0x400000")
TE_TEI_G3(BLUE, "0x0000FF", "0x1100FF", "0x000020", "0x000040")
TE_TEI_G3(YELLOW, "0xffff00", "0xffff11", "0x202000", "0x404000")
MY(tex_max) = 55;
MY(trailspacing) = 2;
MY(type) = "smoke";
- MY(velocityjitter) = '10.0 10.0 2.0';
+ MY(velocityjitter) = '10 10 2';
}
// slowfire
SUB(firemine) {
MY(tex_max) = 55;
MY(trailspacing) = 2;
MY(type) = "smoke";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
}
// very slow and small fire
SUB(firemine) {
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '8.0 8.0 8.0';
+ MY(velocityjitter) = '8 8 8';
}
// decreasing fire
SUB(firemine) {
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '3.0 3.0 3.0';
+ MY(velocityjitter) = '3 3 3';
}
// smoke
SUB(firemine) {
MY(color_min) = "0x000000";
MY(color_max) = "0x111111";
MY(count) = 0.500000;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = 1;
MY(size_min) = 1;
MY(size_max) = 4;
MY(tex_max) = 8;
MY(trailspacing) = 8;
MY(type) = "alphastatic";
- MY(velocityoffset) = '0.0 0.0 3.0';
+ MY(velocityoffset) = '0 0 3';
}
// fastfire
SUB(firemine) {
MY(tex_max) = 55;
MY(trailspacing) = 2;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 11.0';
+ MY(velocityjitter) = '40 40 11';
}
// slow fire
SUB(fireball) {
MY(tex_max) = 55;
MY(trailspacing) = 2;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 40.0';
+ MY(velocityjitter) = '40 40 40';
}
// very slow and small fire
SUB(fireball) {
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '30.0 30.0 30.0';
+ MY(velocityjitter) = '30 30 30';
}
// decreasing fire
SUB(fireball) {
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
}
// smoke
SUB(fireball) {
MY(color_min) = "0x000000";
MY(color_max) = "0x111111";
MY(count) = 0.500000;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 7;
MY(size_min) = 5;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(trailspacing) = 8;
MY(type) = "alphastatic";
- MY(velocityoffset) = '0.0 0.0 10.0';
+ MY(velocityoffset) = '0 0 10';
}
// fast fire
SUB(fireball) {
MY(size_max) = 1;
MY(stretchfactor) = 0.700000;
MY(type) = "spark";
- MY(velocityjitter) = '1.0 1.0 1.0';
+ MY(velocityjitter) = '1 1 1';
MY(velocitymultiplier) = 10;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '4.0 2.0 0.5';
+ MY(lightcolor) = '4 2 0.5';
MY(lightradiusfade) = 500;
MY(lightradius) = 500;
- MY(originjitter) = '56.0 56.0 56.0';
+ MY(originjitter) = '56 56 56';
MY(size_min) = 72;
MY(size_max) = 72;
MY(tex_min) = 8;
MY(count) = 128;
MY(liquidfriction) = 4;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// underwater bubbles
SUB(fireball_explode) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// bouncing sparks
SUB(fireball_explode) {
MY(size_min) = 2;
MY(size_max) = 2;
MY(type) = "spark";
- MY(velocityjitter) = '384.0 384.0 384.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '384 384 384';
+ MY(velocityoffset) = '0 0 80';
}
DEF(fireball_muzzleflash);
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 2;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(fireball_muzzleflash) {
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(count) = 15;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.500000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 2;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(fireball_preattack_muzzleflash) {
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(count) = 15;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.500000;
}
MY(color_min) = "0x202020";
MY(color_max) = "0x404040";
MY(count) = 2;
- MY(lightcolor) = '2.0 1.5 0.2';
+ MY(lightcolor) = '2 1.5 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(fireball_bfgdamage) {
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(count) = 15;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.500000;
}
MY(color_max) = "0xff5a00";
MY(count) = 100;
MY(gravity) = -0.500000;
- MY(originjitter) = '12.0 12.0 34.0';
- MY(originoffset) = '0.0 0.0 10.0';
+ MY(originjitter) = '12 12 34';
+ MY(originoffset) = '0 0 10';
MY(sizeincrease) = -1;
MY(size_min) = 5;
MY(size_max) = 21;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(EF_FLAME) {
MY(color_max) = "0x111111";
MY(count) = 50;
MY(gravity) = -0.300000;
- MY(originjitter) = '12.0 12.0 34.0';
- MY(originoffset) = '0.0 0.0 10.0';
+ MY(originjitter) = '12 12 34';
+ MY(originoffset) = '0 0 10';
MY(sizeincrease) = 6;
MY(size_min) = 11;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
SUB(EF_FLAME) {
MY(count) = 0.500000;
MY(tex_max) = 8;
MY(trailspacing) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '4.0 4.0 4.0';
+ MY(velocityjitter) = '4 4 4';
}
SUB(tr_rifle) {
MY(alpha_min) = 256;
MY(trailspacing) = 32;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
// rocket guiding start
MY(count) = 2;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '48.0 48.0 48.0';
+ MY(velocityjitter) = '48 48 48';
MY(velocitymultiplier) = -0.100000;
}
// bouncing sparks
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
MY(velocitymultiplier) = -0.300000;
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityoffset) = '0 0 80';
}
SUB(rocket_guide) {
MY(alpha_min) = 100;
MY(color_min) = "0xb44215";
MY(color_max) = "0x880000";
MY(count) = 3;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.200000;
}
SUB(laser_gauntlet) {
MY(color_min) = "0xff4200";
MY(color_max) = "0xff0000";
MY(count) = 6;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -100;
MY(size_min) = 7;
MY(size_max) = 9;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.200000;
}
MY(color_min) = "0x220000";
MY(color_max) = "0x880000";
MY(countabsolute) = 1;
- MY(lightcolor) = '3.0 0.1 0.1';
+ MY(lightcolor) = '3 0.1 0.1';
MY(lightradiusfade) = 500;
MY(lightradius) = 150;
MY(sizeincrease) = -100;
MY(color_min) = "0xb44215";
MY(color_max) = "0x880000";
MY(count) = 3;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.200000;
}
// fire
MY(color_min) = "0xff4200";
MY(color_max) = "0xff0000";
MY(count) = 6;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -100;
MY(size_min) = 7;
MY(size_max) = 9;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 0.200000;
}
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 11.0';
+ MY(velocityjitter) = '40 40 11';
MY(velocitymultiplier) = 30;
}
// slow fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '40.0 40.0 40.0';
+ MY(velocityjitter) = '40 40 40';
MY(velocitymultiplier) = 20;
}
// very slow and small fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '30.0 30.0 30.0';
+ MY(velocityjitter) = '30 30 30';
MY(velocitymultiplier) = 10;
}
// decreasing fire
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
MY(velocitymultiplier) = 15;
}
// smoke
MY(color_min) = "0x000000";
MY(color_max) = "0x111111";
MY(count) = 0.500000;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 7;
MY(size_min) = 5;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
MY(velocitymultiplier) = 20;
- MY(velocityoffset) = '0.0 0.0 10.0';
+ MY(velocityoffset) = '0 0 10';
}
#include "effectinfo_gentle_happy.inc"
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '3.1 4.4 10.0';
+ MY(lightcolor) = '3.1 4.4 10';
MY(lightradiusfade) = 500;
MY(lightradius) = 50;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 59;
MY(tex_min) = 65;
MY(tex_max) = 65;
MY(type) = "spark";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 2000;
}
SUB(electro_lightning) {
MY(color_min) = "0xDDFDFF";
MY(color_max) = "0xFDFDFF";
MY(count) = 30;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 2;
MY(size_max) = 5;
MY(stretchfactor) = 1.500000;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.500000;
}
SUB(electro_lightning) {
MY(color_max) = "0xF9FDFF";
MY(count) = 50;
MY(gravity) = 1.300000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 2;
MY(size_max) = 3;
MY(stretchfactor) = 0.100000;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '350.0 350.0 350.0';
+ MY(velocityjitter) = '350 350 350';
MY(velocitymultiplier) = 2.500000;
}
MY(tex_min) = 65;
MY(tex_max) = 65;
MY(type) = "spark";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 2000;
}
SUB(gauntlet_lightning) {
MY(color_min) = "0xDD0000";
MY(color_max) = "0xFD0000";
MY(count) = 30;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 2;
MY(size_max) = 5;
MY(stretchfactor) = 1.500000;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.500000;
}
SUB(gauntlet_lightning) {
MY(color_max) = "0xF90000";
MY(count) = 50;
MY(gravity) = 1.300000;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 2;
MY(size_max) = 3;
MY(stretchfactor) = 0.100000;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '350.0 350.0 350.0';
+ MY(velocityjitter) = '350 350 350';
MY(velocitymultiplier) = 2.500000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '12.0 12.0 12.0';
+ MY(originjitter) = '12 12 12';
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 47;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// purple splash
SUB(crylink_joinexplode) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// purple splash
SUB(crylink_joinexplode) {
MY(size_min) = 16;
MY(size_max) = 16;
MY(type) = "static";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// sparks for keepaway ball touch
MY(color_max) = "0x0054ff";
MY(count) = 35;
MY(gravity) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '300.0 300.0 300.0';
+ MY(velocityjitter) = '300 300 300';
MY(velocitymultiplier) = 0.500000;
}
MY(tex_max) = 8;
MY(trailspacing) = 48;
MY(type) = "smoke";
- MY(velocityjitter) = '4.0 4.0 4.0';
+ MY(velocityjitter) = '4 4 4';
}
SUB(tr_rifle_weak) {
MY(alpha_min) = 256;
MY(trailspacing) = 192;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
// red smoke emiter
MY(size_max) = 10;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '0.0 0.0 5.0';
+ MY(velocityjitter) = '0 0 5';
MY(velocitymultiplier) = 15;
}
MY(bounce) = 1;
MY(color_min) = "0x000000";
MY(color_max) = "0x666666";
- MY(lightcolor) = '6.0 3.0 1.0';
+ MY(lightcolor) = '6 3 1';
MY(lightradius) = 100;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(tex_max) = 8;
MY(trailspacing) = 10;
MY(type) = "smoke";
- MY(velocityjitter) = '3.0 3.0 3.0';
+ MY(velocityjitter) = '3 3 3';
MY(velocitymultiplier) = -0.020000;
}
// fire
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = -1.500000;
}
// bubbles
MY(trailspacing) = 16;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
MY(velocitymultiplier) = -0.310000;
}
// sparks
MY(color_min) = "0xFFFDD9";
MY(color_max) = "0xFFFDD9";
MY(notunderwater) = true;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 0.500000;
MY(size_max) = 0.500000;
MY(stretchfactor) = 0.300000;
MY(tex_max) = 40;
MY(trailspacing) = 20;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = -0.310000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 0.0';
+ MY(lightcolor) = '8 4 0';
MY(lightradiusfade) = 1750;
MY(lightradius) = 600;
- MY(originjitter) = '23.0 23.0 23.0';
+ MY(originjitter) = '23 23 23';
MY(size_min) = 172;
MY(size_max) = 172;
MY(tex_min) = 8;
MY(count) = 64;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '80.0 80.0 80.0';
+ MY(originjitter) = '80 80 80';
MY(sizeincrease) = 45;
MY(size_min) = 133;
MY(size_max) = 144;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '2512.0 2512.0 2512.0';
+ MY(velocityjitter) = '2512 2512 2512';
}
// fire rays
SUB(explosion_big) {
MY(count) = 64;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 45;
MY(size_min) = 133;
MY(size_max) = 144;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// smoke
SUB(explosion_big) {
MY(size_max) = 100;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '3444.0 3444.0 3444.0';
+ MY(velocityjitter) = '3444 3444 3444';
}
// bouncing sparks
SUB(explosion_big) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 3;
MY(size_max) = 4;
MY(stretchfactor) = 0.700000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '924.0 924.0 924.0';
- MY(velocityoffset) = '0.0 0.0 370.0';
+ MY(velocityjitter) = '924 924 924';
+ MY(velocityoffset) = '0 0 370';
}
// debris
SUB(explosion_big) {
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '1800.0 1800.0 1800.0';
- MY(velocityoffset) = '0.0 0.0 970.0';
+ MY(velocityjitter) = '1800 1800 1800';
+ MY(velocityoffset) = '0 0 970';
}
// underwater bubbles
SUB(explosion_big) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '444.0 444.0 444.0';
+ MY(velocityjitter) = '444 444 444';
}
// underwatershockwave
SUB(explosion_big) {
MY(count) = 32;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '30.0 30.0 30.0';
+ MY(originjitter) = '30 30 30';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -500;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '1512.0 1512.0 1512.0';
+ MY(velocityjitter) = '1512 1512 1512';
}
// fire effect 2
SUB(explosion_medium) {
MY(gravity) = -2;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '30.0 30.0 30.0';
+ MY(originjitter) = '30 30 30';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -150;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '1512.0 1512.0 1512.0';
+ MY(velocityjitter) = '1512 1512 1512';
}
// fire rays
SUB(explosion_medium) {
MY(count) = 14;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 40;
MY(size_min) = 43;
MY(size_max) = 74;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// smoke
SUB(explosion_medium) {
MY(color_max) = "0x000000";
MY(count) = 5;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 300;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
}
// smoke 2
SUB(explosion_medium) {
MY(count) = 10;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 100;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '500.0 500.0 500.0';
- MY(velocityoffset) = '0.0 0.0 200.0';
+ MY(velocityjitter) = '500 500 500';
+ MY(velocityoffset) = '0 0 200';
}
// smoke rays
SUB(explosion_medium) {
MY(color_max) = "0x000000";
MY(count) = 13;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 100;
MY(size_min) = 150;
MY(size_max) = 200;
MY(stretchfactor) = 50;
MY(tex_max) = 8;
MY(type) = "spark";
- MY(velocityjitter) = '250.0 250.0 250.0';
+ MY(velocityjitter) = '250 250 250';
}
// bouncing sparks
SUB(explosion_medium) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(size_min) = 2;
MY(size_max) = 3;
MY(stretchfactor) = 0.700000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '624.0 624.0 624.0';
- MY(velocityoffset) = '0.0 0.0 370.0';
+ MY(velocityjitter) = '624 624 624';
+ MY(velocityoffset) = '0 0 370';
}
// underwater bubbles
SUB(explosion_medium) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '444.0 444.0 444.0';
+ MY(velocityjitter) = '444 444 444';
}
// underwatershockwave
SUB(explosion_medium) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// fire effect 2
SUB(explosion_small) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '912.0 912.0 912.0';
+ MY(velocityjitter) = '912 912 912';
}
// fire rays
SUB(explosion_small) {
MY(count) = 14;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 30;
MY(size_min) = 13;
MY(size_max) = 54;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// underwater bubbles
SUB(explosion_small) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// underwatershockwave
SUB(explosion_small) {
MY(count) = 3;
MY(gravity) = -0.500000;
MY(notunderwater) = true;
- MY(originjitter) = '55.0 55.0 55.0';
+ MY(originjitter) = '55 55 55';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 60;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '140.0 140.0 200.0';
- MY(velocityoffset) = '0.0 0.0 200.0';
+ MY(velocityjitter) = '140 140 200';
+ MY(velocityoffset) = '0 0 200';
}
// small smoke ( more precise than big one, for spamming on damaged parts like raptors spinner )
MY(size_max) = 100;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '40.0 40.0 400.0';
- MY(velocityoffset) = '0.0 0.0 200.0';
+ MY(velocityjitter) = '40 40 400';
+ MY(velocityoffset) = '0 0 200';
}
// metal impact effect
MY(color_max) = "0x886666";
MY(count) = 1;
MY(gravity) = -0.010000;
- MY(originjitter) = '20.0 20.0 5.0';
+ MY(originjitter) = '20 20 5';
MY(sizeincrease) = 10;
MY(size_min) = 3;
MY(size_max) = 6;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 300.0';
+ MY(velocityjitter) = '200 200 300';
MY(velocitymultiplier) = 2;
}
MY(color_max) = "0xcc9966";
MY(count) = 1;
MY(gravity) = -0.010000;
- MY(originjitter) = '20.0 20.0 5.0';
+ MY(originjitter) = '20 20 5';
MY(sizeincrease) = 15;
MY(size_min) = 3;
MY(size_max) = 6;
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '124.0 124.0 324.0';
+ MY(velocityjitter) = '124 124 324';
}
// wood impact effect
MY(color_max) = "0xcc9966";
MY(count) = 1;
MY(gravity) = -0.010000;
- MY(originjitter) = '20.0 20.0 5.0';
+ MY(originjitter) = '20 20 5';
MY(sizeincrease) = 10;
MY(size_min) = 3;
MY(size_max) = 6;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '180.0 180.0 260.0';
+ MY(velocityjitter) = '180 180 260';
MY(velocitymultiplier) = 2;
}
MY(color_min) = "0x000000";
MY(color_max) = "0x420000";
MY(count) = 0.500000;
- MY(originjitter) = '11.0 11.0 11.0';
+ MY(originjitter) = '11 11 11';
MY(size_min) = 8;
MY(size_max) = 12;
MY(tex_max) = 8;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
MY(velocitymultiplier) = 5;
}
MY(bounce) = 1;
MY(color_min) = "0x101010";
MY(color_max) = "0x000000";
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 10;
MY(size_min) = 3;
MY(size_max) = 2;
MY(tex_max) = 8;
MY(trailspacing) = 4;
MY(type) = "smoke";
- MY(velocityjitter) = '1.0 1.0 1.0';
+ MY(velocityjitter) = '1 1 1';
MY(velocitymultiplier) = -0.020000;
}
// fire
MY(tex_max) = 55;
MY(trailspacing) = 4;
MY(type) = "static";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = -1;
}
// bubbles
MY(trailspacing) = 16;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
// laser damage effect
MY(color_max) = "0xff4400";
MY(count) = 3;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(color_min) = "0x000000";
MY(color_max) = "0x420000";
MY(count) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 8;
MY(size_max) = 16;
MY(tex_max) = 8;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(color_min) = "0x000000";
MY(color_max) = "0x204010";
MY(count) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 8;
MY(size_max) = 16;
MY(tex_max) = 8;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '64.0 64.0 64.0';
+ MY(velocityjitter) = '64 64 64';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(color_min) = "0x000000";
MY(color_max) = "0x301860";
MY(count) = 1;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 8;
MY(size_max) = 16;
MY(tex_max) = 8;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(count) = 3;
MY(gravity) = -0.500000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -15;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(damage_minelayer) {
MY(count) = 2;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = 5;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// mortar damage effect
MY(count) = 3;
MY(gravity) = -0.500000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -15;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(damage_mortar) {
MY(count) = 2;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = 5;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// arc damage effect
MY(gravity) = -0.000100;
MY(liquidfriction) = 0.600000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = 180;
MY(startangle_max) = 360;
MY(spin_min) = -30;
MY(tex_min) = 47;
MY(tex_max) = 47;
MY(type) = "static";
- MY(velocityjitter) = '6.0 6.0 12.0';
+ MY(velocityjitter) = '6 6 12';
}
// plasma smoke
SUB(damage_arc) {
MY(color_max) = "0x002266";
MY(count) = 4;
MY(notunderwater) = true;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "spark";
- MY(velocityjitter) = '24.0 24.0 24.0';
+ MY(velocityjitter) = '24 24 24';
}
// electro damage effect
MY(gravity) = -0.000100;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(startangle_min) = 180;
MY(startangle_max) = 360;
MY(spin_min) = -30;
MY(tex_min) = 47;
MY(tex_max) = 47;
MY(type) = "static";
- MY(velocityjitter) = '8.0 8.0 16.0';
+ MY(velocityjitter) = '8 8 16';
}
// plasma smoke
SUB(damage_electro) {
MY(color_max) = "0x002266";
MY(count) = 4;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "spark";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
}
// crylink damage effect
MY(gravity) = -0.000100;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(startangle_min) = 180;
MY(startangle_max) = 360;
MY(spin_min) = -30;
MY(tex_min) = 38;
MY(tex_max) = 38;
MY(type) = "static";
- MY(velocityjitter) = '10.0 10.0 20.0';
+ MY(velocityjitter) = '10 10 20';
}
// plasma smoke
SUB(damage_crylink) {
MY(count) = 4;
MY(gravity) = 0.001000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(size_min) = 0.500000;
MY(size_max) = 0.500000;
MY(type) = "spark";
- MY(velocityjitter) = '12.0 12.0 12.0';
+ MY(velocityjitter) = '12 12 12';
}
// hlac damage effect
MY(color_max) = "0xff4400";
MY(count) = 3;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(count) = 1;
MY(gravity) = -0.000100;
MY(liquidfriction) = 0.600000;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(startangle_min) = 180;
MY(startangle_max) = 360;
MY(spin_min) = -30;
MY(tex_min) = 47;
MY(tex_max) = 47;
MY(type) = "static";
- MY(velocityjitter) = '8.0 8.0 16.0';
+ MY(velocityjitter) = '8 8 16';
}
// plasma smoke
SUB(damage_vortex) {
MY(color_min) = "0x6688ff";
MY(color_max) = "0x226688";
MY(count) = 2;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 300.0';
+ MY(velocityjitter) = '100 100 300';
MY(velocitymultiplier) = 3;
}
MY(count) = 2;
MY(gravity) = -0.000100;
MY(liquidfriction) = 0.600000;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(startangle_min) = 180;
MY(startangle_max) = 360;
MY(spin_min) = -30;
MY(tex_min) = 47;
MY(tex_max) = 47;
MY(type) = "static";
- MY(velocityjitter) = '8.0 8.0 16.0';
+ MY(velocityjitter) = '8 8 16';
}
// plasma smoke
SUB(damage_vaporizer) {
MY(color_min) = "0x6688ff";
MY(color_max) = "0x226688";
MY(count) = 4;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_max) = 180;
MY(spin_min) = -30;
MY(spin_max) = 30;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 300.0';
+ MY(velocityjitter) = '100 100 300';
MY(velocitymultiplier) = 3;
}
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '32.0 32.0 32.0';
+ MY(velocityjitter) = '32 32 32';
MY(velocitymultiplier) = 5;
}
// blood mist
MY(count) = 3;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -10;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(damage_seeker) {
MY(count) = 2;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = 10;
MY(size_min) = 2;
MY(size_max) = 4;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// hagar damage effect
MY(count) = 3;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -10;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(damage_hagar) {
MY(count) = 2;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = 10;
MY(size_min) = 2;
MY(size_max) = 4;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// fireball damage effect
MY(count) = 4;
MY(gravity) = -0.500000;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = -10;
MY(size_min) = 5;
MY(size_max) = 10;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 50.0';
+ MY(velocityjitter) = '22 22 50';
}
// smoke
SUB(damage_fireball) {
MY(count) = 4;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(sizeincrease) = 10;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// rocketlauncher damage effect
MY(count) = 3;
MY(gravity) = -0.700000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = -10;
MY(size_min) = 5;
MY(size_max) = 10;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '22.0 22.0 30.0';
+ MY(velocityjitter) = '22 22 30';
}
// smoke
SUB(damage_devastator) {
MY(count) = 3;
MY(gravity) = -0.300000;
MY(notunderwater) = true;
- MY(originjitter) = '4.0 4.0 4.0';
+ MY(originjitter) = '4 4 4';
MY(sizeincrease) = 10;
MY(size_min) = 4;
MY(size_max) = 8;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '11.0 11.0 50.0';
+ MY(velocityjitter) = '11 11 50';
}
// fireflies
MY(color_min) = "0xff9600";
MY(color_max) = "0xffefb8";
MY(count) = 1;
- MY(originjitter) = '32.0 32.0 32.0';
- MY(originoffset) = '8.0 8.0 8.0';
+ MY(originjitter) = '32 32 32';
+ MY(originoffset) = '8 8 8';
MY(sizeincrease) = -0.300000;
MY(size_min) = 2;
MY(size_max) = 3;
MY(time_min) = 1;
MY(time_max) = 2;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 64.0';
- MY(velocityoffset) = '2.0 2.0 2.0';
+ MY(velocityjitter) = '64 64 64';
+ MY(velocityoffset) = '2 2 2';
}
DEF(healray_muzzleflash);
MY(color_min) = "0x283880";
MY(color_max) = "0x283880";
MY(countabsolute) = 1;
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(tex_min) = 65;
MY(tex_max) = 65;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(healray_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0x00f0ff";
MY(count) = 22;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 3;
MY(size_min) = 1;
MY(size_max) = 15;
MY(tex_min) = 71;
MY(tex_max) = 73;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.400000;
}
SUB(healray_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0x00f0ff";
MY(count) = 4;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 1;
MY(stretchfactor) = 0.200000;
MY(tex_min) = 70;
MY(tex_max) = 70;
MY(type) = "spark";
- MY(velocityjitter) = '650.0 650.0 650.0';
+ MY(velocityjitter) = '650 650 650';
MY(velocitymultiplier) = 1.100000;
}
MY(color_min) = "0xd800ff";
MY(color_max) = "0xd800ff";
MY(countabsolute) = 1;
- MY(lightcolor) = '0.0 4.4 0.0';
+ MY(lightcolor) = '0 4.4 0';
MY(lightradiusfade) = 450;
MY(lightradius) = 125;
- MY(originjitter) = '17.0 17.0 17.0';
+ MY(originjitter) = '17 17 17';
MY(size_min) = 32;
MY(size_max) = 32;
MY(tex_min) = 59;
MY(color_max) = "0x84c52f";
MY(count) = 30;
MY(gravity) = 2;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 2;
MY(tex_min) = 70;
MY(tex_max) = 70;
MY(type) = "spark";
- MY(velocityjitter) = '1112.0 1112.0 1112.0';
+ MY(velocityjitter) = '1112 1112 1112';
}
// inner cloud of smoke
SUB(healray_impact) {
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "smoke";
- MY(velocityjitter) = '120.0 120.0 420.0';
+ MY(velocityjitter) = '120 120 420';
}
DEF(bigplasma_muzzleflash);
MY(color_min) = "0x283880";
MY(color_max) = "0x283880";
MY(countabsolute) = 1;
- MY(lightcolor) = '1.5 3.0 6.0';
+ MY(lightcolor) = '1.5 3 6';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(tex_min) = 65;
MY(tex_max) = 65;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(bigplasma_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0x00f0ff";
MY(count) = 14;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(sizeincrease) = 135;
MY(size_min) = 5;
MY(size_max) = 10;
MY(tex_min) = 51;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '350.0 350.0 350.0';
+ MY(velocityjitter) = '350 350 350';
MY(velocitymultiplier) = 0.400000;
}
SUB(bigplasma_muzzleflash) {
MY(color_min) = "0xD9FDFF";
MY(color_max) = "0x00f0ff";
MY(count) = 4;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 20;
MY(size_max) = 20;
MY(stretchfactor) = 0.200000;
MY(tex_min) = 70;
MY(tex_max) = 70;
MY(type) = "spark";
- MY(velocityjitter) = '650.0 650.0 650.0';
+ MY(velocityjitter) = '650 650 650';
MY(velocitymultiplier) = 1.100000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '3.1 4.4 10.0';
+ MY(lightcolor) = '3.1 4.4 10';
MY(lightradiusfade) = 450;
MY(lightradius) = 125;
- MY(originjitter) = '17.0 17.0 17.0';
+ MY(originjitter) = '17 17 17';
MY(size_min) = 32;
MY(size_max) = 32;
MY(tex_min) = 59;
MY(color_max) = "0x0018ff";
MY(count) = 30;
MY(gravity) = 2;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(size_min) = 1;
MY(size_max) = 2;
MY(tex_min) = 70;
MY(tex_max) = 70;
MY(type) = "spark";
- MY(velocityjitter) = '1512.0 1512.0 1512.0';
+ MY(velocityjitter) = '1512 1512 1512';
}
// inner cloud of smoke
SUB(bigplasma_impact) {
MY(color_min) = "0x629dff";
MY(color_max) = "0x0018ff";
MY(count) = 15;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -9;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '320.0 320.0 320.0';
+ MY(velocityjitter) = '320 320 320';
}
// smoke
SUB(bigplasma_impact) {
MY(color_max) = "0x000000";
MY(count) = 16;
MY(gravity) = 0.400000;
- MY(originjitter) = '80.0 80.0 10.0';
+ MY(originjitter) = '80 80 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 2;
MY(size_max) = 30;
MY(tex_max) = 7;
MY(type) = "smoke";
- MY(velocityjitter) = '100.0 100.0 200.0';
- MY(velocityoffset) = '0.0 0.0 180.0';
+ MY(velocityjitter) = '100 100 200';
+ MY(velocityoffset) = '0 0 180';
}
// smoke in the middle
SUB(bigplasma_impact) {
MY(color_max) = "0x000000";
MY(count) = 10;
MY(gravity) = -0.200000;
- MY(originjitter) = '80.0 80.0 80.0';
+ MY(originjitter) = '80 80 80';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 20;
MY(size_max) = 70;
MY(tex_max) = 7;
MY(type) = "alphastatic";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
}
#include "effectinfo_ctf.inc"
// spawn_point -- team idle spawn point effect
-#define spawn_point(name, color) \
- DEF(spawn_point_##name); \
- SUB(spawn_point_##name) { \
- MY(airfriction) = 0.200000; \
- MY(alpha_min) = 64; \
- MY(alpha_max) = 128; \
- MY(alpha_fade) = 128; \
- MY(color_min) = color; \
- MY(color_max) = color; \
- MY(count) = 37.500000; \
- MY(gravity) = -0.100000; \
- MY(liquidfriction) = 0.800000; \
- MY(originjitter) = '16.0 16.0 64.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 2; \
- MY(type) = "static"; \
- MY(velocityjitter) = '32.0 32.0 0.0'; \
- }
+#define spawn_point(name, color) DEF(spawn_point_##name); SUB(spawn_point_##name) { MY(airfriction) = 0.200000; MY(alpha_min) = 64; MY(alpha_max) = 128; MY(alpha_fade) = 128; MY(color_min) = color; MY(color_max) = color; MY(count) = 37.500000; MY(gravity) = -0.100000; MY(liquidfriction) = 0.800000; MY(originjitter) = '16 16 64'; MY(size_min) = 1; MY(size_max) = 2; MY(type) = "static"; MY(velocityjitter) = '32 32 0'; }
spawn_point(red, "0xFF0F0F")
spawn_point(blue, "0x0F0FFF")
#undef spawn_point
// spawn_event -- team spawning effect
-#define spawn_event(name, color) \
- DEF(spawn_event_##name); \
- SUB(spawn_event_##name) { \
- MY(airfriction) = 2; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 256; \
- MY(bounce) = 1; \
- MY(color_min) = color; \
- MY(color_max) = color; \
- MY(count) = 100; \
- MY(originjitter) = '1.0 1.0 1.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 1; \
- MY(stretchfactor) = 0.600000; \
- MY(tex_min) = 64; \
- MY(tex_max) = 64; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '500.0 500.0 500.0'; \
- MY(velocitymultiplier) = 0.100000; \
- } \
- SUB(spawn_event_##name) { \
- MY(alpha_min) = 190; \
- MY(alpha_max) = 190; \
- MY(alpha_fade) = 180; \
- MY(color_min) = color; \
- MY(color_max) = color; \
- MY(countabsolute) = 1; \
- MY(sizeincrease) = -80; \
- MY(size_min) = 100; \
- MY(size_max) = 100; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(type) = "smoke"; \
- } \
- /**/
+#define spawn_event(name, color) DEF(spawn_event_##name); SUB(spawn_event_##name) { MY(airfriction) = 2; MY(alpha_max) = 256; MY(alpha_fade) = 256; MY(bounce) = 1; MY(color_min) = color; MY(color_max) = color; MY(count) = 100; MY(originjitter) = '1 1 1'; MY(size_min) = 1; MY(size_max) = 1; MY(stretchfactor) = 0.600000; MY(tex_min) = 64; MY(tex_max) = 64; MY(type) = "spark"; MY(velocityjitter) = '500 500 500'; MY(velocitymultiplier) = 0.100000; } SUB(spawn_event_##name) { MY(alpha_min) = 190; MY(alpha_max) = 190; MY(alpha_fade) = 180; MY(color_min) = color; MY(color_max) = color; MY(countabsolute) = 1; MY(sizeincrease) = -80; MY(size_min) = 100; MY(size_max) = 100; MY(tex_min) = 65; MY(tex_max) = 65; MY(type) = "smoke"; } /**/
spawn_event(red, "0xFF0F0F")
spawn_event(blue, "0x0F0FFF")
MY(color_min) = "0xb44215";
MY(color_max) = "0xff0000";
MY(count) = 1;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
MY(velocitymultiplier) = 10;
}
// fire
MY(color_min) = "0xff4200";
MY(color_max) = "0xff0000";
MY(count) = 1;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = 1.500000;
MY(size_min) = 7;
MY(size_max) = 9;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '10.0 10.0 10.0';
+ MY(velocityjitter) = '10 10 10';
MY(velocitymultiplier) = 10;
}
MY(alpha_min) = 32;
MY(alpha_max) = 32;
MY(countabsolute) = 1;
- MY(lightcolor) = '3.1 4.4 10.0';
+ MY(lightcolor) = '3.1 4.4 10';
MY(lightradiusfade) = 200;
MY(lightradius) = 50;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(size_min) = 16;
MY(size_max) = 16;
MY(tex_min) = 16;
MY(color_min) = "0xDDFDFF";
MY(color_max) = "0xFDFDFF";
MY(count) = 100;
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(startangle_max) = 360;
MY(spin_min) = -36000;
MY(spin_max) = 36000;
MY(tex_min) = 71;
MY(tex_max) = 74;
MY(type) = "static";
- MY(velocityjitter) = '250.0 250.0 250.0';
+ MY(velocityjitter) = '250 250 250';
MY(velocitymultiplier) = 100;
}
// impact sparks (underwater)
MY(count) = 100;
MY(liquidfriction) = 5;
MY(orientation) = "spark";
- MY(originjitter) = '20.0 20.0 20.0';
+ MY(originjitter) = '20 20 20';
MY(startangle_max) = 360;
MY(spin_min) = -36000;
MY(spin_max) = 36000;
MY(tex_max) = 74;
MY(type) = "static";
MY(underwater) = true;
- MY(velocityjitter) = '250.0 250.0 250.0';
+ MY(velocityjitter) = '250 250 250';
MY(velocitymultiplier) = 20;
}
// impact smoke
MY(alpha_fade) = 16384;
MY(color_min) = "0xfafad2";
MY(color_max) = "0xffffff";
- MY(originjitter) = '3.0 3.0 3.0';
- MY(relativeoriginoffset) = '10.0 0.0 0.0';
+ MY(originjitter) = '3 3 3';
+ MY(relativeoriginoffset) = '10 0 0';
MY(startangle_max) = 360;
MY(spin_min) = 360;
MY(spin_max) = 1000;
MY(time_max) = 0.050000;
MY(trailspacing) = 10;
MY(type) = "spark";
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 200;
}
// sparks on beam (underwater)
MY(color_min) = "0xfafad2";
MY(color_max) = "0xffffff";
MY(liquidfriction) = -10;
- MY(originjitter) = '30.0 30.0 30.0';
- MY(relativeoriginoffset) = '10.0 0.0 0.0';
+ MY(originjitter) = '30 30 30';
+ MY(relativeoriginoffset) = '10 0 0';
MY(startangle_max) = 360;
MY(spin_min) = 360;
MY(spin_max) = 1000;
MY(trailspacing) = 10;
MY(type) = "spark";
MY(underwater) = true;
- MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocityjitter) = '100 100 100';
MY(velocitymultiplier) = 200;
}
MY(alpha_fade) = 256;
MY(color_min) = "0x20FF20";
MY(color_max) = "0x40FF40";
- MY(relativeoriginoffset) = '5.0 0.0 0.0';
- MY(relativevelocityoffset) = '100.0 0.0 0.0';
+ MY(relativeoriginoffset) = '5 0 0';
+ MY(relativevelocityoffset) = '100 0 0';
MY(sizeincrease) = 20;
MY(size_min) = 0.100000;
MY(size_max) = 0.100000;
MY(tex_max) = 74;
MY(trailspacing) = 1500;
MY(type) = "smoke";
- MY(velocityjitter) = '3.0 3.0 3.0';
+ MY(velocityjitter) = '3 3 3';
MY(velocitymultiplier) = 200;
}
MY(color_min) = "0x00ff00";
MY(color_max) = "0x84c52f";
MY(countabsolute) = 1;
- MY(lightcolor) = '0.0 4.4 0.0';
+ MY(lightcolor) = '0 4.4 0';
MY(lightradiusfade) = 150;
MY(lightradius) = 20;
MY(sizeincrease) = -1000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "smoke";
- MY(velocityjitter) = '120.0 120.0 420.0';
+ MY(velocityjitter) = '120 120 420';
}
DEF(arc_smoke);
MY(size_max) = 10;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '0.0 0.0 16.0';
+ MY(velocityjitter) = '0 0 16';
}
// arc heat bubbles (underwater)
SUB(arc_smoke) {
MY(count) = 2;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 0.100000;
MY(size_max) = 1;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
DEF(arc_overheat);
MY(count) = 24;
MY(gravity) = -0.400000;
MY(liquidfriction) = 10;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = -24;
MY(size_min) = 6;
MY(size_max) = 12;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
DEF(arc_overheat_fire);
MY(count) = 1;
MY(gravity) = 1;
MY(liquidfriction) = 5;
- MY(originjitter) = '6.0 6.0 6.0';
+ MY(originjitter) = '6 6 6';
MY(size_min) = 0.400000;
MY(size_max) = 1;
MY(type) = "spark";
- MY(velocityjitter) = '92.0 92.0 92.0';
+ MY(velocityjitter) = '92 92 92';
MY(velocitymultiplier) = 80;
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityoffset) = '0 0 80';
}
#include "effectinfo_buffs.inc"
MY(color_min) = "0x00ff00";
MY(color_max) = "0x8f4333";
MY(count) = 2;
- MY(lightcolor) = '0.3 2.0 0.2';
+ MY(lightcolor) = '0.3 2 0.2';
MY(lightradiusfade) = 2000;
MY(lightradius) = 200;
MY(originjitter) = '1.5 1.5 1.5';
MY(size_max) = 5;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '6.0 6.0 6.0';
+ MY(velocityjitter) = '6 6 6';
MY(velocitymultiplier) = 0.010000;
}
SUB(arc_muzzleflash) {
MY(color_min) = "0x00ff00";
MY(color_max) = "0x8f4333";
MY(count) = 15;
- MY(originjitter) = '1.0 1.0 1.0';
+ MY(originjitter) = '1 1 1';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -400;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.500000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 1.0';
+ MY(lightcolor) = '8 4 1';
MY(lightradiusfade) = 400;
MY(lightradius) = 120;
- MY(originjitter) = '14.0 14.0 14.0';
+ MY(originjitter) = '14 14 14';
MY(size_min) = 28;
MY(size_max) = 38;
MY(tex_min) = 8;
MY(count) = 3.500000;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 5;
MY(size_min) = 16;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "smoke";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
// fire effect which expands then slows
SUB(arc_bolt_explode) {
MY(count) = 12;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 15;
MY(size_min) = 20;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '286.0 286.0 286.0';
+ MY(velocityjitter) = '286 286 286';
}
// underwater bubbles
SUB(arc_bolt_explode) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
// bouncing sparks
SUB(arc_bolt_explode) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 0.100000;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '224.0 224.0 224.0';
- MY(velocityoffset) = '0.0 0.0 80.0';
+ MY(velocityjitter) = '224 224 224';
+ MY(velocityoffset) = '0 0 80';
}
// weak bullet trail (somewhat like a tracer)
MY(trailspacing) = 32;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocityjitter) = '16 16 16';
}
#include "effectinfo.qh"
-#define EFFECTINFO_PARSER(on, MY) \
- on(type, MY(type) \
- ,{ demand(n == 1 && "type"); MY(type) = strzone(argv(1)); \
- }, sprintf(" %s", (MY(type)) \
- )) \
- on(airfriction, MY(airfriction) \
- ,{ demand(n == 1 && "airfriction"); MY(airfriction) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(airfriction)) \
- )) \
- on(alpha, MY(alpha_min) || MY(alpha_max) || MY(alpha_fade) \
- ,{ demand(n == 3 && "alpha"); MY(alpha_min) = stof(argv(1)); MY(alpha_max) = stof(argv(2)); MY(alpha_fade) = stof(argv(3)); \
- }, sprintf(" %s %s %s", ftos(MY(alpha_min)), ftos(MY(alpha_max)), ftos(MY(alpha_fade)) \
- )) \
- on(blend, MY(blend) \
- ,{ demand(n == 1 && "blend"); MY(blend) = strzone(argv(1)); \
- }, sprintf(" %s", (MY(blend)) \
- )) \
- on(bounce, MY(bounce) \
- ,{ demand(n == 1 && "bounce"); MY(bounce) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(bounce)) \
- )) \
- on(color, MY(color_min) || MY(color_max) \
- ,{ demand(n == 2 && "color"); MY(color_min) = strzone(argv(1)); MY(color_max) = strzone(argv(2)); \
- }, sprintf(" %s %s", (MY(color_min)), (MY(color_max)) \
- )) \
- on(countabsolute, MY(countabsolute) \
- ,{ demand(n == 1 && "countabsolute"); MY(countabsolute) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(countabsolute)) \
- )) \
- on(count, MY(count) \
- ,{ demand(n == 1 && "count"); MY(count) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(count)) \
- )) \
- on(gravity, MY(gravity) \
- ,{ demand(n == 1 && "gravity"); MY(gravity) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(gravity)) \
- )) \
- on(lightcolor, MY(lightcolor) \
- ,{ demand(n == 3 && "lightcolor"); MY(lightcolor) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(lightcolor)) \
- )) \
- on(lightradiusfade, MY(lightradiusfade) \
- ,{ demand(n == 1 && "lightradiusfade"); MY(lightradiusfade) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(lightradiusfade)) \
- )) \
- on(lightradius, MY(lightradius) \
- ,{ demand(n == 1 && "lightradius"); MY(lightradius) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(lightradius)) \
- )) \
- on(lighttime, MY(lighttime) \
- ,{ demand(n == 1 && "lighttime"); MY(lighttime) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(lighttime)) \
- )) \
- on(liquidfriction, MY(liquidfriction) \
- ,{ demand(n == 1 && "liquidfriction"); MY(liquidfriction) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(liquidfriction)) \
- )) \
- on(notunderwater, MY(notunderwater) \
- ,{ demand(n == 0 && "notunderwater"); MY(notunderwater) = true; \
- }, "" \
- ) \
- on(orientation, MY(orientation) \
- ,{ demand(n == 1 && "orientation"); MY(orientation) = strzone(argv(1)); \
- }, sprintf(" %s", (MY(orientation)) \
- )) \
- on(originjitter, MY(originjitter) \
- ,{ demand(n == 3 && "originjitter"); MY(originjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(originjitter)) \
- )) \
- on(originoffset, MY(originoffset) \
- ,{ demand(n == 3 && "originoffset"); MY(originoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(originoffset)) \
- )) \
- on(relativeoriginoffset, MY(relativeoriginoffset) \
- ,{ demand(n == 3 && "relativeoriginoffset"); MY(relativeoriginoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(relativeoriginoffset)) \
- )) \
- on(relativevelocityoffset, MY(relativevelocityoffset) \
- ,{ demand(n == 3 && "relativevelocityoffset"); MY(relativevelocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(relativevelocityoffset)) \
- )) \
- on(rotate, MY(startangle_min) || MY(startangle_max) || MY(spin_min) || MY(spin_max) \
- ,{ demand(n == 4 && "rotate"); MY(startangle_min) = stof(argv(1)); MY(startangle_max) = stof(argv(2)); MY(spin_min) = stof(argv(3)); MY(spin_max) = stof(argv(4)); \
- }, sprintf(" %s %s %s %s", ftos(MY(startangle_min)), ftos(MY(startangle_max)), ftos(MY(spin_min)), ftos(MY(spin_max)) \
- )) \
- on(sizeincrease, MY(sizeincrease) \
- ,{ demand(n == 1 && "sizeincrease"); MY(sizeincrease) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(sizeincrease)) \
- )) \
- on(size, MY(size_min) || MY(size_max) \
- ,{ demand(n == 2 && "size"); MY(size_min) = stof(argv(1)); MY(size_max) = stof(argv(2)); \
- }, sprintf(" %s %s", ftos(MY(size_min)), ftos(MY(size_max)) \
- )) \
- on(staincolor, MY(staincolor_min) || MY(staincolor_max) \
- ,{ demand(n == 2 && "staincolor"); MY(staincolor_min) = strzone(argv(1)); MY(staincolor_max) = strzone(argv(2)); \
- }, sprintf(" %s %s", (MY(staincolor_min)), (MY(staincolor_max)) \
- )) \
- on(stainsize, MY(stainsize_min) || MY(stainsize_max) \
- ,{ demand(n == 2 && "stainsize"); MY(stainsize_min) = stof(argv(1)); MY(stainsize_max) = stof(argv(2)); \
- }, sprintf(" %s %s", ftos(MY(stainsize_min)), ftos(MY(stainsize_max)) \
- )) \
- on(staintex, MY(staintex_min) || MY(staintex_max) \
- ,{ demand(n == 2 && "staintex"); MY(staintex_min) = stof(argv(1)); MY(staintex_max) = stof(argv(2)); \
- }, sprintf(" %s %s", ftos(MY(staintex_min)), ftos(MY(staintex_max)) \
- )) \
- on(stretchfactor, MY(stretchfactor) \
- ,{ demand(n == 1 && "stretchfactor"); MY(stretchfactor) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(stretchfactor)) \
- )) \
- on(tex, MY(tex_min) || MY(tex_max) \
- ,{ demand(n == 2 && "tex"); MY(tex_min) = stof(argv(1)); MY(tex_max) = stof(argv(2)); \
- }, sprintf(" %s %s", ftos(MY(tex_min)), ftos(MY(tex_max)) \
- )) \
- on(time, MY(time_min) || MY(time_max) \
- ,{ demand(n == 2 && "time"); MY(time_min) = stof(argv(1)); MY(time_max) = stof(argv(2)); \
- }, sprintf(" %s %s", ftos(MY(time_min)), ftos(MY(time_max)) \
- )) \
- on(trailspacing, MY(trailspacing) \
- ,{ demand(n == 1 && "trailspacing"); MY(trailspacing) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(trailspacing)) \
- )) \
- on(underwater, MY(underwater) \
- ,{ demand(n == 0 && "underwater"); MY(underwater) = true; \
- }, "" \
- ) \
- on(velocityjitter, MY(velocityjitter) \
- ,{ demand(n == 3 && "velocityjitter"); MY(velocityjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(velocityjitter)) \
- )) \
- on(velocitymultiplier, MY(velocitymultiplier) \
- ,{ demand(n == 1 && "velocitymultiplier"); MY(velocitymultiplier) = stof(argv(1)); \
- }, sprintf(" %s", ftos(MY(velocitymultiplier)) \
- )) \
- on(velocityoffset, MY(velocityoffset) \
- ,{ demand(n == 3 && "velocityoffset"); MY(velocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
- }, sprintf(" %v", (MY(velocityoffset)) \
- )) \
- /**/
+#define EFFECTINFO_PARSER(on, MY) on(type, MY(type) ,{ demand(n == 1 && "type"); MY(type) = strzone(argv(1)); }, sprintf(" %s", (MY(type)) )) on(airfriction, MY(airfriction) ,{ demand(n == 1 && "airfriction"); MY(airfriction) = stof(argv(1)); }, sprintf(" %s", ftos(MY(airfriction)) )) on(alpha, MY(alpha_min) || MY(alpha_max) || MY(alpha_fade) ,{ demand(n == 3 && "alpha"); MY(alpha_min) = stof(argv(1)); MY(alpha_max) = stof(argv(2)); MY(alpha_fade) = stof(argv(3)); }, sprintf(" %s %s %s", ftos(MY(alpha_min)), ftos(MY(alpha_max)), ftos(MY(alpha_fade)) )) on(blend, MY(blend) ,{ demand(n == 1 && "blend"); MY(blend) = strzone(argv(1)); }, sprintf(" %s", (MY(blend)) )) on(bounce, MY(bounce) ,{ demand(n == 1 && "bounce"); MY(bounce) = stof(argv(1)); }, sprintf(" %s", ftos(MY(bounce)) )) on(color, MY(color_min) || MY(color_max) ,{ demand(n == 2 && "color"); MY(color_min) = strzone(argv(1)); MY(color_max) = strzone(argv(2)); }, sprintf(" %s %s", (MY(color_min)), (MY(color_max)) )) on(countabsolute, MY(countabsolute) ,{ demand(n == 1 && "countabsolute"); MY(countabsolute) = stof(argv(1)); }, sprintf(" %s", ftos(MY(countabsolute)) )) on(count, MY(count) ,{ demand(n == 1 && "count"); MY(count) = stof(argv(1)); }, sprintf(" %s", ftos(MY(count)) )) on(gravity, MY(gravity) ,{ demand(n == 1 && "gravity"); MY(gravity) = stof(argv(1)); }, sprintf(" %s", ftos(MY(gravity)) )) on(lightcolor, MY(lightcolor) ,{ demand(n == 3 && "lightcolor"); MY(lightcolor) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(lightcolor)) )) on(lightradiusfade, MY(lightradiusfade) ,{ demand(n == 1 && "lightradiusfade"); MY(lightradiusfade) = stof(argv(1)); }, sprintf(" %s", ftos(MY(lightradiusfade)) )) on(lightradius, MY(lightradius) ,{ demand(n == 1 && "lightradius"); MY(lightradius) = stof(argv(1)); }, sprintf(" %s", ftos(MY(lightradius)) )) on(lighttime, MY(lighttime) ,{ demand(n == 1 && "lighttime"); MY(lighttime) = stof(argv(1)); }, sprintf(" %s", ftos(MY(lighttime)) )) on(liquidfriction, MY(liquidfriction) ,{ demand(n == 1 && "liquidfriction"); MY(liquidfriction) = stof(argv(1)); }, sprintf(" %s", ftos(MY(liquidfriction)) )) on(notunderwater, MY(notunderwater) ,{ demand(n == 0 && "notunderwater"); MY(notunderwater) = true; }, "" ) on(orientation, MY(orientation) ,{ demand(n == 1 && "orientation"); MY(orientation) = strzone(argv(1)); }, sprintf(" %s", (MY(orientation)) )) on(originjitter, MY(originjitter) ,{ demand(n == 3 && "originjitter"); MY(originjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(originjitter)) )) on(originoffset, MY(originoffset) ,{ demand(n == 3 && "originoffset"); MY(originoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(originoffset)) )) on(relativeoriginoffset, MY(relativeoriginoffset) ,{ demand(n == 3 && "relativeoriginoffset"); MY(relativeoriginoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(relativeoriginoffset)) )) on(relativevelocityoffset, MY(relativevelocityoffset) ,{ demand(n == 3 && "relativevelocityoffset"); MY(relativevelocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(relativevelocityoffset)) )) on(rotate, MY(startangle_min) || MY(startangle_max) || MY(spin_min) || MY(spin_max) ,{ demand(n == 4 && "rotate"); MY(startangle_min) = stof(argv(1)); MY(startangle_max) = stof(argv(2)); MY(spin_min) = stof(argv(3)); MY(spin_max) = stof(argv(4)); }, sprintf(" %s %s %s %s", ftos(MY(startangle_min)), ftos(MY(startangle_max)), ftos(MY(spin_min)), ftos(MY(spin_max)) )) on(sizeincrease, MY(sizeincrease) ,{ demand(n == 1 && "sizeincrease"); MY(sizeincrease) = stof(argv(1)); }, sprintf(" %s", ftos(MY(sizeincrease)) )) on(size, MY(size_min) || MY(size_max) ,{ demand(n == 2 && "size"); MY(size_min) = stof(argv(1)); MY(size_max) = stof(argv(2)); }, sprintf(" %s %s", ftos(MY(size_min)), ftos(MY(size_max)) )) on(staincolor, MY(staincolor_min) || MY(staincolor_max) ,{ demand(n == 2 && "staincolor"); MY(staincolor_min) = strzone(argv(1)); MY(staincolor_max) = strzone(argv(2)); }, sprintf(" %s %s", (MY(staincolor_min)), (MY(staincolor_max)) )) on(stainsize, MY(stainsize_min) || MY(stainsize_max) ,{ demand(n == 2 && "stainsize"); MY(stainsize_min) = stof(argv(1)); MY(stainsize_max) = stof(argv(2)); }, sprintf(" %s %s", ftos(MY(stainsize_min)), ftos(MY(stainsize_max)) )) on(staintex, MY(staintex_min) || MY(staintex_max) ,{ demand(n == 2 && "staintex"); MY(staintex_min) = stof(argv(1)); MY(staintex_max) = stof(argv(2)); }, sprintf(" %s %s", ftos(MY(staintex_min)), ftos(MY(staintex_max)) )) on(stretchfactor, MY(stretchfactor) ,{ demand(n == 1 && "stretchfactor"); MY(stretchfactor) = stof(argv(1)); }, sprintf(" %s", ftos(MY(stretchfactor)) )) on(tex, MY(tex_min) || MY(tex_max) ,{ demand(n == 2 && "tex"); MY(tex_min) = stof(argv(1)); MY(tex_max) = stof(argv(2)); }, sprintf(" %s %s", ftos(MY(tex_min)), ftos(MY(tex_max)) )) on(time, MY(time_min) || MY(time_max) ,{ demand(n == 2 && "time"); MY(time_min) = stof(argv(1)); MY(time_max) = stof(argv(2)); }, sprintf(" %s %s", ftos(MY(time_min)), ftos(MY(time_max)) )) on(trailspacing, MY(trailspacing) ,{ demand(n == 1 && "trailspacing"); MY(trailspacing) = stof(argv(1)); }, sprintf(" %s", ftos(MY(trailspacing)) )) on(underwater, MY(underwater) ,{ demand(n == 0 && "underwater"); MY(underwater) = true; }, "" ) on(velocityjitter, MY(velocityjitter) ,{ demand(n == 3 && "velocityjitter"); MY(velocityjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(velocityjitter)) )) on(velocitymultiplier, MY(velocitymultiplier) ,{ demand(n == 1 && "velocitymultiplier"); MY(velocitymultiplier) = stof(argv(1)); }, sprintf(" %s", ftos(MY(velocitymultiplier)) )) on(velocityoffset, MY(velocityoffset) ,{ demand(n == 3 && "velocityoffset"); MY(velocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); }, sprintf(" %v", (MY(velocityoffset)) )) /**/
CLASS(EffectInfo, Object)
ATTRIB(EffectInfo, effectinfo_name, string);
this.effectinfo_name = s;
}
- #define FIELDS(MY) \
- MY(airfriction, float, 0) \
- MY(alpha_min, float, 0) \
- MY(alpha_max, float, 0) \
- MY(alpha_fade, float, 0) \
- MY(blend, string, string_null) \
- MY(bounce, float, 0) \
- MY(color_min, string, string_null) \
- MY(color_max, string, string_null) \
- MY(countabsolute, float, 0) \
- MY(count, float, 0) \
- MY(gravity, float, 0) \
- MY(lightcolor, vector, '0 0 0') \
- MY(lightradiusfade, float, 0) \
- MY(lightradius, float, 0) \
- MY(lighttime, float, 0) \
- MY(liquidfriction, float, 0) \
- MY(notunderwater, bool, false) \
- MY(orientation, string, string_null) \
- MY(originjitter, vector, '0 0 0') \
- MY(originoffset, vector, '0 0 0') \
- MY(relativeoriginoffset, vector, '0 0 0') \
- MY(relativevelocityoffset, vector, '0 0 0') \
- MY(startangle_min, float, 0) \
- MY(startangle_max, float, 0) \
- MY(spin_min, float, 0) \
- MY(spin_max, float, 0) \
- MY(sizeincrease, float, 0) \
- MY(size_min, float, 0) \
- MY(size_max, float, 0) \
- MY(staincolor_min, string, string_null) \
- MY(staincolor_max, string, string_null) \
- MY(stainsize_min, float, 0) \
- MY(stainsize_max, float, 0) \
- MY(staintex_min, float, 0) \
- MY(staintex_max, float, 0) \
- MY(stretchfactor, float, 0) \
- MY(tex_min, float, 0) \
- MY(tex_max, float, 0) \
- MY(time_min, float, 0) \
- MY(time_max, float, 0) \
- MY(trailspacing, float, 0) \
- MY(type, string, string_null) \
- MY(underwater, bool, false) \
- MY(velocityjitter, vector, '0 0 0') \
- MY(velocitymultiplier, float, 0) \
- MY(velocityoffset, vector, '0 0 0') \
- /**/
+ #define FIELDS(MY) MY(airfriction, float, 0) MY(alpha_min, float, 0) MY(alpha_max, float, 0) MY(alpha_fade, float, 0) MY(blend, string, string_null) MY(bounce, float, 0) MY(color_min, string, string_null) MY(color_max, string, string_null) MY(countabsolute, float, 0) MY(count, float, 0) MY(gravity, float, 0) MY(lightcolor, vector, '0 0 0') MY(lightradiusfade, float, 0) MY(lightradius, float, 0) MY(lighttime, float, 0) MY(liquidfriction, float, 0) MY(notunderwater, bool, false) MY(orientation, string, string_null) MY(originjitter, vector, '0 0 0') MY(originoffset, vector, '0 0 0') MY(relativeoriginoffset, vector, '0 0 0') MY(relativevelocityoffset, vector, '0 0 0') MY(startangle_min, float, 0) MY(startangle_max, float, 0) MY(spin_min, float, 0) MY(spin_max, float, 0) MY(sizeincrease, float, 0) MY(size_min, float, 0) MY(size_max, float, 0) MY(staincolor_min, string, string_null) MY(staincolor_max, string, string_null) MY(stainsize_min, float, 0) MY(stainsize_max, float, 0) MY(staintex_min, float, 0) MY(staintex_max, float, 0) MY(stretchfactor, float, 0) MY(tex_min, float, 0) MY(tex_max, float, 0) MY(time_min, float, 0) MY(time_max, float, 0) MY(trailspacing, float, 0) MY(type, string, string_null) MY(underwater, bool, false) MY(velocityjitter, vector, '0 0 0') MY(velocitymultiplier, float, 0) MY(velocityoffset, vector, '0 0 0') /**/
#define MY(f, type, val) ATTRIB(EffectInfo, effectinfo_##f, type, val);
FIELDS(MY)
REGISTRY(EffectInfos, BITS(9))
#define EffectInfos_from(i) _EffectInfos_from(i, NULL)
REGISTER_REGISTRY(EffectInfos)
-#define EFFECTINFO(name) \
- ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { } \
- REGISTER(EffectInfos, EFFECTINFO, name, m_id, NEW(EffectInfoGroup)) { \
- effectinfo_##name(this, NULL); \
- }
+#define EFFECTINFO(name) ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { } REGISTER(EffectInfos, EFFECTINFO, name, m_id, NEW(EffectInfoGroup)) { effectinfo_##name(this, NULL); }
#define MY(f) this.effectinfo_##f
#define DEF(name) EFFECTINFO(name)
-#define SUB(name) \
- ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { parent = EFFECTINFO_##name; parent.children[parent.children_count++] = this = NEW(EffectInfo, #name); } \
- ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this)
+#define SUB(name) ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { parent = EFFECTINFO_##name; parent.children[parent.children_count++] = this = NEW(EffectInfo, #name); } ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this)
#include "effectinfo.inc"
#undef MY
#undef DEF
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_regeneration);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_vampire);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_ammo);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_damage);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_ssplashdamage);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_firingspeed);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_disability);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_disability_curse);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_teamboost);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_teamboost_boost);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_speed);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_jump);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_flight);
MY(count) = 1;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_radioactive);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_resurrection);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
DEF(relic_vengeance);
MY(count) = 20;
MY(gravity) = -0.100000;
MY(liquidfriction) = 0.800000;
- MY(originjitter) = '8.0 8.0 32.0';
+ MY(originjitter) = '8 8 32';
MY(size_min) = 1.500000;
MY(size_max) = 1.500000;
MY(type) = "static";
- MY(velocityjitter) = '64.0 64.0 32.0';
+ MY(velocityjitter) = '64 64 32';
}
// flag_touch -- effects for touching the flag
-#define flag_touch(name, colormin, colormax) \
- DEF(name##flag_touch); \
- SUB(name##flag_touch) { \
- MY(airfriction) = 3; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 556; \
- MY(bounce) = 1.500000; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(count) = 35; \
- MY(gravity) = 1; \
- MY(originjitter) = '1.0 1.0 1.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 3; \
- MY(tex_min) = 40; \
- MY(tex_max) = 40; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '300.0 300.0 300.0'; \
- MY(velocitymultiplier) = 0.500000; \
- }
+#define flag_touch(name, colormin, colormax) DEF(name##flag_touch); SUB(name##flag_touch) { MY(airfriction) = 3; MY(alpha_max) = 256; MY(alpha_fade) = 556; MY(bounce) = 1.500000; MY(color_min) = colormin; MY(color_max) = colormax; MY(count) = 35; MY(gravity) = 1; MY(originjitter) = '1 1 1'; MY(size_min) = 1; MY(size_max) = 3; MY(tex_min) = 40; MY(tex_max) = 40; MY(type) = "spark"; MY(velocityjitter) = '300 300 300'; MY(velocitymultiplier) = 0.500000; }
flag_touch(red, "0xFF0000", "0x970000")
flag_touch(blue, "0x0000FF", "0x000097")
flag_touch(neutral, "0xFFFFFF", "0xFFFFFF")
#undef flag_touch
-#define pass(name, colormin, colormax) \
- DEF(name##_pass); \
- SUB(name##_pass) { \
- MY(airfriction) = 5; \
- MY(alpha_min) = 64; \
- MY(alpha_max) = 128; \
- MY(alpha_fade) = 64; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(sizeincrease) = 2; \
- MY(size_min) = 2; \
- MY(size_max) = 2; \
- MY(tex_min) = 32; \
- MY(tex_max) = 32; \
- MY(trailspacing) = 64; \
- MY(type) = "static"; \
- } \
- SUB(name##_pass) { \
- MY(airfriction) = 9; \
- MY(alpha_min) = 32; \
- MY(alpha_max) = 64; \
- MY(alpha_fade) = 32; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(sizeincrease) = 8; \
- MY(size_min) = 1; \
- MY(size_max) = 1; \
- MY(tex_max) = 8; \
- MY(trailspacing) = 12; \
- MY(type) = "static"; \
- MY(velocityjitter) = '64.0 64.0 64.0'; \
- } \
- SUB(name##_pass) { \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 1280; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(size_min) = 4; \
- MY(size_max) = 4; \
- MY(trailspacing) = 12; \
- MY(type) = "static"; \
- } \
- /**/
+#define pass(name, colormin, colormax) DEF(name##_pass); SUB(name##_pass) { MY(airfriction) = 5; MY(alpha_min) = 64; MY(alpha_max) = 128; MY(alpha_fade) = 64; MY(color_min) = colormin; MY(color_max) = colormax; MY(sizeincrease) = 2; MY(size_min) = 2; MY(size_max) = 2; MY(tex_min) = 32; MY(tex_max) = 32; MY(trailspacing) = 64; MY(type) = "static"; } SUB(name##_pass) { MY(airfriction) = 9; MY(alpha_min) = 32; MY(alpha_max) = 64; MY(alpha_fade) = 32; MY(color_min) = colormin; MY(color_max) = colormax; MY(sizeincrease) = 8; MY(size_min) = 1; MY(size_max) = 1; MY(tex_max) = 8; MY(trailspacing) = 12; MY(type) = "static"; MY(velocityjitter) = '64 64 64'; } SUB(name##_pass) { MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 1280; MY(color_min) = colormin; MY(color_max) = colormax; MY(size_min) = 4; MY(size_max) = 4; MY(trailspacing) = 12; MY(type) = "static"; } /**/
pass(red, "0xFF0000", "0x970000")
pass(blue, "0x0000FF", "0x000097")
#undef pass
// cap -- team capture effect
-#define cap(name, colormin, colormax) \
- DEF(name##_cap); \
- SUB(name##_cap) { \
- MY(airfriction) = 2; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 100; \
- MY(bounce) = 1.500000; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(count) = 500; \
- MY(originjitter) = '1.0 1.0 1.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 1; \
- MY(stretchfactor) = 0.600000; \
- MY(tex_min) = 64; \
- MY(tex_max) = 64; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '1000.0 1000.0 1500.0'; \
- MY(velocitymultiplier) = 0.500000; \
- } \
- SUB(name##_cap) { \
- MY(alpha_min) = 190; \
- MY(alpha_max) = 190; \
- MY(alpha_fade) = 180; \
- MY(color_min) = colormin; \
- MY(color_max) = colormax; \
- MY(countabsolute) = 1; \
- MY(sizeincrease) = -80; \
- MY(size_min) = 150; \
- MY(size_max) = 150; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(type) = "smoke"; \
- } \
- /**/
+#define cap(name, colormin, colormax) DEF(name##_cap); SUB(name##_cap) { MY(airfriction) = 2; MY(alpha_max) = 256; MY(alpha_fade) = 100; MY(bounce) = 1.500000; MY(color_min) = colormin; MY(color_max) = colormax; MY(count) = 500; MY(originjitter) = '1 1 1'; MY(size_min) = 1; MY(size_max) = 1; MY(stretchfactor) = 0.600000; MY(tex_min) = 64; MY(tex_max) = 64; MY(type) = "spark"; MY(velocityjitter) = '1000 1000 1500'; MY(velocitymultiplier) = 0.500000; } SUB(name##_cap) { MY(alpha_min) = 190; MY(alpha_max) = 190; MY(alpha_fade) = 180; MY(color_min) = colormin; MY(color_max) = colormax; MY(countabsolute) = 1; MY(sizeincrease) = -80; MY(size_min) = 150; MY(size_max) = 150; MY(tex_min) = 65; MY(tex_max) = 65; MY(type) = "smoke"; } /**/
cap(red, "0xFF0000", "0x970000")
cap(blue, "0x0000FF", "0x000097")
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
SUB(damage_hit) {
MY(airfriction) = 5;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
SUB(damage_hit) {
MY(airfriction) = 5;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '256.0 256.0 256.0';
+ MY(velocityjitter) = '256 256 256';
}
// effect for removing player model
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
SUB(damage_dissolve) {
MY(airfriction) = 3;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
SUB(damage_dissolve) {
MY(airfriction) = 3;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "alphastatic";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '312.0 312.0 312.0';
+ MY(velocityjitter) = '312 312 312';
}
SUB(happy_damage_dissolve) {
MY(airfriction) = 3;
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '312.0 312.0 312.0';
+ MY(velocityjitter) = '312 312 312';
}
SUB(happy_damage_dissolve) {
MY(airfriction) = 3;
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '312.0 312.0 312.0';
+ MY(velocityjitter) = '312 312 312';
}
// happy damage fx for cl_gentle
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
SUB(happy_damage_hit) {
MY(airfriction) = 5;
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
SUB(happy_damage_hit) {
MY(airfriction) = 5;
MY(tex_min) = 69;
MY(tex_max) = 69;
MY(type) = "alphastatic";
- MY(velocityjitter) = '156.0 156.0 156.0';
+ MY(velocityjitter) = '156 156 156';
}
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "spark";
- MY(velocityjitter) = '356.0 356.0 456.0';
+ MY(velocityjitter) = '356 356 456';
}
SUB(morphed_damage_hit) {
MY(airfriction) = 5;
MY(color_max) = "0x9271fb";
MY(count) = 0.500000;
MY(liquidfriction) = 10;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = -24;
MY(size_min) = 24;
MY(size_max) = 24;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "smoke";
- MY(velocityjitter) = '256.0 256.0 512.0';
+ MY(velocityjitter) = '256 256 512';
}
SUB(morphed_damage_dissolve) {
MY(airfriction) = 9;
MY(tex_min) = 43;
MY(tex_max) = 43;
MY(type) = "smoke";
- MY(velocityjitter) = '256.0 256.0 512.0';
+ MY(velocityjitter) = '256 256 512';
}
SUB(morphed_damage_dissolve) {
MY(airfriction) = 3;
MY(color_max) = "0x9271fb";
MY(count) = 5;
MY(liquidfriction) = 6;
- MY(originjitter) = '22.0 22.0 76.0';
+ MY(originjitter) = '22 22 76';
MY(sizeincrease) = -16;
MY(size_min) = 44;
MY(size_max) = 44;
MY(tex_min) = 46;
MY(tex_max) = 46;
MY(type) = "smoke";
- MY(velocityjitter) = '400.0 400.0 0.0';
+ MY(velocityjitter) = '400 400 0';
}
MY(staintex_max) = 24;
MY(tex_max) = 8;
MY(type) = "blood";
- MY(velocityjitter) = '156.0 156.0 212.0';
+ MY(velocityjitter) = '156 156 212';
}
// front blood
SUB(particlegibs_damage_hit) {
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '6.0 6.0 30.0';
+ MY(velocityjitter) = '6 6 30';
MY(velocitymultiplier) = -1;
}
// back blood
MY(count) = 0.100000;
MY(gravity) = 1;
MY(liquidfriction) = 3;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(sizeincrease) = 10;
MY(size_min) = 5;
MY(size_max) = 15;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '26.0 26.0 112.0';
+ MY(velocityjitter) = '26 26 112';
MY(velocitymultiplier) = 2;
}
MY(count) = 32;
MY(gravity) = 1;
MY(liquidfriction) = 6;
- MY(originjitter) = '10.0 10.0 25.0';
+ MY(originjitter) = '10 10 25';
MY(size_min) = 15;
MY(size_max) = 20;
MY(staincolor_min) = "0x808080";
MY(staintex_max) = 24;
MY(tex_max) = 8;
MY(type) = "blood";
- MY(velocityjitter) = '256.0 256.0 312.0';
+ MY(velocityjitter) = '256 256 312';
}
// core decal
SUB(particlegibs_damage_dissolve) {
MY(count) = 12;
MY(gravity) = 2;
MY(liquidfriction) = 6;
- MY(originjitter) = '10.0 10.0 25.0';
+ MY(originjitter) = '10 10 25';
MY(size_min) = 20;
MY(size_max) = 40;
MY(staincolor_min) = "0x808080";
MY(staintex_max) = 24;
MY(tex_max) = 8;
MY(type) = "blood";
- MY(velocityjitter) = '356.0 356.0 412.0';
+ MY(velocityjitter) = '356 356 412';
}
// front blood
SUB(particlegibs_damage_dissolve) {
MY(count) = 32;
MY(gravity) = 0.500000;
MY(liquidfriction) = 3;
- MY(originjitter) = '5.0 5.0 10.0';
+ MY(originjitter) = '5 5 10';
MY(sizeincrease) = -15;
MY(size_min) = 10;
MY(size_max) = 20;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '56.0 56.0 212.0';
+ MY(velocityjitter) = '56 56 212';
MY(velocitymultiplier) = -0.300000;
}
// back blood
MY(count) = 32;
MY(gravity) = 1;
MY(liquidfriction) = 3;
- MY(originjitter) = '5.0 5.0 10.0';
+ MY(originjitter) = '5 5 10';
MY(sizeincrease) = 10;
MY(size_min) = 5;
MY(size_max) = 15;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '56.0 56.0 212.0';
+ MY(velocityjitter) = '56 56 212';
MY(velocitymultiplier) = 0.500000;
}
// small bits
MY(count) = 75;
MY(gravity) = 1;
MY(liquidfriction) = 3;
- MY(originjitter) = '10.0 10.0 25.0';
+ MY(originjitter) = '10 10 25';
MY(sizeincrease) = 10;
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_min) = 24;
MY(tex_max) = 32;
MY(type) = "blood";
- MY(velocityjitter) = '656.0 656.0 912.0';
+ MY(velocityjitter) = '656 656 912';
}
-#define rocketminsta_laser(name, color) \
- DEF(rocketminsta_laser_##name); \
- SUB(rocketminsta_laser_##name) { \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 968; \
- MY(color_min) = color; \
- MY(color_max) = color; \
- MY(lightcolor) = '1.5 3.0 6.0'; \
- MY(lightradius) = 90; \
- MY(size_min) = 3; \
- MY(size_max) = 3; \
- MY(tex_min) = 38; \
- MY(tex_max) = 38; \
- MY(trailspacing) = 2; \
- MY(type) = "static"; \
- MY(velocitymultiplier) = -0.100000; \
- } \
- SUB(rocketminsta_laser_##name) /* bright sparks */ { \
- MY(airfriction) = 12; \
- MY(alpha_min) = 444; \
- MY(alpha_max) = 512; \
- MY(alpha_fade) = 1866; \
- MY(bounce) = 1; \
- MY(color_min) = color; \
- MY(color_max) = color; \
- MY(count) = 1.500000; \
- MY(originjitter) = '1.0 1.0 1.0'; \
- MY(sizeincrease) = -20; \
- MY(size_min) = 2; \
- MY(size_max) = 4; \
- MY(tex_min) = 42; \
- MY(tex_max) = 42; \
- MY(trailspacing) = 12; \
- MY(type) = "snow"; \
- MY(velocityjitter) = '50.0 50.0 50.0'; \
- MY(velocityoffset) = '0.0 0.0 15.0'; \
- } \
- /**/
+#define rocketminsta_laser(name, color) DEF(rocketminsta_laser_##name); SUB(rocketminsta_laser_##name) { MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 968; MY(color_min) = color; MY(color_max) = color; MY(lightcolor) = '1.5 3 6'; MY(lightradius) = 90; MY(size_min) = 3; MY(size_max) = 3; MY(tex_min) = 38; MY(tex_max) = 38; MY(trailspacing) = 2; MY(type) = "static"; MY(velocitymultiplier) = -0.100000; } SUB(rocketminsta_laser_##name) /* bright sparks */ { MY(airfriction) = 12; MY(alpha_min) = 444; MY(alpha_max) = 512; MY(alpha_fade) = 1866; MY(bounce) = 1; MY(color_min) = color; MY(color_max) = color; MY(count) = 1.500000; MY(originjitter) = '1 1 1'; MY(sizeincrease) = -20; MY(size_min) = 2; MY(size_max) = 4; MY(tex_min) = 42; MY(tex_max) = 42; MY(trailspacing) = 12; MY(type) = "snow"; MY(velocityjitter) = '50 50 50'; MY(velocityoffset) = '0 0 15'; } /**/
rocketminsta_laser(red, "0xFF0F0F")
rocketminsta_laser(blue, "0x0F0FFF")
-#define nade(name, colormin1, colormax1, colormin2, colormax2) \
- DEF(nade_##name); \
- SUB(nade_##name) { \
- MY(alpha_min) = 100; \
- MY(alpha_max) = 100; \
- MY(alpha_fade) = 250; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(sizeincrease) = -1; \
- MY(size_min) = 3; \
- MY(size_max) = 3; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(trailspacing) = 1; \
- MY(type) = "smoke"; \
- } \
- SUB(nade_##name) /* fire */ { \
- MY(alpha_min) = 30; \
- MY(alpha_max) = 30; \
- MY(alpha_fade) = 150; \
- MY(color_min) = colormin2; \
- MY(color_max) = colormax2; \
- MY(notunderwater) = true; \
- MY(sizeincrease) = -10; \
- MY(size_min) = 15; \
- MY(size_max) = 25; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(trailspacing) = 8; \
- MY(type) = "smoke"; \
- } \
- SUB(nade_##name) /* bubbles */ { \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 256; \
- MY(bounce) = 1.500000; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(gravity) = -0.125000; \
- MY(liquidfriction) = 4; \
- MY(size_min) = 1; \
- MY(size_max) = 1; \
- MY(tex_min) = 62; \
- MY(tex_max) = 62; \
- MY(trailspacing) = 16; \
- MY(type) = "bubble"; \
- MY(underwater) = true; \
- MY(velocityjitter) = '16.0 16.0 16.0'; \
- } \
- /**/
+#define nade(name, colormin1, colormax1, colormin2, colormax2) DEF(nade_##name); SUB(nade_##name) { MY(alpha_min) = 100; MY(alpha_max) = 100; MY(alpha_fade) = 250; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(sizeincrease) = -1; MY(size_min) = 3; MY(size_max) = 3; MY(tex_min) = 65; MY(tex_max) = 65; MY(trailspacing) = 1; MY(type) = "smoke"; } SUB(nade_##name) /* fire */ { MY(alpha_min) = 30; MY(alpha_max) = 30; MY(alpha_fade) = 150; MY(color_min) = colormin2; MY(color_max) = colormax2; MY(notunderwater) = true; MY(sizeincrease) = -10; MY(size_min) = 15; MY(size_max) = 25; MY(tex_min) = 65; MY(tex_max) = 65; MY(trailspacing) = 8; MY(type) = "smoke"; } SUB(nade_##name) /* bubbles */ { MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 256; MY(bounce) = 1.500000; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(gravity) = -0.125000; MY(liquidfriction) = 4; MY(size_min) = 1; MY(size_max) = 1; MY(tex_min) = 62; MY(tex_max) = 62; MY(trailspacing) = 16; MY(type) = "bubble"; MY(underwater) = true; MY(velocityjitter) = '16 16 16'; } /**/
nade(blue, "0x006cff", "0x0600ff", "0x0600ff", "0x9794ff")
nade(red, "0xff0000", "0xff3c00", "0xff0000", "0xffa2a2")
nade(neutral, "0xFFFFFF", "0xFFFFFF", "0xFFFFFF", "0xFFFFFF")
#undef nade
-#define nade_burn(name, colormin1, colormax1, colormin2, colormax2) \
- DEF(nade_##name##_burn); \
- SUB(nade_##name##_burn) { \
- MY(alpha_min) = 100; \
- MY(alpha_max) = 100; \
- MY(alpha_fade) = 250; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(sizeincrease) = -1; \
- MY(size_min) = 5; \
- MY(size_max) = 5; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(trailspacing) = 1; \
- MY(type) = "smoke"; \
- } \
- SUB(nade_##name##_burn) /* fire */ { \
- MY(alpha_min) = 200; \
- MY(alpha_max) = 200; \
- MY(alpha_fade) = 1000; \
- MY(color_min) = colormin2; \
- MY(color_max) = colormax2; \
- MY(notunderwater) = true; \
- MY(sizeincrease) = -30; \
- MY(size_min) = 45; \
- MY(size_max) = 25; \
- MY(tex_min) = 65; \
- MY(tex_max) = 65; \
- MY(trailspacing) = 64; \
- MY(type) = "smoke"; \
- } \
- SUB(nade_##name##_burn) /* bubbles */ { \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 256; \
- MY(bounce) = 1.500000; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(gravity) = -0.125000; \
- MY(liquidfriction) = 4; \
- MY(size_min) = 1; \
- MY(size_max) = 1; \
- MY(tex_min) = 62; \
- MY(tex_max) = 62; \
- MY(trailspacing) = 16; \
- MY(type) = "bubble"; \
- MY(underwater) = true; \
- MY(velocityjitter) = '16.0 16.0 16.0'; \
- } \
- SUB(nade_##name##_burn) { \
- MY(alpha_min) = 300; \
- MY(alpha_max) = 900; \
- MY(alpha_fade) = 1500; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(originjitter) = '2.0 2.0 2.0'; \
- MY(startangle_min) = -180; \
- MY(startangle_max) = 180; \
- MY(spin_min) = 20; \
- MY(spin_max) = -20; \
- MY(sizeincrease) = -40; \
- MY(size_min) = 15; \
- MY(size_max) = 25; \
- MY(tex_min) = 71; \
- MY(tex_max) = 73; \
- MY(trailspacing) = 16; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '10.0 10.0 10.0'; \
- } \
- /**/
+#define nade_burn(name, colormin1, colormax1, colormin2, colormax2) DEF(nade_##name##_burn); SUB(nade_##name##_burn) { MY(alpha_min) = 100; MY(alpha_max) = 100; MY(alpha_fade) = 250; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(sizeincrease) = -1; MY(size_min) = 5; MY(size_max) = 5; MY(tex_min) = 65; MY(tex_max) = 65; MY(trailspacing) = 1; MY(type) = "smoke"; } SUB(nade_##name##_burn) /* fire */ { MY(alpha_min) = 200; MY(alpha_max) = 200; MY(alpha_fade) = 1000; MY(color_min) = colormin2; MY(color_max) = colormax2; MY(notunderwater) = true; MY(sizeincrease) = -30; MY(size_min) = 45; MY(size_max) = 25; MY(tex_min) = 65; MY(tex_max) = 65; MY(trailspacing) = 64; MY(type) = "smoke"; } SUB(nade_##name##_burn) /* bubbles */ { MY(alpha_min) = 256; MY(alpha_max) = 256; MY(alpha_fade) = 256; MY(bounce) = 1.500000; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(gravity) = -0.125000; MY(liquidfriction) = 4; MY(size_min) = 1; MY(size_max) = 1; MY(tex_min) = 62; MY(tex_max) = 62; MY(trailspacing) = 16; MY(type) = "bubble"; MY(underwater) = true; MY(velocityjitter) = '16 16 16'; } SUB(nade_##name##_burn) { MY(alpha_min) = 300; MY(alpha_max) = 900; MY(alpha_fade) = 1500; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(originjitter) = '2 2 2'; MY(startangle_min) = -180; MY(startangle_max) = 180; MY(spin_min) = 20; MY(spin_max) = -20; MY(sizeincrease) = -40; MY(size_min) = 15; MY(size_max) = 25; MY(tex_min) = 71; MY(tex_max) = 73; MY(trailspacing) = 16; MY(type) = "smoke"; MY(velocityjitter) = '10 10 10'; } /**/
nade_burn(red, "0xff0000", "0xff3c00", "0xff0000", "0xffa2a2")
nade_burn(blue, "0x006cff", "0x0600ff", "0x0600ff", "0x9794ff")
nade_burn(neutral, "0xFFFFFF", "0xFFFFFF", "0xFFFFFF", "0xFFFFFF")
#undef nade_burn
-#define nade_explode(name, colorlight, colormin1, colormax1, colormin2, colormax2, colormin3, colormax3) \
- DEF(nade_##name##_explode); \
- SUB(nade_##name##_explode) { \
- MY(alpha_min) = 256; \
- MY(alpha_max) = 256; \
- MY(countabsolute) = 1; \
- MY(lightcolor) = colorlight; \
- MY(lightradiusfade) = 1500; \
- MY(lightradius) = 300; \
- MY(originjitter) = '26.0 26.0 26.0'; \
- MY(size_min) = 88; \
- MY(size_max) = 88; \
- MY(tex_min) = 8; \
- MY(tex_max) = 16; \
- MY(type) = "decal"; \
- } \
- SUB(nade_##name##_explode) /* shockwave */ { \
- MY(alpha_min) = 80; \
- MY(alpha_max) = 80; \
- MY(alpha_fade) = 650; \
- MY(color_min) = colormin1; \
- MY(color_max) = colormax1; \
- MY(countabsolute) = 1; \
- MY(sizeincrease) = 1800; \
- MY(size_min) = 32; \
- MY(size_max) = 32; \
- MY(tex_min) = 33; \
- MY(tex_max) = 33; \
- MY(type) = "smoke"; \
- MY(velocitymultiplier) = 44; \
- } \
- SUB(nade_##name##_explode) /* fire */ { \
- MY(airfriction) = 30; \
- MY(alpha_min) = 400; \
- MY(alpha_max) = 656; \
- MY(alpha_fade) = 2000; \
- MY(color_min) = colormin2; \
- MY(color_max) = colormax2; \
- MY(count) = 16; \
- MY(notunderwater) = true; \
- MY(originjitter) = '50.0 50.0 50.0'; \
- MY(startangle_min) = -180; \
- MY(startangle_max) = 180; \
- MY(spin_min) = -9; \
- MY(spin_max) = 9; \
- MY(sizeincrease) = 555; \
- MY(size_min) = 20; \
- MY(size_max) = 24; \
- MY(tex_min) = 48; \
- MY(tex_max) = 55; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '320.0 320.0 320.0'; \
- } \
- SUB(nade_##name##_explode) /* fire stretched */ { \
- MY(airfriction) = -9; \
- MY(alpha_min) = 1500; \
- MY(alpha_max) = 3000; \
- MY(alpha_fade) = 13000; \
- MY(color_min) = colormin2; \
- MY(color_max) = colormax2; \
- MY(count) = 8; \
- MY(sizeincrease) = 40; \
- MY(size_min) = 60; \
- MY(size_max) = 90; \
- MY(stretchfactor) = 80; \
- MY(tex_min) = 48; \
- MY(tex_max) = 55; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '30.0 30.0 30.0'; \
- } \
- SUB(nade_##name##_explode) /* smoke */ { \
- MY(airfriction) = 0.040000; \
- MY(alpha_min) = 128; \
- MY(alpha_max) = 328; \
- MY(alpha_fade) = 390; \
- MY(blend) = "alpha"; \
- MY(color_min) = "0x222222"; \
- MY(color_max) = "0x000000"; \
- MY(count) = 32; \
- MY(gravity) = 0.400000; \
- MY(originjitter) = '50.0 50.0 10.0'; \
- MY(startangle_min) = -180; \
- MY(startangle_max) = 180; \
- MY(spin_min) = 2; \
- MY(spin_max) = -2; \
- MY(sizeincrease) = 50; \
- MY(size_min) = 60; \
- MY(size_max) = 30; \
- MY(tex_max) = 7; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '200.0 200.0 200.0'; \
- MY(velocityoffset) = '0.0 0.0 180.0'; \
- } \
- SUB(nade_##name##_explode) /* underwater bubbles */ { \
- MY(alpha_min) = 128; \
- MY(alpha_max) = 256; \
- MY(alpha_fade) = 64; \
- MY(bounce) = 1.500000; \
- MY(color_min) = "0x404040"; \
- MY(color_max) = "0x808080"; \
- MY(count) = 32; \
- MY(gravity) = -0.125000; \
- MY(liquidfriction) = 0.250000; \
- MY(originjitter) = '16.0 16.0 16.0'; \
- MY(size_min) = 3; \
- MY(size_max) = 6; \
- MY(tex_min) = 62; \
- MY(tex_max) = 62; \
- MY(type) = "bubble"; \
- MY(underwater) = true; \
- MY(velocityjitter) = '196.0 196.0 196.0'; \
- } \
- SUB(nade_##name##_explode) /* bouncing sparks */ { \
- MY(airfriction) = 1; \
- MY(alpha_min) = 644; \
- MY(alpha_max) = 956; \
- MY(alpha_fade) = 484; \
- MY(bounce) = 1.600000; \
- MY(color_min) = colormin3; \
- MY(color_max) = colormax3; \
- MY(count) = 8; \
- MY(gravity) = 1; \
- MY(liquidfriction) = 0.800000; \
- MY(notunderwater) = true; \
- MY(originjitter) = '16.0 16.0 16.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 2; \
- MY(tex_min) = 40; \
- MY(tex_max) = 40; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '424.0 424.0 624.0'; \
- MY(velocityoffset) = '0.0 0.0 80.0'; \
- } \
- SUB(nade_##name##_explode) /* notbouncing sparks */ { \
- MY(airfriction) = 0.700000; \
- MY(alpha_min) = 644; \
- MY(alpha_max) = 956; \
- MY(alpha_fade) = 684; \
- MY(color_min) = colormin3; \
- MY(color_max) = colormax3; \
- MY(count) = 16; \
- MY(gravity) = 0.500000; \
- MY(liquidfriction) = 0.800000; \
- MY(originjitter) = '16.0 16.0 16.0'; \
- MY(size_min) = 1; \
- MY(size_max) = 2; \
- MY(tex_min) = 40; \
- MY(tex_max) = 40; \
- MY(type) = "spark"; \
- MY(velocityjitter) = '424.0 424.0 624.0'; \
- MY(velocityoffset) = '0.0 0.0 80.0'; \
- } \
- SUB(nade_##name##_explode) /* debris */ { \
- MY(alpha_min) = 644; \
- MY(alpha_max) = 956; \
- MY(alpha_fade) = 2500; \
- MY(color_min) = colormin3; \
- MY(color_max) = colormax3; \
- MY(count) = 8; \
- MY(notunderwater) = true; \
- MY(originjitter) = '64.0 64.0 64.0'; \
- MY(startangle_min) = -180; \
- MY(startangle_max) = 180; \
- MY(spin_min) = -100; \
- MY(spin_max) = 100; \
- MY(size_min) = 20; \
- MY(size_max) = 40; \
- MY(tex_min) = 71; \
- MY(tex_max) = 73; \
- MY(type) = "smoke"; \
- MY(velocityjitter) = '324.0 324.0 324.0'; \
- } \
- /**/
+#define nade_explode(name, colorlight, colormin1, colormax1, colormin2, colormax2, colormin3, colormax3) DEF(nade_##name##_explode); SUB(nade_##name##_explode) { MY(alpha_min) = 256; MY(alpha_max) = 256; MY(countabsolute) = 1; MY(lightcolor) = colorlight; MY(lightradiusfade) = 1500; MY(lightradius) = 300; MY(originjitter) = '26 26 26'; MY(size_min) = 88; MY(size_max) = 88; MY(tex_min) = 8; MY(tex_max) = 16; MY(type) = "decal"; } SUB(nade_##name##_explode) /* shockwave */ { MY(alpha_min) = 80; MY(alpha_max) = 80; MY(alpha_fade) = 650; MY(color_min) = colormin1; MY(color_max) = colormax1; MY(countabsolute) = 1; MY(sizeincrease) = 1800; MY(size_min) = 32; MY(size_max) = 32; MY(tex_min) = 33; MY(tex_max) = 33; MY(type) = "smoke"; MY(velocitymultiplier) = 44; } SUB(nade_##name##_explode) /* fire */ { MY(airfriction) = 30; MY(alpha_min) = 400; MY(alpha_max) = 656; MY(alpha_fade) = 2000; MY(color_min) = colormin2; MY(color_max) = colormax2; MY(count) = 16; MY(notunderwater) = true; MY(originjitter) = '50 50 50'; MY(startangle_min) = -180; MY(startangle_max) = 180; MY(spin_min) = -9; MY(spin_max) = 9; MY(sizeincrease) = 555; MY(size_min) = 20; MY(size_max) = 24; MY(tex_min) = 48; MY(tex_max) = 55; MY(type) = "smoke"; MY(velocityjitter) = '320 320 320'; } SUB(nade_##name##_explode) /* fire stretched */ { MY(airfriction) = -9; MY(alpha_min) = 1500; MY(alpha_max) = 3000; MY(alpha_fade) = 13000; MY(color_min) = colormin2; MY(color_max) = colormax2; MY(count) = 8; MY(sizeincrease) = 40; MY(size_min) = 60; MY(size_max) = 90; MY(stretchfactor) = 80; MY(tex_min) = 48; MY(tex_max) = 55; MY(type) = "spark"; MY(velocityjitter) = '30 30 30'; } SUB(nade_##name##_explode) /* smoke */ { MY(airfriction) = 0.040000; MY(alpha_min) = 128; MY(alpha_max) = 328; MY(alpha_fade) = 390; MY(blend) = "alpha"; MY(color_min) = "0x222222"; MY(color_max) = "0x000000"; MY(count) = 32; MY(gravity) = 0.400000; MY(originjitter) = '50 50 10'; MY(startangle_min) = -180; MY(startangle_max) = 180; MY(spin_min) = 2; MY(spin_max) = -2; MY(sizeincrease) = 50; MY(size_min) = 60; MY(size_max) = 30; MY(tex_max) = 7; MY(type) = "smoke"; MY(velocityjitter) = '200 200 200'; MY(velocityoffset) = '0 0 180'; } SUB(nade_##name##_explode) /* underwater bubbles */ { MY(alpha_min) = 128; MY(alpha_max) = 256; MY(alpha_fade) = 64; MY(bounce) = 1.500000; MY(color_min) = "0x404040"; MY(color_max) = "0x808080"; MY(count) = 32; MY(gravity) = -0.125000; MY(liquidfriction) = 0.250000; MY(originjitter) = '16 16 16'; MY(size_min) = 3; MY(size_max) = 6; MY(tex_min) = 62; MY(tex_max) = 62; MY(type) = "bubble"; MY(underwater) = true; MY(velocityjitter) = '196 196 196'; } SUB(nade_##name##_explode) /* bouncing sparks */ { MY(airfriction) = 1; MY(alpha_min) = 644; MY(alpha_max) = 956; MY(alpha_fade) = 484; MY(bounce) = 1.600000; MY(color_min) = colormin3; MY(color_max) = colormax3; MY(count) = 8; MY(gravity) = 1; MY(liquidfriction) = 0.800000; MY(notunderwater) = true; MY(originjitter) = '16 16 16'; MY(size_min) = 1; MY(size_max) = 2; MY(tex_min) = 40; MY(tex_max) = 40; MY(type) = "spark"; MY(velocityjitter) = '424 424 624'; MY(velocityoffset) = '0 0 80'; } SUB(nade_##name##_explode) /* notbouncing sparks */ { MY(airfriction) = 0.700000; MY(alpha_min) = 644; MY(alpha_max) = 956; MY(alpha_fade) = 684; MY(color_min) = colormin3; MY(color_max) = colormax3; MY(count) = 16; MY(gravity) = 0.500000; MY(liquidfriction) = 0.800000; MY(originjitter) = '16 16 16'; MY(size_min) = 1; MY(size_max) = 2; MY(tex_min) = 40; MY(tex_max) = 40; MY(type) = "spark"; MY(velocityjitter) = '424 424 624'; MY(velocityoffset) = '0 0 80'; } SUB(nade_##name##_explode) /* debris */ { MY(alpha_min) = 644; MY(alpha_max) = 956; MY(alpha_fade) = 2500; MY(color_min) = colormin3; MY(color_max) = colormax3; MY(count) = 8; MY(notunderwater) = true; MY(originjitter) = '64 64 64'; MY(startangle_min) = -180; MY(startangle_max) = 180; MY(spin_min) = -100; MY(spin_max) = 100; MY(size_min) = 20; MY(size_max) = 40; MY(tex_min) = 71; MY(tex_max) = 73; MY(type) = "smoke"; MY(velocityjitter) = '324 324 324'; } /**/
-nade_explode(blue, '20.0 20.0 100.0', "0x80C0FF", "0x80C0FF", "0x629dff", "0x0018ff", "0x006cff", "0x0600ff")
-nade_explode(red, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xff0000", "0xff4200", "0xff0000", "0xffa2a2")
-nade_explode(yellow, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFFFF0F", "0xFFFF0F", "0xff0000", "0xffa2a2")
-nade_explode(pink, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFF0FFF", "0xFF0FFF", "0xff0000", "0xffa2a2")
-nade_explode(neutral, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFFFFFF", "0xFFFFFF", "0xff0000", "0xffa2a2")
+nade_explode(blue, '20 20 100', "0x80C0FF", "0x80C0FF", "0x629dff", "0x0018ff", "0x006cff", "0x0600ff")
+nade_explode(red, '100 20 20', "0xff0000", "0xffa2a2", "0xff0000", "0xff4200", "0xff0000", "0xffa2a2")
+nade_explode(yellow, '100 20 20', "0xff0000", "0xffa2a2", "0xFFFF0F", "0xFFFF0F", "0xff0000", "0xffa2a2")
+nade_explode(pink, '100 20 20', "0xff0000", "0xffa2a2", "0xFF0FFF", "0xFF0FFF", "0xff0000", "0xffa2a2")
+nade_explode(neutral, '100 20 20', "0xff0000", "0xffa2a2", "0xFFFFFF", "0xFFFFFF", "0xff0000", "0xffa2a2")
#undef nade_explode
MY(count) = 17;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 45;
MY(size_min) = 20;
MY(size_max) = 26;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '286.0 286.0 286.0';
+ MY(velocityjitter) = '286 286 286';
}
// smoke
SUB(onslaught_generator_gib_explode) {
MY(size_max) = 10;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '244.0 244.0 244.0';
+ MY(velocityjitter) = '244 244 244';
}
// underwater bubbles
SUB(onslaught_generator_gib_explode) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
DEF(onslaught_generator_gib_flame);
MY(gravity) = -0.500000;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '3.0 3.0 3.0';
+ MY(originjitter) = '3 3 3';
MY(sizeincrease) = 25;
MY(size_min) = 5;
MY(size_max) = 10;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '86.0 86.0 86.0';
+ MY(velocityjitter) = '86 86 86';
}
// smoke
SUB(onslaught_generator_gib_flame) {
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '44.0 44.0 44.0';
+ MY(velocityjitter) = '44 44 44';
}
// underwater bubbles
SUB(onslaught_generator_gib_flame) {
MY(count) = 16;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '96.0 96.0 96.0';
+ MY(velocityjitter) = '96 96 96';
}
MY(tex_max) = 8;
MY(trailspacing) = 10;
MY(type) = "smoke";
- MY(velocityjitter) = '5.0 5.0 5.0';
+ MY(velocityjitter) = '5 5 5';
}
DEF(spiderbot_minigun_muzzleflash);
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff8400";
MY(count) = 3;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocityjitter) = '150 150 150';
MY(velocitymultiplier) = 0.350000;
}
// fire
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff8400";
MY(count) = 6;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -10;
MY(size_min) = 5;
MY(size_max) = 7;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.200000;
}
SUB(spiderbot_minigun_muzzleflash) {
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff8400";
MY(countabsolute) = 2;
- MY(lightcolor) = '3.0 3.0 0.0';
+ MY(lightcolor) = '3 3 0';
MY(lightradiusfade) = 8000;
MY(lightradius) = 120;
MY(startangle_min) = -180;
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff8400";
MY(count) = 7;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = 4000;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '250.0 250.0 150.0';
+ MY(velocityjitter) = '250 250 150';
MY(velocitymultiplier) = 0.200000;
}
// smoke
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '100.0 100.0 250.0';
+ MY(velocityjitter) = '100 100 250';
MY(velocitymultiplier) = 0.490000;
}
// smoke 2
MY(color_min) = "0xd0d0a0";
MY(color_max) = "0xffffff";
MY(count) = 7;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = 100;
MY(size_min) = 15;
MY(size_max) = 19;
MY(stretchfactor) = 7.600000;
MY(tex_max) = 8;
MY(type) = "spark";
- MY(velocityjitter) = '250.0 250.0 150.0';
+ MY(velocityjitter) = '250 250 150';
MY(velocitymultiplier) = 0.200000;
}
// debris
MY(count) = 3;
MY(gravity) = 1.100000;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -1000;
MY(tex_min) = 66;
MY(tex_max) = 68;
MY(type) = "alphastatic";
- MY(velocityjitter) = '124.0 124.0 224.0';
+ MY(velocityjitter) = '124 124 224';
MY(velocitymultiplier) = 0.150000;
}
// decal
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 20;
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 0.0';
+ MY(lightcolor) = '8 4 0';
MY(lightradiusfade) = 1750;
MY(lightradius) = 300;
- MY(originjitter) = '23.0 23.0 23.0';
+ MY(originjitter) = '23 23 23';
MY(size_min) = 72;
MY(size_max) = 72;
MY(tex_min) = 8;
MY(count) = 32;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -50;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// fire effect 2
SUB(spiderbot_rocket_explode) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '412.0 412.0 412.0';
+ MY(velocityjitter) = '412 412 412';
}
// fire rays
SUB(spiderbot_rocket_explode) {
MY(count) = 10;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 120;
MY(size_min) = 13;
MY(size_max) = 54;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '712.0 712.0 712.0';
+ MY(velocityjitter) = '712 712 712';
}
// smoke
SUB(spiderbot_rocket_explode) {
MY(color_max) = "0x000000";
MY(count) = 10;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
}
// smoke2
SUB(spiderbot_rocket_explode) {
MY(count) = 3;
MY(gravity) = -0.500000;
MY(notunderwater) = true;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 150;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
}
// underwater bubbles
SUB(spiderbot_rocket_explode) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// underwatershockwave
SUB(spiderbot_rocket_explode) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '20.0 20.0 20.0';
+ MY(velocityjitter) = '20 20 20';
MY(velocitymultiplier) = -1.400000;
}
SUB(spiderbot_rocket_thrust) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = -1.400000;
}
MY(size_max) = 30;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = -0.100000;
}
// fast smoke
MY(size_max) = 30;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '160.0 160.0 60.0';
+ MY(velocityjitter) = '160 160 60';
}
// fire
SUB(spiderbot_rocket_launch) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = 0.500000;
}
// sparks
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '160.0 160.0 160.0';
+ MY(velocityjitter) = '160 160 160';
MY(velocitymultiplier) = -0.500000;
}
MY(color_max) = "0xc03535";
MY(count) = 15;
MY(gravity) = 3;
- MY(originjitter) = '40.0 40.0 10.0';
+ MY(originjitter) = '40 40 10';
MY(size_min) = 4;
MY(size_max) = 7;
MY(stretchfactor) = 0.900000;
MY(tex_min) = 41;
MY(tex_max) = 41;
MY(type) = "spark";
- MY(velocityjitter) = '350.0 350.0 550.0';
- MY(velocityoffset) = '0.0 0.0 700.0';
+ MY(velocityjitter) = '350 350 550';
+ MY(velocityoffset) = '0 0 700';
}
SUB(wakizashi_gun_impact) {
MY(airfriction) = 4;
MY(color_min) = "0xd0d0a0";
MY(color_max) = "0xc03535";
MY(count) = 24;
- MY(originjitter) = '40.0 40.0 10.0';
+ MY(originjitter) = '40 40 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(sizeincrease) = 80;
MY(size_max) = 20;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '250.0 250.0 450.0';
- MY(velocityoffset) = '0.0 0.0 600.0';
+ MY(velocityjitter) = '250 250 450';
+ MY(velocityoffset) = '0 0 600';
}
SUB(wakizashi_gun_impact) {
MY(alpha_min) = 250;
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 14;
MY(color_min) = "0xff0000";
MY(color_max) = "0xc03535";
MY(count) = 16;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -10;
MY(size_min) = 5;
MY(size_max) = 7;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.200000;
}
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(lightcolor) = '8.0 4.0 0.0';
+ MY(lightcolor) = '8 4 0';
MY(lightradiusfade) = 1750;
MY(lightradius) = 300;
- MY(originjitter) = '23.0 23.0 23.0';
+ MY(originjitter) = '23 23 23';
MY(size_min) = 72;
MY(size_max) = 72;
MY(tex_min) = 8;
MY(count) = 64;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -50;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// fire rays
SUB(wakizashi_rocket_explode) {
MY(count) = 10;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '40.0 40.0 40.0';
+ MY(originjitter) = '40 40 40';
MY(sizeincrease) = 120;
MY(size_min) = 43;
MY(size_max) = 54;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '512.0 512.0 512.0';
+ MY(velocityjitter) = '512 512 512';
}
// smoke
SUB(wakizashi_rocket_explode) {
MY(color_max) = "0x000000";
MY(count) = 32;
MY(notunderwater) = true;
- MY(originjitter) = '100.0 100.0 100.0';
+ MY(originjitter) = '100 100 100';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 15;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
}
// bouncing sparks
SUB(wakizashi_rocket_explode) {
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '60.0 60.0 60.0';
+ MY(originjitter) = '60 60 60';
MY(size_min) = 1;
MY(size_max) = 2;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '524.0 524.0 524.0';
- MY(velocityoffset) = '0.0 0.0 170.0';
+ MY(velocityjitter) = '524 524 524';
+ MY(velocityoffset) = '0 0 170';
}
// underwater bubbles
SUB(wakizashi_rocket_explode) {
MY(count) = 32;
MY(gravity) = -0.125000;
MY(liquidfriction) = 0.250000;
- MY(originjitter) = '160.0 160.0 160.0';
+ MY(originjitter) = '160 160 160';
MY(size_min) = 1;
MY(size_max) = 3;
MY(tex_min) = 62;
MY(tex_max) = 62;
MY(type) = "bubble";
MY(underwater) = true;
- MY(velocityjitter) = '144.0 144.0 144.0';
+ MY(velocityjitter) = '144 144 144';
}
// underwatershockwave
SUB(wakizashi_rocket_explode) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = -1.100000;
}
SUB(wakizashi_rocket_thrust) {
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = -0.300000;
}
MY(size_max) = 30;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '160.0 160.0 60.0';
+ MY(velocityjitter) = '160 160 60';
MY(velocitymultiplier) = -0.100000;
}
// fast smoke
MY(size_max) = 30;
MY(tex_max) = 8;
MY(type) = "smoke";
- MY(velocityjitter) = '160.0 160.0 60.0';
+ MY(velocityjitter) = '160 160 60';
MY(velocitymultiplier) = 0.400000;
}
//sparks
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '60.0 60.0 60.0';
+ MY(velocityjitter) = '60 60 60';
MY(velocitymultiplier) = -1.500000;
}
MY(count) = 3;
MY(gravity) = -0.100000;
MY(notunderwater) = true;
- MY(originjitter) = '60.0 60.0 60.0';
+ MY(originjitter) = '60 60 60';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(spin_min) = -20;
MY(size_max) = 100;
MY(tex_max) = 8;
MY(type) = "alphastatic";
- MY(velocityjitter) = '40.0 40.0 40.0';
+ MY(velocityjitter) = '40 40 40';
}
DEF(raptor_cannon_impact);
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 24;
MY(count) = 6;
MY(gravity) = 1;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 1;
MY(size_max) = 1;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '124.0 124.0 524.0';
- MY(velocityoffset) = '0.0 0.0 150.0';
+ MY(velocityjitter) = '124 124 524';
+ MY(velocityoffset) = '0 0 150';
}
// smoke
SUB(raptor_cannon_impact) {
MY(size_max) = 50;
MY(tex_max) = 7;
MY(type) = "alphastatic";
- MY(velocityjitter) = '200.0 200.0 300.0';
- MY(velocityoffset) = '0.0 0.0 340.0';
+ MY(velocityjitter) = '200 200 300';
+ MY(velocityoffset) = '0 0 340';
}
// fire
SUB(raptor_cannon_impact) {
MY(count) = 10;
MY(liquidfriction) = 8;
MY(notunderwater) = true;
- MY(originjitter) = '8.0 8.0 8.0';
+ MY(originjitter) = '8 8 8';
MY(sizeincrease) = 25;
MY(size_min) = 33;
MY(size_max) = 44;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '312.0 312.0 312.0';
+ MY(velocityjitter) = '312 312 312';
}
DEF(raptor_cannon_muzzleflash);
MY(color_min) = "0xD400FF";
MY(color_max) = "0x571863";
MY(count) = 16;
- MY(originjitter) = '2.0 2.0 2.0';
+ MY(originjitter) = '2 2 2';
MY(sizeincrease) = -10;
MY(size_min) = 10;
MY(size_max) = 17;
MY(tex_min) = 8;
MY(tex_max) = 15;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 200.0';
+ MY(velocityjitter) = '200 200 200';
MY(velocitymultiplier) = 0.200000;
}
SUB(raptor_cannon_muzzleflash) {
MY(color_min) = "0xD400FF";
MY(color_max) = "0x571863";
MY(countabsolute) = 1;
- MY(lightcolor) = '3.0 0.0 6.0';
+ MY(lightcolor) = '3 0 6';
MY(lightradiusfade) = 6000;
MY(lightradius) = 150;
MY(startangle_min) = -180;
MY(alpha_min) = 256;
MY(alpha_max) = 256;
MY(countabsolute) = 1;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 84;
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff3c00";
MY(count) = 3;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 50;
MY(size_min) = 20;
MY(size_max) = 40;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "spark";
- MY(velocityjitter) = '40.0 40.0 120.0';
+ MY(velocityjitter) = '40 40 120';
}
// fire
SUB(raptor_bomb_impact) {
MY(color_min) = "0xff9c00";
MY(color_max) = "0xff3c00";
MY(count) = 4;
- MY(originjitter) = '10.0 10.0 10.0';
+ MY(originjitter) = '10 10 10';
MY(sizeincrease) = 230;
MY(size_min) = 30;
MY(size_max) = 120;
MY(tex_min) = 48;
MY(tex_max) = 55;
MY(type) = "static";
- MY(velocityjitter) = '950.0 950.0 0.0';
+ MY(velocityjitter) = '950 950 0';
}
// smoke
SUB(raptor_bomb_impact) {
MY(color_min) = "0x646364";
MY(color_max) = "0x151515";
MY(count) = 4;
- MY(originjitter) = '30.0 30.0 10.0';
+ MY(originjitter) = '30 30 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(size_min) = 120;
MY(stretchfactor) = 10;
MY(tex_max) = 7;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 280.0';
- MY(velocityoffset) = '0.0 0.0 280.0';
+ MY(velocityjitter) = '200 200 280';
+ MY(velocityoffset) = '0 0 280';
}
// smoke 2
SUB(raptor_bomb_impact) {
MY(color_max) = "0x151515";
MY(count) = 4;
MY(gravity) = 2;
- MY(originjitter) = '30.0 30.0 10.0';
+ MY(originjitter) = '30 30 10';
MY(startangle_min) = -180;
MY(startangle_max) = 180;
MY(sizeincrease) = 60;
MY(size_max) = 100;
MY(tex_max) = 7;
MY(type) = "spark";
- MY(velocityjitter) = '200.0 200.0 300.0';
- MY(velocityoffset) = '0.0 0.0 580.0';
+ MY(velocityjitter) = '200 200 300';
+ MY(velocityoffset) = '0 0 580';
}
// sparks
SUB(raptor_bomb_impact) {
MY(count) = 5;
MY(gravity) = 1;
MY(notunderwater) = true;
- MY(originjitter) = '16.0 16.0 16.0';
+ MY(originjitter) = '16 16 16';
MY(size_min) = 3;
MY(size_max) = 5;
MY(stretchfactor) = 2;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '174.0 174.0 924.0';
- MY(velocityoffset) = '0.0 0.0 350.0';
+ MY(velocityjitter) = '174 174 924';
+ MY(velocityoffset) = '0 0 350';
}
DEF(raptor_bomb_spread);
MY(gravity) = 1;
MY(liquidfriction) = 0.800000;
MY(notunderwater) = true;
- MY(originjitter) = '110.0 110.0 110.0';
+ MY(originjitter) = '110 110 110';
MY(size_min) = 1;
MY(size_max) = 2;
MY(tex_min) = 40;
MY(tex_max) = 40;
MY(type) = "spark";
- MY(velocityjitter) = '324.0 324.0 324.0';
+ MY(velocityjitter) = '324 324 324';
}
}
case VOICETYPE_TEAMRADIO:
{
- #define X() \
- MACRO_BEGIN \
- float atten = (CS(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; \
- if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten); \
- else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten); \
- else soundto(MSG_ONE, this, chan, sample, vol, atten); \
- MACRO_END
+ #define X() MACRO_BEGIN float atten = (CS(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten); else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten); else soundto(MSG_ONE, this, chan, sample, vol, atten); MACRO_END
if (fake) { msg_entity = this; X(); }
else
if (autocvar_sv_gentle) break;
float tauntrand = 0;
if (voicetype == VOICETYPE_AUTOTAUNT) tauntrand = random();
- #define X() \
- MACRO_BEGIN \
- if (voicetype != VOICETYPE_AUTOTAUNT || tauntrand < CS(msg_entity).cvar_cl_autotaunt) \
- { \
- float atten = (CS(msg_entity).cvar_cl_voice_directional >= 1) \
- ? bound(ATTEN_MIN, CS(msg_entity).cvar_cl_voice_directional_taunt_attenuation, \
- ATTEN_MAX) \
- : ATTEN_NONE; \
- if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten); \
- else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten); \
- else soundto(MSG_ONE, this, chan, sample, vol, atten); \
- } \
- MACRO_END
+ #define X() MACRO_BEGIN if (voicetype != VOICETYPE_AUTOTAUNT || tauntrand < CS(msg_entity).cvar_cl_autotaunt) { float atten = (CS(msg_entity).cvar_cl_voice_directional >= 1) ? bound(ATTEN_MIN, CS(msg_entity).cvar_cl_voice_directional_taunt_attenuation, ATTEN_MAX) : ATTEN_NONE; if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten); else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten); else soundto(MSG_ONE, this, chan, sample, vol, atten); } MACRO_END
if (fake)
{
msg_entity = this;
REGISTRY(PlayerSounds, BITS(8) - 1)
#define PlayerSounds_from(i) _PlayerSounds_from(i, NULL)
-#define REGISTER_PLAYERSOUND(id) \
- .string _playersound_##id; \
- REGISTER(PlayerSounds, playersound, id, m_id, new_pure(PlayerSound)) \
- { \
- this.m_playersoundstr = #id; \
- this.m_playersoundfld = _playersound_##id; \
- }
+#define REGISTER_PLAYERSOUND(id) .string _playersound_##id; REGISTER(PlayerSounds, playersound, id, m_id, new_pure(PlayerSound)) { this.m_playersoundstr = #id; this.m_playersoundfld = _playersound_##id; }
REGISTER_REGISTRY(PlayerSounds)
REGISTRY_SORT(PlayerSounds)
STATIC_INIT(PlayerSounds_renumber)
.bool instanceOfVoiceMessage;
.int m_playersoundvt;
-#define REGISTER_VOICEMSG(id, vt) \
- .string _playersound_##id; \
- REGISTER(PlayerSounds, playersound, id, m_id, new_pure(VoiceMessage)) \
- { \
- this.instanceOfVoiceMessage = true; \
- this.m_playersoundstr = #id; \
- this.m_playersoundfld = _playersound_##id; \
- this.m_playersoundvt = vt; \
- }
+#define REGISTER_VOICEMSG(id, vt) .string _playersound_##id; REGISTER(PlayerSounds, playersound, id, m_id, new_pure(VoiceMessage)) { this.instanceOfVoiceMessage = true; this.m_playersoundstr = #id; this.m_playersoundfld = _playersound_##id; this.m_playersoundvt = vt; }
const int VOICETYPE_PLAYERSOUND = 10;
const int VOICETYPE_TEAMRADIO = 11;
.string m_globalsoundstr;
REGISTRY(GlobalSounds, BITS(8) - 1)
#define GlobalSounds_from(i) _GlobalSounds_from(i, NULL)
-#define REGISTER_GLOBALSOUND(id, str) \
- REGISTER(GlobalSounds, GS, id, m_id, new_pure(GlobalSound)) \
- { \
- this.m_globalsoundstr = str; \
- }
+#define REGISTER_GLOBALSOUND(id, str) REGISTER(GlobalSounds, GS, id, m_id, new_pure(GlobalSound)) { this.m_globalsoundstr = str; }
REGISTER_REGISTRY(GlobalSounds)
REGISTRY_SORT(GlobalSounds)
STATIC_INIT(GlobalSounds_renumber)
#define GlobalSound(this, def, chan, vol, voicetype) _GlobalSound(this, def, NULL, string_null, chan, vol, voicetype, false)
#define GlobalSound_string(this, def, chan, vol, voicetype) _GlobalSound(this, NULL, NULL, def, chan, vol, voicetype, false)
#define PlayerSound(this, def, chan, vol, voicetype) _GlobalSound(this, NULL, def, string_null, chan, vol, voicetype, false)
- #define VoiceMessage(this, def, msg) \
- MACRO_BEGIN \
- entity VM = def; \
- int voicetype = VM.m_playersoundvt; \
- bool ownteam = (voicetype == VOICETYPE_TEAMRADIO); \
- int flood = Say(this, ownteam, NULL, msg, true); \
- bool fake; \
- if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; \
- else if (flood > 0) fake = false; \
- else break; \
- _GlobalSound(this, NULL, VM, string_null, CH_VOICE, VOL_BASEVOICE, voicetype, fake); \
- MACRO_END
+ #define VoiceMessage(this, def, msg) MACRO_BEGIN entity VM = def; int voicetype = VM.m_playersoundvt; bool ownteam = (voicetype == VOICETYPE_TEAMRADIO); int flood = Say(this, ownteam, NULL, msg, true); bool fake; if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; else if (flood > 0) fake = false; else break; _GlobalSound(this, NULL, VM, string_null, CH_VOICE, VOL_BASEVOICE, voicetype, fake); MACRO_END
#endif
.void(entity ent) m_receive;
#ifdef SVQC
-#define _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) \
- void id##_set(entity ent, entity player) { setprop(ent.(checkprop), player.(checkprop)); } \
- void id##_send(int chan, entity ent) { LAMBDA(svsend); } \
- REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { \
- this.m_public = ispublic; \
- this.m_check = id##_check; \
- this.m_set = id##_set; \
- this.m_send = id##_send; \
- }
+#define _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) void id##_set(entity ent, entity player) { setprop(ent.(checkprop), player.(checkprop)); } void id##_send(int chan, entity ent) { LAMBDA(svsend); } REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { this.m_public = ispublic; this.m_check = id##_check; this.m_set = id##_set; this.m_send = id##_send; }
-#define ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) \
- bool id##_check(entity ent, entity player) { return (ent.(checkprop) != player.(checkprop)); } \
- _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
+#define ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) bool id##_check(entity ent, entity player) { return (ent.(checkprop) != player.(checkprop)); } _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
-#define ENTCS_PROP_CODED(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) \
- bool id##_check(entity ent, entity player) { \
- return (floor(ent.(checkprop)) / decfactor != floor(player.(checkprop)) / decfactor); \
- } \
- _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
+#define ENTCS_PROP_CODED(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) bool id##_check(entity ent, entity player) { return (floor(ent.(checkprop)) / decfactor != floor(player.(checkprop)) / decfactor); } _ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
#elif defined(CSQC)
-#define ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) \
- void id##_receive(entity ent) { LAMBDA(clreceive); } \
- REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { \
- this.m_public = ispublic; \
- this.m_receive = id##_receive; \
- }
+#define ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive) void id##_receive(entity ent) { LAMBDA(clreceive); } REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { this.m_public = ispublic; this.m_receive = id##_receive; }
-#define ENTCS_PROP_CODED(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) \
- ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
+#define ENTCS_PROP_CODED(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) ENTCS_PROP(id, ispublic, checkprop, setprop, svsend, clreceive)
#endif
#ifdef SVQC
-#define ENTCS_PROP_RESOURCE(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) \
- bool id##_check(entity ent, entity player) { \
- return (floor(GetResource(ent, checkprop) / decfactor) != floor(GetResource(player, checkprop) / decfactor)); \
- } \
- void id##_set(entity ent, entity player) { SetResourceExplicit(ent, checkprop, GetResource(player, checkprop)); } \
- void id##_send(int chan, entity ent) { LAMBDA(svsend); } \
- REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { \
- this.m_public = ispublic; \
- this.m_check = id##_check; \
- this.m_set = id##_set; \
- this.m_send = id##_send; \
- }
+#define ENTCS_PROP_RESOURCE(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) bool id##_check(entity ent, entity player) { return (floor(GetResource(ent, checkprop) / decfactor) != floor(GetResource(player, checkprop) / decfactor)); } void id##_set(entity ent, entity player) { SetResourceExplicit(ent, checkprop, GetResource(player, checkprop)); } void id##_send(int chan, entity ent) { LAMBDA(svsend); } REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { this.m_public = ispublic; this.m_check = id##_check; this.m_set = id##_set; this.m_send = id##_send; }
#elif defined(CSQC)
-#define ENTCS_PROP_RESOURCE(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) \
- void id##_receive(entity ent) { LAMBDA(clreceive); } \
- REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { \
- this.m_public = ispublic; \
- this.m_receive = id##_receive; \
- }
+#define ENTCS_PROP_RESOURCE(id, ispublic, checkprop, setprop, decfactor, svsend, clreceive) void id##_receive(entity ent) { LAMBDA(clreceive); } REGISTER(EntCSProps, ENTCS_PROP, id, m_id, new_pure(entcs_prop)) { this.m_public = ispublic; this.m_receive = id##_receive; }
#endif
-#define ENTCS_SET_NORMAL(var, x) MACRO_BEGIN \
- var = x; \
-MACRO_END
+#define ENTCS_SET_NORMAL(var, x) MACRO_BEGIN var = x; MACRO_END
/** the engine player name strings are mutable! */
-#define ENTCS_SET_MUTABLE_STRING(var, x) MACRO_BEGIN \
- strcpy(var, x); \
-MACRO_END
+#define ENTCS_SET_MUTABLE_STRING(var, x) MACRO_BEGIN strcpy(var, x); MACRO_END
ENTCS_PROP(ENTNUM, false, sv_entnum, ENTCS_SET_NORMAL, {}, {}) /* sentinel */
if (flag.capeffect == "") { flag.capeffect = EFFECT_CAP(teamnumber).eent_eff_name; }
// sounds
-#define X(s,b) \
- if(flag.s == "") flag.s = b; \
- precache_sound(flag.s);
+#define X(s,b) if(flag.s == "") flag.s = b; precache_sound(flag.s);
X(snd_flag_taken, strzone(SND(CTF_TAKEN(teamnumber))))
X(snd_flag_returned, strzone(SND(CTF_RETURNED(teamnumber))))
#endif
// returns true if player is reviving it
-#define IS_REVIVING(player, it, revive_extra_size) \
- (it != player && !STAT(FROZEN, it) && !IS_DEAD(it) && SAME_TEAM(it, player) \
- && boxesoverlap(player.absmin - revive_extra_size, player.absmax + revive_extra_size, it.absmin, it.absmax))
+#define IS_REVIVING(player, it, revive_extra_size) (it != player && !STAT(FROZEN, it) && !IS_DEAD(it) && SAME_TEAM(it, player) && boxesoverlap(player.absmin - revive_extra_size, player.absmax + revive_extra_size, it.absmin, it.absmax))
MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
{
* @param spprio player score priority (if frags aren't enabled)
* @param stprio team score priority (if frags aren't enabled)
*/
-#define GameRules_scoring(teams, spprio, stprio, fields) MACRO_BEGIN \
- _GameRules_scoring_begin((teams), (spprio), (stprio)); \
- noref void(entity, string, float) field = _GameRules_scoring_field; \
- /* todo: just have the one `field` function */ \
- noref void(int, string, float) field_team = _GameRules_scoring_field_team; \
- LAMBDA(fields); \
- _GameRules_scoring_end(); \
-MACRO_END
+#define GameRules_scoring(teams, spprio, stprio, fields) MACRO_BEGIN _GameRules_scoring_begin((teams), (spprio), (stprio)); noref void(entity, string, float) field = _GameRules_scoring_field; /* todo: just have the one `field` function */ noref void(int, string, float) field_team = _GameRules_scoring_field_team; LAMBDA(fields); _GameRules_scoring_end(); MACRO_END
void _GameRules_scoring_begin(int teams, float spprio, float stprio);
void _GameRules_scoring_field(entity i, string label, int scoreflags);
#endif
#define REGISTER_IMPULSE(id, n) _REGISTER_IMPULSE(IMP_##id, id, n)
-#define _REGISTER_IMPULSE(id, alias, n) \
- REGISTER(IMPULSES, id, m_id, new_pure(Impulse)) \
- { \
- this.impulse = n; \
- IMPULSE_ALIAS(alias, "impulse " #n); \
- }
+#define _REGISTER_IMPULSE(id, alias, n) REGISTER(IMPULSES, id, m_id, new_pure(Impulse)) { this.impulse = n; IMPULSE_ALIAS(alias, "impulse " #n); }
#define LEGACY_IMPULSE_ID(alias, id) LEGACY_IMPULSE(alias, id, sprintf("impulse %d", IMP_##alias.impulse))
LOG_FATALF("LEGACY_IMPULSE: would define a recursive alias for '%s', use LEGACY_IMPULSE_ID instead", s);
}
-#define LEGACY_IMPULSE(alias, id, new) \
- STATIC_INIT(legacy_##alias) { \
- string s = new; \
- _impCheck(s, #alias); \
- IMPULSE_ALIAS(alias, s); \
- } \
- SHUTDOWN(legacy_##alias) { IMPULSE_ALIAS(alias, "impulse " #id); }
-
-#define X(slot, imp) \
- REGISTER_IMPULSE(weapon_group_##slot, imp) \
- LEGACY_IMPULSE(weapon_group_##slot, imp, "impulse " #imp)
+#define LEGACY_IMPULSE(alias, id, new) STATIC_INIT(legacy_##alias) { string s = new; _impCheck(s, #alias); IMPULSE_ALIAS(alias, s); } SHUTDOWN(legacy_##alias) { IMPULSE_ALIAS(alias, "impulse " #id); }
+
+#define X(slot, imp) REGISTER_IMPULSE(weapon_group_##slot, imp) LEGACY_IMPULSE(weapon_group_##slot, imp, "impulse " #imp)
X(1, 1)
X(2, 2)
X(3, 3)
X(0, 14)
#undef X
-#define X(slot, dir, imp) \
- REGISTER_IMPULSE(weapon_priority_##slot##_##dir, imp) \
- LEGACY_IMPULSE(weapon_priority_##slot##_##dir, imp, "impulse " #imp)
+#define X(slot, dir, imp) REGISTER_IMPULSE(weapon_priority_##slot##_##dir, imp) LEGACY_IMPULSE(weapon_priority_##slot##_##dir, imp, "impulse " #imp)
X(0, prev, 200)
X(1, prev, 201)
X(2, prev, 202)
// direct weapons
-#define X(i, imp) \
- REGISTER_IMPULSE(weapon_byid_##i, imp)
+#define X(i, imp) REGISTER_IMPULSE(weapon_byid_##i, imp)
X(0, 230)
X(1, 231)
X(2, 232)
#define CHIMPULSE(id, n) _CHIMPULSE(CHIMPULSE_##id, n)
-#define _CHIMPULSE(id, n) \
- REGISTER(IMPULSES, id, m_id, new_pure(Impulse)) \
- { \
- this.impulse = n; \
- }
+#define _CHIMPULSE(id, n) REGISTER(IMPULSES, id, m_id, new_pure(Impulse)) { this.impulse = n; }
CHIMPULSE(SPEEDRUN_INIT, 30)
CHIMPULSE(GIVE_ALL, 99)
if (changed) {
if (maj != lastMaj) {
lastMaj = maj;
-#define X() MACRO_BEGIN \
- if (minorBits) { \
- WriteByte(MSG_ENTITY, minorBits); \
- for (int j = 0; j < Inventory_groups_minor; ++j) { \
- if (!(minorBits & BIT(j))) { \
- continue; \
- } \
- const entity it = Items_from(Inventory_groups_minor * maj + j); \
- WriteByte(MSG_ENTITY, data.inv_items[it.m_id]); \
- } \
- } \
-MACRO_END
+#define X() MACRO_BEGIN if (minorBits) { WriteByte(MSG_ENTITY, minorBits); for (int j = 0; j < Inventory_groups_minor; ++j) { if (!(minorBits & BIT(j))) { continue; } const entity it = Items_from(Inventory_groups_minor * maj + j); WriteByte(MSG_ENTITY, data.inv_items[it.m_id]); } } MACRO_END
X();
minorBits = 0;
}
const .float strength_finished = _STAT(STRENGTH_FINISHED);
const .float invincible_finished = _STAT(INVINCIBLE_FINISHED);
-#define spawnfunc_body(item) \
- if (!Item_IsDefinitionAllowed(item)) \
- { \
- startitem_failed = true; \
- delete(this); \
- return; \
- } \
- StartItem(this, item)
-
-#define SPAWNFUNC_ITEM(name, item) \
- spawnfunc(name) \
- { \
- spawnfunc_body(item); \
- }
-
-#define SPAWNFUNC_ITEM_COND(name, cond, item1, item2) \
- spawnfunc(name) \
- { \
- entity item = (cond) ? item1 : item2; \
- spawnfunc_body(item); \
- }
+#define spawnfunc_body(item) if (!Item_IsDefinitionAllowed(item)) { startitem_failed = true; delete(this); return; } StartItem(this, item)
+
+#define SPAWNFUNC_ITEM(name, item) spawnfunc(name) { spawnfunc_body(item); }
+
+#define SPAWNFUNC_ITEM_COND(name, cond, item1, item2) spawnfunc(name) { entity item = (cond) ? item1 : item2; spawnfunc_body(item); }
#else
switch(this.itemkeys) {
case BIT(0):
_netname = "GOLD key";
- _colormod = '1 .9 0';
+ _colormod = '1 0.9 0';
break;
case BIT(1):
_netname = "SILVER key";
- _colormod = '.9 .9 .9';
+ _colormod = '0.9 0.9 0.9';
break;
case BIT(2):
_netname = "BRONZE key";
- _colormod = '.6 .25 0';
+ _colormod = '0.6 0.25 0';
break;
case BIT(3):
_netname = "RED keycard";
- _colormod = '.9 0 0';
+ _colormod = '0.9 0 0';
break;
case BIT(4):
_netname = "BLUE keycard";
- _colormod = '0 0 .9';
+ _colormod = '0 0 0.9';
break;
case BIT(5):
_netname = "GREEN keycard";
- _colormod = '0 .9 0';
+ _colormod = '0 0.9 0';
break;
default:
}
-#define G_MODEL_INIT(ent,sol) \
- if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
- if(!ent.scale) ent.scale = ent.modelscale; \
- SetBrushEntityModel(ent); \
- ent.use = g_model_setcolormaptoactivator; \
- InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
- if(!ent.solid) ent.solid = (sol); \
- else if(ent.solid < 0) ent.solid = SOLID_NOT;
-
-#define G_CLIENTMODEL_INIT(ent,sol) \
- if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
- if(!ent.scale) ent.scale = ent.modelscale; \
- SetBrushEntityModel(ent); \
- ent.use = g_clientmodel_use; \
- InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
- if(!ent.solid) ent.solid = (sol); \
- else if(ent.solid < 0) ent.solid = SOLID_NOT; \
- if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; \
- else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \
- Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); \
- ent.default_solid = sol;
+#define G_MODEL_INIT(ent,sol) if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); if(!ent.scale) ent.scale = ent.modelscale; SetBrushEntityModel(ent); ent.use = g_model_setcolormaptoactivator; InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT;
+
+#define G_CLIENTMODEL_INIT(ent,sol) if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); if(!ent.scale) ent.scale = ent.modelscale; SetBrushEntityModel(ent); ent.use = g_clientmodel_use; InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT; if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); ent.default_solid = sol;
// non-solid model entities:
spawnfunc(misc_gamemodel) { this.angles_x = -this.angles.x; G_MODEL_INIT (this, SOLID_NOT) } // model entity
void trigger_teleport_use(entity this, entity actor, entity trigger);
-#define TDEATHLOOP(o) \
- vector deathmin = (o) + player.mins; \
- vector deathmax = (o) + player.maxs; \
- if(telefragmin != telefragmax) \
- { \
- if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; \
- if(deathmin.y > telefragmin.y) deathmin.y = telefragmin.y; \
- if(deathmin.z > telefragmin.z) deathmin.z = telefragmin.z; \
- if(deathmax.x < telefragmax.x) deathmax.x = telefragmax.x; \
- if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; \
- if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; \
- } \
- float deathradius = max(vlen(deathmin), vlen(deathmax)); \
- for (entity head = findradius(o, deathradius); head; head = head.chain) \
- if (head != player && head.takedamage && boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
+#define TDEATHLOOP(o) vector deathmin = (o) + player.mins; vector deathmax = (o) + player.maxs; if(telefragmin != telefragmax) { if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; if(deathmin.y > telefragmin.y) deathmin.y = telefragmin.y; if(deathmin.z > telefragmin.z) deathmin.z = telefragmin.z; if(deathmax.x < telefragmax.x) deathmax.x = telefragmax.x; if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; } float deathradius = max(vlen(deathmin), vlen(deathmax)); for (entity head = findradius(o, deathradius); head; head = head.chain) if (head != player && head.takedamage && boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax);
float tdeath_hit;
#define MSLE_CLEAN_Vector(x)
#define MSLE_CLEAN_Vector2D(x)
-#define MSLE(Name,Fields) \
- void msle_entremove_##Name(entity this) { strunzone(this.netname); Fields }
+#define MSLE(Name,Fields) void msle_entremove_##Name(entity this) { strunzone(this.netname); Fields }
MINIGAME_SIMPLELINKED_ENTITIES
#undef MSLE
#undef FIELD
string ReadString_Zoned() { return strzone(ReadString_Raw()); }
#define ReadString ReadString_Zoned
#define FIELD(Flags, Type,Name) if ( sf & (Flags) ) this.Name = Read##Type();
-#define MSLE(Name,Fields) \
- else if ( this.classname == #Name ) { \
- if ( sf & MINIG_SF_CREATE ) { \
- minigame_read_owner(this); \
- this.entremove = msle_entremove_##Name; \
- } \
- minigame_ent = this.owner; \
- Fields \
- }
+#define MSLE(Name,Fields) else if ( this.classname == #Name ) { if ( sf & MINIG_SF_CREATE ) { minigame_read_owner(this); this.entremove = msle_entremove_##Name; } minigame_ent = this.owner; Fields }
void minigame_read_owner(entity this)
{
string owner_name = ReadString_Raw();
// Get a square in the center of the avaliable area
// \note macro to pass by reference pos and mySize
-#define minigame_hud_fitsqare(pos, mySize) \
- if ( mySize##_x > mySize##_y ) \
- { \
- pos##_x += (mySize##_x-mySize##_y)/2; \
- mySize##_x = mySize##_y; \
- } \
- else \
- { \
- pos##_y += (mySize##_y-mySize##_x)/2; \
- mySize##_x = mySize##_x; \
- } \
- if(panel_bg_padding) \
- { \
- pos += '1 1 0' * panel_bg_padding; \
- mySize -= '2 2 0' * panel_bg_padding; \
- }
+#define minigame_hud_fitsqare(pos, mySize) if ( mySize##_x > mySize##_y ) { pos##_x += (mySize##_x-mySize##_y)/2; mySize##_x = mySize##_y; } else { pos##_y += (mySize##_y-mySize##_x)/2; mySize##_x = mySize##_x; } if(panel_bg_padding) { pos += '1 1 0' * panel_bg_padding; mySize -= '2 2 0' * panel_bg_padding; }
// Get position and size of a panel
// \note macro to pass by reference pos and mySize
-#define minigame_hud_panelarea(pos, mySize, panelID) \
- pos = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_pos"))); \
- mySize = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_size"))); \
- pos##_x *= vid_conwidth; pos##_y *= vid_conheight; \
- mySize##_x *= vid_conwidth; mySize##_y *= vid_conheight;
+#define minigame_hud_panelarea(pos, mySize, panelID) pos = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_pos"))); mySize = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_size"))); pos##_x *= vid_conwidth; pos##_y *= vid_conheight; mySize##_x *= vid_conwidth; mySize##_y *= vid_conheight;
// draw a panel border and the given texture
void minigame_hud_simpleboard(vector pos, vector mySize, string board_texture);
void minigame_prompt();
-#define FOREACH_MINIGAME_ENTITY(entityvar) \
- entityvar=NULL; \
- while( (entityvar = findentity(entityvar,owner,active_minigame)) )
+#define FOREACH_MINIGAME_ENTITY(entityvar) entityvar=NULL; while( (entityvar = findentity(entityvar,owner,active_minigame)) )
REGISTRY(Minigames, BITS(4))
#define Minigames_from(i) _Minigames_from(i, NULL)
REGISTER_REGISTRY(Minigames)
REGISTRY_CHECK(Minigames)
-#define REGISTER_MINIGAME(name,nicename) \
- REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); \
- void name##_hud_board(vector, vector); \
- void name##_hud_status(vector, vector); \
- int name##_client_event(entity, string, ...); \
- REGISTER_INIT(MINIGAME_##name) { \
- this.netname = strzone(strtolower(#name)); \
- this.message = nicename; \
- this.minigame_hud_board = name##_hud_board; \
- this.minigame_hud_status = name##_hud_status; \
- this.minigame_event = name##_client_event; \
- } \
- REGISTER_INIT(MINIGAME_##name)
+#define REGISTER_MINIGAME(name,nicename) REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); void name##_hud_board(vector, vector); void name##_hud_status(vector, vector); int name##_client_event(entity, string, ...); REGISTER_INIT(MINIGAME_##name) { this.netname = strzone(strtolower(#name)); this.message = nicename; this.minigame_hud_board = name##_hud_board; this.minigame_hud_status = name##_hud_status; this.minigame_event = name##_client_event; } REGISTER_INIT(MINIGAME_##name)
* Set up automatic entity read/write functionality
* To ensure that everything is handled automatically, spawn on the server using msle_spawn
* Syntax:
- * MSLE(classname,Field...) \
- * classname: Identifier used to recognize the type of the entity
+ * MSLE(classname,Field...) * classname: Identifier used to recognize the type of the entity
* (must be set as .classname on the sent entities)
* Field... : List of FIELD calls
* FIELD(sendflags, Type, field)
* classname and netname are always sent
* MSLE stands for Minigame Simple Linked Entity
*/
-#define MINIGAME_SIMPLELINKED_ENTITIES \
- MSLE(minigame_board_piece,FIELD(MINIG_SF_CREATE,Byte,team) FIELD(MINIG_SF_UPDATE, Short, minigame_flags) FIELD(MINIG_SF_UPDATE, Vector2D,origin)) \
- MSLE(pong_paddle,FIELD(MINIG_SF_CREATE,Byte,team) FIELD(MINIG_SF_CREATE,Float,pong_length) FIELD(MINIG_SF_UPDATE,Vector2D,origin)) \
- MSLE(pong_ball,FIELD(MINIG_SF_CREATE,Float,pong_length) FIELD(PONG_SF_BALLTEAM,Byte,team) FIELD(MINIG_SF_UPDATE, Vector2D, velocity) FIELD(MINIG_SF_UPDATE, Vector2D, origin)) \
- MSLE(pong_ai, FIELD(MINIG_SF_CREATE,Byte,team) FIELD(PONG_SF_PLAYERSCORE, Long, pong_score)) \
- /*empty line*/
+#define MINIGAME_SIMPLELINKED_ENTITIES MSLE(minigame_board_piece,FIELD(MINIG_SF_CREATE,Byte,team) FIELD(MINIG_SF_UPDATE, Short, minigame_flags) FIELD(MINIG_SF_UPDATE, Vector2D,origin)) MSLE(pong_paddle,FIELD(MINIG_SF_CREATE,Byte,team) FIELD(MINIG_SF_CREATE,Float,pong_length) FIELD(MINIG_SF_UPDATE,Vector2D,origin)) MSLE(pong_ball,FIELD(MINIG_SF_CREATE,Float,pong_length) FIELD(PONG_SF_BALLTEAM,Byte,team) FIELD(MINIG_SF_UPDATE, Vector2D, velocity) FIELD(MINIG_SF_UPDATE, Vector2D, origin)) MSLE(pong_ai, FIELD(MINIG_SF_CREATE,Byte,team) FIELD(PONG_SF_PLAYERSCORE, Long, pong_score)) /*empty line*/
#define FIELD(Flags, Type,Name) if ( sf & (Flags) ) Write##Type(MSG_ENTITY, this.Name);
-#define MSLE(Name,Fields) \
- else if ( this.classname == #Name ) { \
- if ( sf & MINIG_SF_CREATE ) WriteString(MSG_ENTITY,this.owner.netname); \
- Fields }
+#define MSLE(Name,Fields) else if ( this.classname == #Name ) { if ( sf & MINIG_SF_CREATE ) WriteString(MSG_ENTITY,this.owner.netname); Fields }
// Send an entity to a client
// only use on minigame entities or entities with a minigame owner
#define Minigames_from(i) _Minigames_from(i, NULL)
REGISTER_REGISTRY(Minigames)
REGISTRY_CHECK(Minigames)
-#define REGISTER_MINIGAME(name,nicename) \
- REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); \
- int name##_server_event(entity, string, ...); \
- REGISTER_INIT(MINIGAME_##name) { \
- this.netname = strzone(strtolower(#name)); \
- this.message = nicename; \
- this.minigame_event = name##_server_event; \
- } \
- REGISTER_INIT(MINIGAME_##name)
+#define REGISTER_MINIGAME(name,nicename) REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); int name##_server_event(entity, string, ...); REGISTER_INIT(MINIGAME_##name) { this.netname = strzone(strtolower(#name)); this.message = nicename; this.minigame_event = name##_server_event; } REGISTER_INIT(MINIGAME_##name)
#define Models_from(i) _Models_from(i, MDL_Null)
REGISTER_REGISTRY(Models)
-#define MODEL(name, path) \
- string MDL_##name##_get() { return path; } \
- REGISTER(Models, MDL, name, m_id, NEW(Model, MDL_##name##_get))
+#define MODEL(name, path) string MDL_##name##_get() { return path; } REGISTER(Models, MDL, name, m_id, NEW(Model, MDL_##name##_get))
STATIC_INIT(NULLMDL)
{
}
ENDCLASS(Model)
-#define setmodel(this, m) MACRO_BEGIN \
- Model _setmodel_model = (m); \
- string _setmodel_cached = _setmodel_model.model_str_; \
- _setmodel((this), _setmodel_cached ? _setmodel_cached : _setmodel_model.model_str()); \
-MACRO_END
+#define setmodel(this, m) MACRO_BEGIN Model _setmodel_model = (m); string _setmodel_cached = _setmodel_model.model_str_; _setmodel((this), _setmodel_cached ? _setmodel_cached : _setmodel_model.model_str()); MACRO_END
/** model */
ATTRIB(Monster, m_model, entity);
/** hitbox size */
- ATTRIB(Monster, m_mins, vector, '-0 -0 -0');
+ ATTRIB(Monster, m_mins, vector, '0 0 0');
/** hitbox size */
ATTRIB(Monster, m_maxs, vector, '0 0 0');
// monster sounds
.float msound_delay; // temporary antilag system
-#define ALLMONSTERSOUNDS \
- _MSOUND(death) \
- _MSOUND(sight) \
- _MSOUND(ranged) \
- _MSOUND(melee) \
- _MSOUND(pain) \
- _MSOUND(spawn) \
- _MSOUND(idle) \
- _MSOUND(attack)
+#define ALLMONSTERSOUNDS _MSOUND(death) _MSOUND(sight) _MSOUND(ranged) _MSOUND(melee) _MSOUND(pain) _MSOUND(spawn) _MSOUND(idle) _MSOUND(attack)
#define _MSOUND(m) .string monstersound_##m;
ALLMONSTERSOUNDS
void RegisterCallbacks() {};
#define MUTATOR_HOOKABLE(id, params) _MUTATOR_HOOKABLE(id, params)
-#define _MUTATOR_HOOKABLE(id, params) \
- CallbackChain HOOK_##id; \
- bool __Mutator_Send_##id(int params(_MUTATOR_HANDLE_PARAMS, _MUTATOR_HANDLE_NOP)) { \
- params(_MUTATOR_HANDLE_PUSHTMP, _MUTATOR_HANDLE_NOP) \
- params(_MUTATOR_HANDLE_PREPARE, _MUTATOR_HANDLE_NOP) \
- bool ret = CallbackChain_Call(HOOK_##id); \
- params(_MUTATOR_HANDLE_NOP, _MUTATOR_HANDLE_PUSHOUT) \
- params(_MUTATOR_HANDLE_POPTMP, _MUTATOR_HANDLE_NOP) \
- params(_MUTATOR_HANDLE_NOP, _MUTATOR_HANDLE_POPOUT) \
- return ret; \
- } \
- ACCUMULATE void RegisterHooks() { HOOK_##id = NEW(CallbackChain, #id); }
+#define _MUTATOR_HOOKABLE(id, params) CallbackChain HOOK_##id; bool __Mutator_Send_##id(int params(_MUTATOR_HANDLE_PARAMS, _MUTATOR_HANDLE_NOP)) { params(_MUTATOR_HANDLE_PUSHTMP, _MUTATOR_HANDLE_NOP) params(_MUTATOR_HANDLE_PREPARE, _MUTATOR_HANDLE_NOP) bool ret = CallbackChain_Call(HOOK_##id); params(_MUTATOR_HANDLE_NOP, _MUTATOR_HANDLE_PUSHOUT) params(_MUTATOR_HANDLE_POPTMP, _MUTATOR_HANDLE_NOP) params(_MUTATOR_HANDLE_NOP, _MUTATOR_HANDLE_POPOUT) return ret; } ACCUMULATE void RegisterHooks() { HOOK_##id = NEW(CallbackChain, #id); }
#define MUTATOR_CALLHOOK(id, ...) _MUTATOR_CALLHOOK(id, __VA_ARGS__)
#ifdef __STDC__
#endif
}
-#define REGISTER_MUTATOR(id, dependence) \
- bool MUTATORFUNC_##id##_hooks(int mode) { return = false; } \
- bool MUTATORFUNC_##id(int mode) { \
- return = false; \
- bool ret = MUTATORFUNC_##id##_hooks(mode); if (ret) return ret; \
- } \
- bool MUTATOR_##id##_check() { return dependence; } \
- REGISTER(Mutators, MUTATOR, id, m_id, NEW(Mutator, #id, MUTATORFUNC_##id)) \
- { this.mutatorcheck = MUTATOR_##id##_check; } \
- ACCUMULATE bool MUTATORFUNC_##id(int mode)
+#define REGISTER_MUTATOR(id, dependence) bool MUTATORFUNC_##id##_hooks(int mode) { return = false; } bool MUTATORFUNC_##id(int mode) { return = false; bool ret = MUTATORFUNC_##id##_hooks(mode); if (ret) return ret; } bool MUTATOR_##id##_check() { return dependence; } REGISTER(Mutators, MUTATOR, id, m_id, NEW(Mutator, #id, MUTATORFUNC_##id)) { this.mutatorcheck = MUTATOR_##id##_check; } ACCUMULATE bool MUTATORFUNC_##id(int mode)
STATIC_INIT(Mutators) {
RegisterHooks();
#define MUTATOR_ONREMOVE if (mode == MUTATOR_REMOVING)
#define MUTATOR_ONROLLBACK_OR_REMOVE if (mode == MUTATOR_REMOVING || mode == MUTATOR_ROLLING_BACK)
-#define MUTATOR_STATIC() MACRO_BEGIN \
- MUTATOR_ONADD { \
- /* game loads at time 1 */ \
- if (time > 1) { \
- error("This is a game type and it cannot be added at runtime."); \
- } \
- } \
- MUTATOR_ONREMOVE { \
- LOG_INFO("This is a game type and it cannot be removed at runtime."); \
- return -1; \
- } \
-MACRO_END
+#define MUTATOR_STATIC() MACRO_BEGIN MUTATOR_ONADD { /* game loads at time 1 */ if (time > 1) { error("This is a game type and it cannot be added at runtime."); } } MUTATOR_ONREMOVE { LOG_INFO("This is a game type and it cannot be removed at runtime."); return -1; } MACRO_END
#define MUTATOR_ADD(name) Mutator_Add(MUTATOR_##name)
#define MUTATOR_REMOVE(name) Mutator_Remove(MUTATOR_##name)
#define MUTATOR_RETURNVALUE CallbackChain_ReturnValue
-#define _MUTATOR_CALLBACK(name, func) \
- Callback CB_##name; \
- bool func(); \
- ACCUMULATE void RegisterCallbacks() { CB_##name = NEW(Callback, func); }
+#define _MUTATOR_CALLBACK(name, func) Callback CB_##name; bool func(); ACCUMULATE void RegisterCallbacks() { CB_##name = NEW(Callback, func); }
-#define MUTATOR_HOOKFUNCTION(...) \
- EVAL_MUTATOR_HOOKFUNCTION(OVERLOAD(MUTATOR_HOOKFUNCTION, __VA_ARGS__))
+#define MUTATOR_HOOKFUNCTION(...) EVAL_MUTATOR_HOOKFUNCTION(OVERLOAD(MUTATOR_HOOKFUNCTION, __VA_ARGS__))
#define EVAL_MUTATOR_HOOKFUNCTION(...) __VA_ARGS__
-#define MUTATOR_HOOKFUNCTION_2(mut, cb) \
- MUTATOR_HOOKFUNCTION_3(mut, cb, CBC_ORDER_ANY)
+#define MUTATOR_HOOKFUNCTION_2(mut, cb) MUTATOR_HOOKFUNCTION_3(mut, cb, CBC_ORDER_ANY)
-#define MUTATOR_HOOKFUNCTION_3(mut, cb, order) \
- _MUTATOR_CALLBACK(mut##_##cb, mut##_##cb) \
- ACCUMULATE bool MUTATORFUNC_##mut##_hooks(int mode) { MUTATOR_HOOK(cb, mut##_##cb, order); } \
- bool mut##_##cb() { return = false; } \
- ACCUMULATE bool mut##_##cb()
+#define MUTATOR_HOOKFUNCTION_3(mut, cb, order) _MUTATOR_CALLBACK(mut##_##cb, mut##_##cb) ACCUMULATE bool MUTATORFUNC_##mut##_hooks(int mode) { MUTATOR_HOOK(cb, mut##_##cb, order); } bool mut##_##cb() { return = false; } ACCUMULATE bool mut##_##cb()
void _mutPrintFail(string cb, string func)
{
LOG_INFO("HOOK FAILED: ", cb, ":", func);
}
-#define MUTATOR_HOOK(cb, func, order) MACRO_BEGIN \
- MUTATOR_ONADD { \
- if (!CallbackChain_Add(HOOK_##cb, CB_##func, order)) { \
- _mutPrintFail(#cb, #func); \
- return true; \
- } \
- } \
- MUTATOR_ONROLLBACK_OR_REMOVE { \
- CallbackChain_Remove(HOOK_##cb, CB_##func); \
- } \
-MACRO_END
+#define MUTATOR_HOOK(cb, func, order) MACRO_BEGIN MUTATOR_ONADD { if (!CallbackChain_Add(HOOK_##cb, CB_##func, order)) { _mutPrintFail(#cb, #func); return true; } } MUTATOR_ONROLLBACK_OR_REMOVE { CallbackChain_Remove(HOOK_##cb, CB_##func); } MACRO_END
#include "events.qh"
#pragma noref 1
-#define MUTATOR_TYPES(_, x) \
- _(x, bool) \
- _(x, int) \
- _(x, entity) \
- _(x, float) \
- _(x, vector) \
- _(x, string) \
- /**/
+#define MUTATOR_TYPES(_, x) _(x, bool) _(x, int) _(x, entity) _(x, float) _(x, vector) _(x, string) /**/
// TODO: migrate to arrays some day when no other globals are used
#define M_ARGV(x, type) MUTATOR_ARGV_##x##_##type
#pragma noref 0
/** appends ":mutatorname" to argument for logging */
-#define EV_BuildMutatorsString(i, o) \
- /** mutator string */ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_BuildMutatorsString(i, o) /** mutator string */ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(BuildMutatorsString, EV_BuildMutatorsString);
/** appends ", Mutator name" to ret_string for display */
-#define EV_BuildMutatorsPrettyString(i, o) \
- /** mutator string */ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_BuildMutatorsPrettyString(i, o) /** mutator string */ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(BuildMutatorsPrettyString, EV_BuildMutatorsPrettyString);
/** appends mutator string for displaying extra gameplay tips */
-#define EV_BuildGameplayTipsString(i, o) \
- /** tips string */ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_BuildGameplayTipsString(i, o) /** tips string */ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(BuildGameplayTipsString, EV_BuildGameplayTipsString);
-#define EV_IsFlying(i, o) \
- /**/ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_IsFlying(i, o) /**/ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(IsFlying, EV_IsFlying);
-#define EV_WP_Format(i, o) \
- /**/ i(entity, MUTATOR_ARGV_0_entity) \
- /**/ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(vector, MUTATOR_ARGV_2_vector) \
- /**/ o(string, MUTATOR_ARGV_3_string) \
- /**/ o(string, MUTATOR_ARGV_4_string) \
- /**/
+#define EV_WP_Format(i, o) /**/ i(entity, MUTATOR_ARGV_0_entity) /**/ i(string, MUTATOR_ARGV_1_string) /**/ o(vector, MUTATOR_ARGV_2_vector) /**/ o(string, MUTATOR_ARGV_3_string) /**/ o(string, MUTATOR_ARGV_4_string) /**/
MUTATOR_HOOKABLE(WP_Format, EV_WP_Format);
/**
* called before any player physics, may adjust variables for movement,
* is run AFTER bot code and idle checking on the server
*/
-#define EV_PlayerPhysics(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** ticrate*/ i(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_PlayerPhysics(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** ticrate*/ i(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(PlayerPhysics, EV_PlayerPhysics);
/** called when a player presses the jump key */
-#define EV_PlayerJump(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** jump height */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /** multijump */ i(bool, MUTATOR_ARGV_2_bool) \
- /**/ o(bool, MUTATOR_ARGV_2_bool) \
- /**/
+#define EV_PlayerJump(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** jump height */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /** multijump */ i(bool, MUTATOR_ARGV_2_bool) /**/ o(bool, MUTATOR_ARGV_2_bool) /**/
MUTATOR_HOOKABLE(PlayerJump, EV_PlayerJump);
/** called during player physics, allows adjusting the movement type used */
-#define EV_PM_Physics(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** maxspeed_mod */ i(float, MUTATOR_ARGV_1_float) \
- /** tick rate */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_PM_Physics(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** maxspeed_mod */ i(float, MUTATOR_ARGV_1_float) /** tick rate */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(PM_Physics, EV_PM_Physics);
/** called when a weapon sound is about to be played, allows custom paths etc. */
-#define EV_WeaponSound(i, o) \
- /** sound */ i(string, MUTATOR_ARGV_0_string) \
- /** output */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_WeaponSound(i, o) /** sound */ i(string, MUTATOR_ARGV_0_string) /** output */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(WeaponSound, EV_WeaponSound);
/** called when a weapon model is about to be set, allows custom paths etc. */
-#define EV_WeaponModel(i, o) \
- /** model */ i(string, MUTATOR_ARGV_0_string) \
- /** output */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_WeaponModel(i, o) /** model */ i(string, MUTATOR_ARGV_0_string) /** output */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(WeaponModel, EV_WeaponModel);
REGISTER_REGISTRY(Buffs)
REGISTRY_CHECK(Buffs)
-#define REGISTER_BUFF(id) \
- REGISTER(Buffs, BUFF_##id, m_id, NEW(Buff))
+#define REGISTER_BUFF(id) REGISTER(Buffs, BUFF_##id, m_id, NEW(Buff))
#include <common/items/item/pickup.qh>
CLASS(Buff, Pickup)
STATIC_INIT(REGISTER_BUFFS) {
FOREACH(Buffs, true, {
- it.m_itemid = BIT(it.m_id - 1); \
- it.m_sprite = strzone(strcat("buff-", it.netname)); \
- });
+ it.m_itemid = BIT(it.m_id - 1); it.m_sprite = strzone(strcat("buff-", it.netname)); });
}
#ifdef SVQC
void buff_Init(entity ent);
void buff_Init_Compat(entity ent, entity replacement);
- #define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
- STAT(BUFFS, this) = b.m_itemid; \
- this.team = t; \
- buff_Init(this); \
- }
- #define BUFF_SPAWNFUNCS(e, b) \
- BUFF_SPAWNFUNC(e, b, 0) \
- BUFF_SPAWNFUNC(e##_team1, b, NUM_TEAM_1) \
- BUFF_SPAWNFUNC(e##_team2, b, NUM_TEAM_2) \
- BUFF_SPAWNFUNC(e##_team3, b, NUM_TEAM_3) \
- BUFF_SPAWNFUNC(e##_team4, b, NUM_TEAM_4)
+ #define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { STAT(BUFFS, this) = b.m_itemid; this.team = t; buff_Init(this); }
+ #define BUFF_SPAWNFUNCS(e, b) BUFF_SPAWNFUNC(e, b, 0) BUFF_SPAWNFUNC(e##_team1, b, NUM_TEAM_1) BUFF_SPAWNFUNC(e##_team2, b, NUM_TEAM_2) BUFF_SPAWNFUNC(e##_team3, b, NUM_TEAM_3) BUFF_SPAWNFUNC(e##_team4, b, NUM_TEAM_4)
#define BUFF_SPAWNFUNC_Q3TA_COMPAT(o, r) spawnfunc(item_##o) { buff_Init_Compat(this, r); }
#else
#define BUFF_SPAWNFUNC(e, b, t)
.int pressedkeys;
#endif
-#define X(dir) \
- tracebox(this.origin, this.mins, this.maxs, this.origin + threshold * dir, true, this); \
- if (trace_fraction < 1 && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) \
- return true;
+#define X(dir) tracebox(this.origin, this.mins, this.maxs, this.origin + threshold * dir, true, this); if (trace_fraction < 1 && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) return true;
// returns true if the player is close to a wall
bool is_close_to_wall(entity this, float threshold)
bool dodge_detected = false;
vector mymovement = PHYS_CS(this).movement;
- #define X(COND,BTN,RESULT) \
- if (mymovement_##COND) { \
- /* is this a state change? */ \
- if(!(PHYS_DODGING_PRESSED_KEYS(this) & KEY_##BTN) || frozen_no_doubletap) { \
- tap_direction_##RESULT; \
- if ((time - this.last_##BTN##_KEY_time) < PHYS_DODGING_TIMEOUT(this) || frozen_no_doubletap) { \
- dodge_detected = true; \
- } else if(PHYS_INPUT_BUTTON_DODGE(this)) { \
- dodge_detected = true; \
- } \
- this.last_##BTN##_KEY_time = time; \
- } \
- }
+ #define X(COND,BTN,RESULT) if (mymovement_##COND) { /* is this a state change? */ if(!(PHYS_DODGING_PRESSED_KEYS(this) & KEY_##BTN) || frozen_no_doubletap) { tap_direction_##RESULT; if ((time - this.last_##BTN##_KEY_time) < PHYS_DODGING_TIMEOUT(this) || frozen_no_doubletap) { dodge_detected = true; } else if(PHYS_INPUT_BUTTON_DODGE(this)) { dodge_detected = true; } this.last_##BTN##_KEY_time = time; } }
X(x < 0, BACKWARD, x--);
X(x > 0, FORWARD, x++);
X(y < 0, LEFT, y--);
#ifdef GAMEQC
-#define NADE_PROJECTILE(i, projectile, trail) MACRO_BEGIN \
- this.m_projectile[i] = projectile; \
- this.m_trail[i] = trail; \
-MACRO_END
+#define NADE_PROJECTILE(i, projectile, trail) MACRO_BEGIN this.m_projectile[i] = projectile; this.m_trail[i] = trail; MACRO_END
#else
#define NADE_PROJECTILE(i, projectile, trail)
#endif
#endif
// returns true if player is reviving it
-#define IS_REVIVING(player, it, revive_extra_size) \
- (it != player && !STAT(FROZEN, it) && !IS_DEAD(it) && SAME_TEAM(it, player) \
- && boxesoverlap(player.absmin - revive_extra_size, player.absmax + revive_extra_size, it.absmin, it.absmax))
+#define IS_REVIVING(player, it, revive_extra_size) (it != player && !STAT(FROZEN, it) && !IS_DEAD(it) && SAME_TEAM(it, player) && boxesoverlap(player.absmin - revive_extra_size, player.absmax + revive_extra_size, it.absmin, it.absmax))
MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
{
nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_medium);
else if(autocvar_g_nades_bonus_score_spree && CS(frag_attacker).killcount > 1)
{
- #define SPREE_ITEM(counta,countb,center,normal,gentle) \
- case counta: { nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_spree); break; }
+ #define SPREE_ITEM(counta,countb,center,normal,gentle) case counta: { nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_spree); break; }
switch(CS(frag_attacker).killcount)
{
KILL_SPREE_LIST
/**
* called to adjust nade damage and force on hit
*/
-#define EV_Nade_Damage(i, o) \
- /** nade */ i(entity, MUTATOR_ARGV_0_entity) \
- /** weapon */ i(entity, MUTATOR_ARGV_1_entity) \
- /** force */ i(vector, MUTATOR_ARGV_2_vector) \
- /**/ o(vector, MUTATOR_ARGV_2_vector) \
- /** damage */ i(float, MUTATOR_ARGV_3_float) \
- /**/ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_Nade_Damage(i, o) /** nade */ i(entity, MUTATOR_ARGV_0_entity) /** weapon */ i(entity, MUTATOR_ARGV_1_entity) /** force */ i(vector, MUTATOR_ARGV_2_vector) /**/ o(vector, MUTATOR_ARGV_2_vector) /** damage */ i(float, MUTATOR_ARGV_3_float) /**/ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage);
#endif
/* refname */ ATTRIB(OverkillHeavyMachineGun, netname, string, "okhmg");
/* wepname */ ATTRIB(OverkillHeavyMachineGun, m_name, string, _("Overkill Heavy Machine Gun"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, solidpenetration, float, PRI) \
- P(class, prefix, spread_add, float, PRI) \
- P(class, prefix, spread_max, float, PRI) \
- P(class, prefix, spread_min, float, PRI) \
- P(class, prefix, ammo, float, SEC) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, refire_type, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, damage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, solidpenetration, float, PRI) P(class, prefix, spread_add, float, PRI) P(class, prefix, spread_max, float, PRI) P(class, prefix, spread_min, float, PRI) P(class, prefix, ammo, float, SEC) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, refire_type, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, OverkillHeavyMachineGun, okhmg)
#undef X
/* refname */ ATTRIB(OverkillMachineGun, netname, string, "okmachinegun");
/* wepname */ ATTRIB(OverkillMachineGun, m_name, string, _("Overkill MachineGun"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, solidpenetration, float, PRI) \
- P(class, prefix, spread_add, float, PRI) \
- P(class, prefix, spread_max, float, PRI) \
- P(class, prefix, spread_min, float, PRI) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, refire_type, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, damage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, solidpenetration, float, PRI) P(class, prefix, spread_add, float, PRI) P(class, prefix, spread_max, float, PRI) P(class, prefix, spread_min, float, PRI) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, refire_type, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, OverkillMachineGun, okmachinegun)
#undef X
/* refname */ ATTRIB(OverkillNex, netname, string, "oknex");
/* wepname */ ATTRIB(OverkillNex, m_name, string, _("Overkill Nex"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, PRI) \
- P(class, prefix, chargepool, float, SEC) \
- P(class, prefix, chargepool_pause_regen, float, SEC) \
- P(class, prefix, chargepool_regen, float, SEC) \
- P(class, prefix, charge, float, NONE) \
- P(class, prefix, charge_animlimit, float, NONE) \
- P(class, prefix, charge_limit, float, NONE) \
- P(class, prefix, charge_maxspeed, float, NONE) \
- P(class, prefix, charge_mindmg, float, NONE) \
- P(class, prefix, charge_minspeed, float, NONE) \
- P(class, prefix, charge_rate, float, NONE) \
- P(class, prefix, charge_rot_pause, float, NONE) \
- P(class, prefix, charge_rot_rate, float, NONE) \
- P(class, prefix, charge_shot_multiplier, float, NONE) \
- P(class, prefix, charge_start, float, NONE) \
- P(class, prefix, charge_velocity_rate, float, NONE) \
- P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
- P(class, prefix, damagefalloff_halflife, float, BOTH) \
- P(class, prefix, damagefalloff_maxdist, float, BOTH) \
- P(class, prefix, damagefalloff_mindist, float, BOTH) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- P(class, prefix, ammo, float, SEC) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, refire_type, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, PRI) P(class, prefix, chargepool, float, SEC) P(class, prefix, chargepool_pause_regen, float, SEC) P(class, prefix, chargepool_regen, float, SEC) P(class, prefix, charge, float, NONE) P(class, prefix, charge_animlimit, float, NONE) P(class, prefix, charge_limit, float, NONE) P(class, prefix, charge_maxspeed, float, NONE) P(class, prefix, charge_mindmg, float, NONE) P(class, prefix, charge_minspeed, float, NONE) P(class, prefix, charge_rate, float, NONE) P(class, prefix, charge_rot_pause, float, NONE) P(class, prefix, charge_rot_rate, float, NONE) P(class, prefix, charge_shot_multiplier, float, NONE) P(class, prefix, charge_start, float, NONE) P(class, prefix, charge_velocity_rate, float, NONE) P(class, prefix, damagefalloff_forcehalflife, float, BOTH) P(class, prefix, damagefalloff_halflife, float, BOTH) P(class, prefix, damagefalloff_maxdist, float, BOTH) P(class, prefix, damagefalloff_mindist, float, BOTH) P(class, prefix, damage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, secondary, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponthrowable, float, NONE) P(class, prefix, ammo, float, SEC) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, refire_type, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) END()
W_PROPS(X, OverkillNex, oknex)
#undef X
/* refname */ ATTRIB(OverkillRocketPropelledChainsaw, netname, string, "okrpc");
/* wepname */ ATTRIB(OverkillRocketPropelledChainsaw, m_name, string, _("Overkill Rocket Propelled Chainsaw"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, damage2, float, PRI) \
- P(class, prefix, damageforcescale, float, PRI) \
- P(class, prefix, edgedamage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, health, float, PRI) \
- P(class, prefix, lifetime, float, PRI) \
- P(class, prefix, radius, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, speedaccel, float, PRI) \
- P(class, prefix, speed, float, PRI) \
- P(class, prefix, ammo, float, SEC) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, refire_type, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, PRI) P(class, prefix, damage, float, PRI) P(class, prefix, damage2, float, PRI) P(class, prefix, damageforcescale, float, PRI) P(class, prefix, edgedamage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, health, float, PRI) P(class, prefix, lifetime, float, PRI) P(class, prefix, radius, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, speedaccel, float, PRI) P(class, prefix, speed, float, PRI) P(class, prefix, ammo, float, SEC) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, refire_type, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, OverkillRocketPropelledChainsaw, okrpc)
#undef X
/* refname */ ATTRIB(OverkillShotgun, netname, string, "okshotgun");
/* wepname */ ATTRIB(OverkillShotgun, m_name, string, _("Overkill Shotgun"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, PRI) \
- P(class, prefix, bot_range, float, PRI) \
- P(class, prefix, bullets, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, solidpenetration, float, PRI) \
- P(class, prefix, spread, float, PRI) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, refire_type, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, PRI) P(class, prefix, bot_range, float, PRI) P(class, prefix, bullets, float, PRI) P(class, prefix, damage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, solidpenetration, float, PRI) P(class, prefix, spread, float, PRI) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, refire_type, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, OverkillShotgun, okshotgun)
#undef X
string RandomItems_GetRandomVanillaItemClassName(string prefix, int types);
/// \brief Called when random item classname is requested.
-#define EV_RandomItems_GetRandomItemClassName(i, o) \
- /** prefix */ i(string, MUTATOR_ARGV_0_string) \
- /** classname */ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_RandomItems_GetRandomItemClassName(i, o) /** prefix */ i(string, MUTATOR_ARGV_0_string) /** classname */ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(RandomItems_GetRandomItemClassName,
EV_RandomItems_GetRandomItemClassName);
MUTATOR_HOOKFUNCTION(superspec, SV_ParseClientCommand)
{
-#define OPTIONINFO(flag,var,test,text,long,short) \
- var = strcat(var, ((flag & test) ? "^2[ON] ^7" : "^1[OFF] ^7")); \
- var = strcat(var, text," ^7(^3 ", long, "^7 | ^3", short, " ^7)\n")
+#define OPTIONINFO(flag,var,test,text,long,short) var = strcat(var, ((flag & test) ? "^2[ON] ^7" : "^1[OFF] ^7")); var = strcat(var, text," ^7(^3 ", long, "^7 | ^3", short, " ^7)\n")
if(MUTATOR_RETURNVALUE) // command was already handled?
return;
vector PlayerTouchWall(entity this)
{
-#define TRACE(newvec) \
- tracebox (start, this.mins, this.maxs, (newvec), true, this); \
- if (trace_fraction < 1 && vdist(this.origin - trace_endpos, <, dist) && trace_plane_normal_z < max_normal) \
- if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) \
- return trace_plane_normal;
+#define TRACE(newvec) tracebox (start, this.mins, this.maxs, (newvec), true, this); if (trace_fraction < 1 && vdist(this.origin - trace_endpos, <, dist) && trace_plane_normal_z < max_normal) if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) return trace_plane_normal;
float dist = 10, max_normal = 0.2, scaler = 100;
vector start = this.origin;
REGISTER_WAYPOINT(Here, _("Here"), "", '0 1 0', 1);
REGISTER_WAYPOINT(Danger, _("DANGER"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(Frozen, _("Frozen!"), "", '0.25 0.90 1', 1);
+REGISTER_WAYPOINT(Frozen, _("Frozen!"), "", '0.25 0.9 1', 1);
REGISTER_WAYPOINT(Item, _("Item"), "", '1 0 1', 1);
drawfill(v1, v2, '0.5 0.5 0.5', 0.5, DRAWFLAG_NORMAL);
vector v3 = v1 + '10 10 0';
- #define OUT(s, z) MACRO_BEGIN \
- drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); \
- v3.y += z + 4; \
- MACRO_END
+ #define OUT(s, z) MACRO_BEGIN drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3.y += z + 4; MACRO_END
float cur_time = 0;
float time_width = 48;
#define N_GNTLOFF 1
#define N__ALWAYS 2
-#define MULTITEAM_ANNCE2(prefix, default, sound, channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position)
-#define MULTITEAM_ANNCE3(prefix, default, sound, channel, volume, position) \
- MULTITEAM_ANNCE2(prefix, default, sound, channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position)
-#define MULTITEAM_ANNCE4(prefix, default, sound, channel, volume, position) \
- MULTITEAM_ANNCE3(prefix, default, sound, channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position)
-#define MULTITEAM_ANNCE(prefix, teams, default, sound, channel, volume, position) \
- NOTIF_ADD_AUTOCVAR(ANNCE_##prefix, default) \
- MULTITEAM_ANNCE##teams(prefix, default, sound, channel, volume, position)
+#define MULTITEAM_ANNCE2(prefix, default, sound, channel, volume, position) MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position) MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position)
+#define MULTITEAM_ANNCE3(prefix, default, sound, channel, volume, position) MULTITEAM_ANNCE2(prefix, default, sound, channel, volume, position) MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position)
+#define MULTITEAM_ANNCE4(prefix, default, sound, channel, volume, position) MULTITEAM_ANNCE3(prefix, default, sound, channel, volume, position) MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position)
+#define MULTITEAM_ANNCE(prefix, teams, default, sound, channel, volume, position) NOTIF_ADD_AUTOCVAR(ANNCE_##prefix, default) MULTITEAM_ANNCE##teams(prefix, default, sound, channel, volume, position)
// MSG_ANNCE_NOTIFICATIONS
MSG_ANNCE_NOTIF(ACHIEVEMENT_AIRSHOT, N_GNTLOFF, "airshot", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
#define N_CONSOLE 1
#define N_CHATCON 2
-#define MULTITEAM_INFO2(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- MSG_INFO_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, type, 1), TCR(gentle, type, 1)) \
- MSG_INFO_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, type, 2), TCR(gentle, type, 2))
-#define MULTITEAM_INFO3(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- MULTITEAM_INFO2(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- MSG_INFO_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, type, 3), TCR(gentle, type, 3))
-#define MULTITEAM_INFO4(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- MULTITEAM_INFO3(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- MSG_INFO_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, type, 4), TCR(gentle, type, 4))
-#define MULTITEAM_INFO(prefix, teams, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) \
- NOTIF_ADD_AUTOCVAR(INFO_##prefix, default) \
- MULTITEAM_INFO##teams(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type)
+#define MULTITEAM_INFO2(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) MSG_INFO_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, type, 1), TCR(gentle, type, 1)) MSG_INFO_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, type, 2), TCR(gentle, type, 2))
+#define MULTITEAM_INFO3(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) MULTITEAM_INFO2(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) MSG_INFO_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, type, 3), TCR(gentle, type, 3))
+#define MULTITEAM_INFO4(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) MULTITEAM_INFO3(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) MSG_INFO_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, type, 4), TCR(gentle, type, 4))
+#define MULTITEAM_INFO(prefix, teams, default, strnum, flnum, args, hudargs, icon, normal, gentle, type) NOTIF_ADD_AUTOCVAR(INFO_##prefix, default) MULTITEAM_INFO##teams(prefix, default, strnum, flnum, args, hudargs, icon, normal, gentle, type)
// MSG_INFO_NOTIFICATIONS
MSG_INFO_NOTIF(CHAT_NOSPECTATORS, N_CHATCON, 0, 0, "", "", "", _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "")
#define N_DISABL 0
#define N_ENABLE 1
-#define MULTITEAM_CENTER2(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- MSG_CENTER_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 1), TCR(gentle, type, 1)) \
- MSG_CENTER_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 2), TCR(gentle, type, 2))
-#define MULTITEAM_CENTER3(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- MULTITEAM_CENTER2(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- MSG_CENTER_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 3), TCR(gentle, type, 3))
-#define MULTITEAM_CENTER4(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- MULTITEAM_CENTER3(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- MSG_CENTER_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 4), TCR(gentle, type, 4))
-#define MULTITEAM_CENTER(prefix, teams, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) \
- NOTIF_ADD_AUTOCVAR(CENTER_##prefix, default) \
- MULTITEAM_CENTER##teams(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type)
+#define MULTITEAM_CENTER2(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) MSG_CENTER_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 1), TCR(gentle, type, 1)) MSG_CENTER_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 2), TCR(gentle, type, 2))
+#define MULTITEAM_CENTER3(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) MULTITEAM_CENTER2(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) MSG_CENTER_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 3), TCR(gentle, type, 3))
+#define MULTITEAM_CENTER4(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) MULTITEAM_CENTER3(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) MSG_CENTER_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, strnum, flnum, args, cpid, durcnt, TCR(normal, type, 4), TCR(gentle, type, 4))
+#define MULTITEAM_CENTER(prefix, teams, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type) NOTIF_ADD_AUTOCVAR(CENTER_##prefix, default) MULTITEAM_CENTER##teams(prefix, default, strnum, flnum, args, cpid, durcnt, normal, gentle, type)
// MSG_CENTER_NOTIFICATIONS
MSG_CENTER_NOTIF(ALONE, N_ENABLE, 0, 0, "", CPID_Null, "0 0", _("^F4You are now alone!"), "")
#define N_DISABL 0
#define N_ENABLE 1
-#define MULTITEAM_MULTI2(prefix, default, anncepre, infopre, centerpre) \
- MSG_MULTI_NOTIF(prefix##_RED, default, anncepre##_RED, infopre##_RED, centerpre##_RED) \
- MSG_MULTI_NOTIF(prefix##_BLUE, default, anncepre##_BLUE, infopre##_BLUE, centerpre##_BLUE)
-#define MULTITEAM_MULTI3(prefix, default, anncepre, infopre, centerpre) \
- MULTITEAM_MULTI2(prefix, default, anncepre, infopre, centerpre) \
- MSG_MULTI_NOTIF(prefix##_YELLOW, default, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
-#define MULTITEAM_MULTI4(prefix, default, anncepre, infopre, centerpre) \
- MULTITEAM_MULTI3(prefix, default, anncepre, infopre, centerpre) \
- MSG_MULTI_NOTIF(prefix##_PINK, default, anncepre##PINK, infopre##PINK, centerpre##PINK)
-#define MULTITEAM_MULTI(prefix, teams, default, anncepre, infopre, centerpre) \
- MULTITEAM_MULTI##teams(prefix, default, anncepre, infopre, centerpre)
+#define MULTITEAM_MULTI2(prefix, default, anncepre, infopre, centerpre) MSG_MULTI_NOTIF(prefix##_RED, default, anncepre##_RED, infopre##_RED, centerpre##_RED) MSG_MULTI_NOTIF(prefix##_BLUE, default, anncepre##_BLUE, infopre##_BLUE, centerpre##_BLUE)
+#define MULTITEAM_MULTI3(prefix, default, anncepre, infopre, centerpre) MULTITEAM_MULTI2(prefix, default, anncepre, infopre, centerpre) MSG_MULTI_NOTIF(prefix##_YELLOW, default, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
+#define MULTITEAM_MULTI4(prefix, default, anncepre, infopre, centerpre) MULTITEAM_MULTI3(prefix, default, anncepre, infopre, centerpre) MSG_MULTI_NOTIF(prefix##_PINK, default, anncepre##PINK, infopre##PINK, centerpre##PINK)
+#define MULTITEAM_MULTI(prefix, teams, default, anncepre, infopre, centerpre) MULTITEAM_MULTI##teams(prefix, default, anncepre, infopre, centerpre)
// MSG_MULTI_NOTIFICATIONS
MSG_MULTI_NOTIF(DEATH_MURDER_BUFF, N_ENABLE, NULL, INFO_DEATH_MURDER_BUFF, NULL)
MSG_MULTI_NOTIF(WEAPON_VAPORIZER_MURDER, N_ENABLE, NULL, INFO_WEAPON_VAPORIZER_MURDER, NULL)
MSG_MULTI_NOTIF(WEAPON_VORTEX_MURDER, N_ENABLE, NULL, INFO_WEAPON_VORTEX_MURDER, NULL)
-#define MULTITEAM_CHOICE2(prefix, default, challow, chtype, optiona, optionb) \
- MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, challow, chtype, optiona##_RED, optionb##_RED) \
- MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, challow, chtype, optiona##_BLUE, optionb##_BLUE)
-#define MULTITEAM_CHOICE3(prefix, default, challow, chtype, optiona, optionb) \
- MULTITEAM_CHOICE2(prefix, default, challow, chtype, optiona, optionb) \
- MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, challow, chtype, optiona##_YELLOW, optionb##_YELLOW)
-#define MULTITEAM_CHOICE4(prefix, default, challow, chtype, optiona, optionb) \
- MULTITEAM_CHOICE3(prefix, default, challow, chtype, optiona, optionb) \
- MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, challow, chtype, optiona##_PINK, optionb##_PINK)
-#define MULTITEAM_CHOICE(prefix, teams, default, challow, chtype, optiona, optionb) \
- NOTIF_ADD_AUTOCVAR(CHOICE_##prefix, default) \
- NOTIF_ADD_AUTOCVAR(CHOICE_##prefix##_ALLOWED, challow) \
- MULTITEAM_CHOICE##teams(prefix, default, challow, chtype, optiona, optionb)
+#define MULTITEAM_CHOICE2(prefix, default, challow, chtype, optiona, optionb) MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, default, challow, chtype, optiona##_RED, optionb##_RED) MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, default, challow, chtype, optiona##_BLUE, optionb##_BLUE)
+#define MULTITEAM_CHOICE3(prefix, default, challow, chtype, optiona, optionb) MULTITEAM_CHOICE2(prefix, default, challow, chtype, optiona, optionb) MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, default, challow, chtype, optiona##_YELLOW, optionb##_YELLOW)
+#define MULTITEAM_CHOICE4(prefix, default, challow, chtype, optiona, optionb) MULTITEAM_CHOICE3(prefix, default, challow, chtype, optiona, optionb) MSG_CHOICE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, default, challow, chtype, optiona##_PINK, optionb##_PINK)
+#define MULTITEAM_CHOICE(prefix, teams, default, challow, chtype, optiona, optionb) NOTIF_ADD_AUTOCVAR(CHOICE_##prefix, default) NOTIF_ADD_AUTOCVAR(CHOICE_##prefix##_ALLOWED, challow) MULTITEAM_CHOICE##teams(prefix, default, challow, chtype, optiona, optionb)
#undef N_DISABL
#undef N_ENABLE
// ======================
// Process Notif String
// ======================
- #define SET_NOTIF_STRING(string,stringname) MACRO_BEGIN \
- notif.nent_string = strzone(CCR( \
- Process_Notif_Line( \
- typeId, \
- (var_cvar > 1), \
- string, \
- typestring, \
- namestring, \
- stringname \
- )) \
- ); \
- MACRO_END
+ #define SET_NOTIF_STRING(string,stringname) MACRO_BEGIN notif.nent_string = strzone(CCR( Process_Notif_Line( typeId, (var_cvar > 1), string, typestring, namestring, stringname )) ); MACRO_END
if(GENTLE)
{
{
#define NOTIF_WRITE(str) write_String_To_File(fh, str, alsoprint)
- #define NOTIF_WRITE_ENTITY(e, description) \
- NOTIF_WRITE(sprintf( \
- "seta notification_%s \"%d\" \"%s\"\n", \
- Get_Notif_CvarName(e), e.nent_default, description \
- ))
+ #define NOTIF_WRITE_ENTITY(e, description) NOTIF_WRITE(sprintf( "seta notification_%s \"%d\" \"%s\"\n", Get_Notif_CvarName(e), e.nent_default, description ))
- #define NOTIF_WRITE_ENTITY_CHOICE(e, descriptiona, descriptionb) \
- NOTIF_WRITE(sprintf( \
- "seta notification_%s \"%d\" \"%s\"\n" \
- "seta notification_%s_ALLOWED \"%d\" \"%s\"\n", \
- Get_Notif_CvarName(e), e.nent_default, descriptiona, \
- Get_Notif_CvarName(e), e.nent_challow_def, descriptionb \
- ))
+ #define NOTIF_WRITE_ENTITY_CHOICE(e, descriptiona, descriptionb) NOTIF_WRITE(sprintf( "seta notification_%s \"%d\" \"%s\"\n" "seta notification_%s_ALLOWED \"%d\" \"%s\"\n", Get_Notif_CvarName(e), e.nent_default, descriptiona, Get_Notif_CvarName(e), e.nent_challow_def, descriptionb ))
- #define NOTIF_WRITE_HARDCODED(cvar, default, description) \
- NOTIF_WRITE("seta notification_" cvar " \"" default "\" \"" description "\"\n")
+ #define NOTIF_WRITE_HARDCODED(cvar, default, description) NOTIF_WRITE("seta notification_" cvar " \"" default "\" \"" description "\"\n")
// Note: This warning only applies to the notifications.cfg file that is output...
// You ARE supposed to manually edit this function to add i.e. hard coded
string s1, string s2, string s3, string s4,
float f1, float f2, float f3, float f4)
{
- #define VARITEM(stringc, floatc, args) \
- if ((stringcount == stringc) && (floatcount == floatc)) \
- { Local_Notification(net_type, net_name, args); return; }
+ #define VARITEM(stringc, floatc, args) if ((stringcount == stringc) && (floatcount == floatc)) { Local_Notification(net_type, net_name, args); return; }
EIGHT_VARS_TO_VARARGS_VARLIST
#undef VARITEM
Local_Notification(net_type, net_name); // some notifications don't have any arguments at all
// 2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose)
entity found_choice;
- #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN \
- if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) { \
- switch (CS(ent).msg_choice_choices[net_name.nent_choice_idx]) \
- { \
- case 1: found_choice = notif.nent_optiona; break; \
- case 2: found_choice = notif.nent_optionb; break; \
- default: action; \
- } \
- } else { \
- found_choice = notif.nent_optiona; \
- } \
- Send_Notification_WOVA( \
- NOTIF_ONE_ONLY, \
- ent, \
- found_choice.nent_type, \
- found_choice, \
- found_choice.nent_stringcount, \
- found_choice.nent_floatcount, \
- s1, s2, s3, s4, \
- f1, f2, f3, f4); \
- MACRO_END
+ #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) { switch (CS(ent).msg_choice_choices[net_name.nent_choice_idx]) { case 1: found_choice = notif.nent_optiona; break; case 2: found_choice = notif.nent_optionb; break; default: action; } } else { found_choice = notif.nent_optiona; } Send_Notification_WOVA( NOTIF_ONE_ONLY, ent, found_choice.nent_type, found_choice, found_choice.nent_stringcount, found_choice.nent_floatcount, s1, s2, s3, s4, f1, f2, f3, f4); MACRO_END
switch (broadcast)
{
));
#endif
- #define VARITEM(stringc, floatc, args) \
- if ((stringcount == stringc) && (floatcount == floatc)) \
- { Send_Notification(broadcast, client, net_type, net_name, args); return; }
+ #define VARITEM(stringc, floatc, args) if ((stringcount == stringc) && (floatcount == floatc)) { Send_Notification(broadcast, client, net_type, net_name, args); return; }
EIGHT_VARS_TO_VARARGS_VARLIST
#undef VARITEM
Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
));
#endif
- #define VARITEM(stringc, floatc, args) \
- if ((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
- { Send_Notification(broadcast, client, net_type, net_name, args); return; }
+ #define VARITEM(stringc, floatc, args) if ((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) { Send_Notification(broadcast, client, net_type, net_name, args); return; }
EIGHT_VARS_TO_VARARGS_VARLIST
#undef VARITEM
Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
#define APP_TEAM_NUM(num, prefix) ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK)))
#define APP_NUM(num, prefix) ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL)
-#define EIGHT_VARS_TO_VARARGS_VARLIST \
- VARITEM(1, 0, s1) \
- VARITEM(2, 0, XPD(s1, s2)) \
- VARITEM(3, 0, XPD(s1, s2, s3)) \
- VARITEM(4, 0, XPD(s1, s2, s3, s4)) \
- VARITEM(0, 1, f1) \
- VARITEM(1, 1, XPD(s1, f1)) \
- VARITEM(2, 1, XPD(s1, s2, f1)) \
- VARITEM(3, 1, XPD(s1, s2, s3, f1)) \
- VARITEM(4, 1, XPD(s1, s2, s3, s4, f1)) \
- VARITEM(0, 2, XPD(f1, f2)) \
- VARITEM(1, 2, XPD(s1, f1, f2)) \
- VARITEM(2, 2, XPD(s1, s2, f1, f2)) \
- VARITEM(3, 2, XPD(s1, s2, s3, f1, f2)) \
- VARITEM(4, 2, XPD(s1, s2, s3, s4, f1, f2)) \
- VARITEM(0, 3, XPD(f1, f2, f3)) \
- VARITEM(1, 3, XPD(s1, f1, f2, f3)) \
- VARITEM(2, 3, XPD(s1, s2, f1, f2, f3)) \
- VARITEM(3, 3, XPD(s1, s2, s3, f1, f2, f3)) \
- VARITEM(4, 3, XPD(s1, s2, s3, s4, f1, f2, f3)) \
- VARITEM(0, 4, XPD(f1, f2, f3, f4)) \
- VARITEM(1, 4, XPD(s1, f1, f2, f3, f4)) \
- VARITEM(2, 4, XPD(s1, s2, f1, f2, f3, f4)) \
- VARITEM(3, 4, XPD(s1, s2, s3, f1, f2, f3, f4)) \
- VARITEM(4, 4, XPD(s1, s2, s3, s4, f1, f2, f3, f4))
+#define EIGHT_VARS_TO_VARARGS_VARLIST VARITEM(1, 0, s1) VARITEM(2, 0, XPD(s1, s2)) VARITEM(3, 0, XPD(s1, s2, s3)) VARITEM(4, 0, XPD(s1, s2, s3, s4)) VARITEM(0, 1, f1) VARITEM(1, 1, XPD(s1, f1)) VARITEM(2, 1, XPD(s1, s2, f1)) VARITEM(3, 1, XPD(s1, s2, s3, f1)) VARITEM(4, 1, XPD(s1, s2, s3, s4, f1)) VARITEM(0, 2, XPD(f1, f2)) VARITEM(1, 2, XPD(s1, f1, f2)) VARITEM(2, 2, XPD(s1, s2, f1, f2)) VARITEM(3, 2, XPD(s1, s2, s3, f1, f2)) VARITEM(4, 2, XPD(s1, s2, s3, s4, f1, f2)) VARITEM(0, 3, XPD(f1, f2, f3)) VARITEM(1, 3, XPD(s1, f1, f2, f3)) VARITEM(2, 3, XPD(s1, s2, f1, f2, f3)) VARITEM(3, 3, XPD(s1, s2, s3, f1, f2, f3)) VARITEM(4, 3, XPD(s1, s2, s3, s4, f1, f2, f3)) VARITEM(0, 4, XPD(f1, f2, f3, f4)) VARITEM(1, 4, XPD(s1, f1, f2, f3, f4)) VARITEM(2, 4, XPD(s1, s2, f1, f2, f3, f4)) VARITEM(3, 4, XPD(s1, s2, s3, f1, f2, f3, f4)) VARITEM(4, 4, XPD(s1, s2, s3, s4, f1, f2, f3, f4))
void Destroy_All_Notifications();
void Create_Notification_Entity(entity notif,
string BUFF_NAME(int i);
-#define NOTIF_ARGUMENT_LIST \
- ARG_CASE(ARG_CS_SV_HA, "s1", s1) \
- ARG_CASE(ARG_CS_SV_HA, "s2", s2) \
- ARG_CASE(ARG_CS_SV_HA, "s3", s3) \
- ARG_CASE(ARG_CS_SV_HA, "s4", s4) \
- ARG_CASE(ARG_CS_SV, "s2loc", ((autocvar_notification_show_location && (s2 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s2) : "")) \
- ARG_CASE(ARG_CS_SV, "s3loc", ((autocvar_notification_show_location && (s3 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s3) : "")) \
- ARG_CASE(ARG_CS_SV_DC, "f1", ftos(f1)) \
- ARG_CASE(ARG_CS_SV_DC, "f2", ftos(f2)) \
- ARG_CASE(ARG_CS_SV, "f3", ftos(f3)) \
- ARG_CASE(ARG_CS_SV, "f4", ftos(f4)) \
- ARG_CASE(ARG_CS_SV, "f1dtime", ftos_decimals(TIME_DECODE(f1), 2)) \
- ARG_CASE(ARG_CS_SV, "f2dtime", ftos_decimals(TIME_DECODE(f2), 2)) \
- ARG_CASE(ARG_CS, "f2primsec", (f2 ? _("secondary") : _("primary"))) \
- ARG_CASE(ARG_CS, "f3primsec", (f3 ? _("secondary") : _("primary"))) \
- ARG_CASE(ARG_CS, "f1secs", count_seconds(f1)) \
- ARG_CASE(ARG_CS, "f1points", (f1 == 1 ? _("point") : _("points"))) \
- ARG_CASE(ARG_CS_SV, "f1ord", count_ordinal(f1)) \
- ARG_CASE(ARG_CS_SV, "f1time", process_time(2, f1)) \
- ARG_CASE(ARG_CS_SV_HA, "f1race_time", mmssss(f1)) \
- ARG_CASE(ARG_CS_SV_HA, "f2race_time", mmssss(f2)) \
- ARG_CASE(ARG_CS_SV_HA, "f3race_time", mmssss(f3)) \
- ARG_CASE(ARG_CS_SV, "race_col", CCR(((f1 == 1) ? "^F1" : "^F2"))) \
- ARG_CASE(ARG_CS_SV, "race_diff", ((f2 > f3) ? sprintf(CCR("^1[+%s]"), mmssss(f2 - f3)) : sprintf(CCR("^2[-%s]"), mmssss(f3 - f2)))) \
- ARG_CASE(ARG_CS, "missing_teams", notif_arg_missing_teams(f1)) \
- ARG_CASE(ARG_CS, "pass_key", getcommandkey(_("drop flag"), "+use")) \
- ARG_CASE(ARG_CS, "nade_key", getcommandkey(_("throw nade"), "dropweapon")) \
- ARG_CASE(ARG_CS, "frag_ping", notif_arg_frag_ping(true, f2)) \
- ARG_CASE(ARG_CS, "frag_stats", notif_arg_frag_stats(f2, f3, f4)) \
- /*ARG_CASE(ARG_CS, "frag_pos", ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ \
- ARG_CASE(ARG_CS, "spree_cen", (autocvar_notification_show_sprees ? notif_arg_spree_cen(f1) : "")) \
- ARG_CASE(ARG_CS_SV, "spree_inf", (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) \
- ARG_CASE(ARG_CS_SV, "spree_end", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
- ARG_CASE(ARG_CS_SV, "spree_lost", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
- ARG_CASE(ARG_CS_SV, "item_wepname", Weapons_from(f1).m_name) \
- ARG_CASE(ARG_CS_SV, "item_buffname", BUFF_NAME(f1)) \
- ARG_CASE(ARG_CS_SV, "f3buffname", BUFF_NAME(f3)) \
- ARG_CASE(ARG_CS_SV, "item_wepammo", (f2 > 0 ? notif_arg_item_wepammo(f1, f2) : "")) \
- ARG_CASE(ARG_DC, "item_centime", ftos(autocvar_notification_item_centerprinttime)) \
- ARG_CASE(ARG_SV, "death_team", Team_ColoredFullName(f1)) \
- ARG_CASE(ARG_CS, "death_team", Team_ColoredFullName(f1 - 1)) \
- ARG_CASE(ARG_CS_SV_HA, "minigame1_name",find(NULL,netname,s1).descriptor.message) \
- ARG_CASE(ARG_CS_SV_HA, "minigame1_d", find(NULL,netname,s1).descriptor.netname)
-
-#define NOTIF_HIT_MAX(count,funcname) MACRO_BEGIN \
- if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } \
-MACRO_END
+#define NOTIF_ARGUMENT_LIST ARG_CASE(ARG_CS_SV_HA, "s1", s1) ARG_CASE(ARG_CS_SV_HA, "s2", s2) ARG_CASE(ARG_CS_SV_HA, "s3", s3) ARG_CASE(ARG_CS_SV_HA, "s4", s4) ARG_CASE(ARG_CS_SV, "s2loc", ((autocvar_notification_show_location && (s2 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s2) : "")) ARG_CASE(ARG_CS_SV, "s3loc", ((autocvar_notification_show_location && (s3 != "")) ? sprintf(( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s3) : "")) ARG_CASE(ARG_CS_SV_DC, "f1", ftos(f1)) ARG_CASE(ARG_CS_SV_DC, "f2", ftos(f2)) ARG_CASE(ARG_CS_SV, "f3", ftos(f3)) ARG_CASE(ARG_CS_SV, "f4", ftos(f4)) ARG_CASE(ARG_CS_SV, "f1dtime", ftos_decimals(TIME_DECODE(f1), 2)) ARG_CASE(ARG_CS_SV, "f2dtime", ftos_decimals(TIME_DECODE(f2), 2)) ARG_CASE(ARG_CS, "f2primsec", (f2 ? _("secondary") : _("primary"))) ARG_CASE(ARG_CS, "f3primsec", (f3 ? _("secondary") : _("primary"))) ARG_CASE(ARG_CS, "f1secs", count_seconds(f1)) ARG_CASE(ARG_CS, "f1points", (f1 == 1 ? _("point") : _("points"))) ARG_CASE(ARG_CS_SV, "f1ord", count_ordinal(f1)) ARG_CASE(ARG_CS_SV, "f1time", process_time(2, f1)) ARG_CASE(ARG_CS_SV_HA, "f1race_time", mmssss(f1)) ARG_CASE(ARG_CS_SV_HA, "f2race_time", mmssss(f2)) ARG_CASE(ARG_CS_SV_HA, "f3race_time", mmssss(f3)) ARG_CASE(ARG_CS_SV, "race_col", CCR(((f1 == 1) ? "^F1" : "^F2"))) ARG_CASE(ARG_CS_SV, "race_diff", ((f2 > f3) ? sprintf(CCR("^1[+%s]"), mmssss(f2 - f3)) : sprintf(CCR("^2[-%s]"), mmssss(f3 - f2)))) ARG_CASE(ARG_CS, "missing_teams", notif_arg_missing_teams(f1)) ARG_CASE(ARG_CS, "pass_key", getcommandkey(_("drop flag"), "+use")) ARG_CASE(ARG_CS, "nade_key", getcommandkey(_("throw nade"), "dropweapon")) ARG_CASE(ARG_CS, "frag_ping", notif_arg_frag_ping(true, f2)) ARG_CASE(ARG_CS, "frag_stats", notif_arg_frag_stats(f2, f3, f4)) /*ARG_CASE(ARG_CS, "frag_pos", ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ ARG_CASE(ARG_CS, "spree_cen", (autocvar_notification_show_sprees ? notif_arg_spree_cen(f1) : "")) ARG_CASE(ARG_CS_SV, "spree_inf", (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) ARG_CASE(ARG_CS_SV, "spree_end", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) ARG_CASE(ARG_CS_SV, "spree_lost", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) ARG_CASE(ARG_CS_SV, "item_wepname", Weapons_from(f1).m_name) ARG_CASE(ARG_CS_SV, "item_buffname", BUFF_NAME(f1)) ARG_CASE(ARG_CS_SV, "f3buffname", BUFF_NAME(f3)) ARG_CASE(ARG_CS_SV, "item_wepammo", (f2 > 0 ? notif_arg_item_wepammo(f1, f2) : "")) ARG_CASE(ARG_DC, "item_centime", ftos(autocvar_notification_item_centerprinttime)) ARG_CASE(ARG_SV, "death_team", Team_ColoredFullName(f1)) ARG_CASE(ARG_CS, "death_team", Team_ColoredFullName(f1 - 1)) ARG_CASE(ARG_CS_SV_HA, "minigame1_name",find(NULL,netname,s1).descriptor.message) ARG_CASE(ARG_CS_SV_HA, "minigame1_d", find(NULL,netname,s1).descriptor.netname)
+
+#define NOTIF_HIT_MAX(count,funcname) MACRO_BEGIN if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } MACRO_END
#define NOTIF_HIT_UNKNOWN(token,funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }
-#define KILL_SPREE_LIST \
- SPREE_ITEM(3, 03, _("TRIPLE FRAG! "), _("%s^K1 made a TRIPLE FRAG! %s^BG"), _("%s^K1 made a TRIPLE SCORE! %s^BG")) \
- SPREE_ITEM(5, 05, _("RAGE! "), _("%s^K1 unlocked RAGE! %s^BG"), _("%s^K1 made FIVE SCORES IN A ROW! %s^BG")) \
- SPREE_ITEM(10, 10, _("MASSACRE! "), _("%s^K1 started a MASSACRE! %s^BG"), _("%s^K1 made TEN SCORES IN A ROW! %s^BG")) \
- SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) \
- SPREE_ITEM(20, 20, _("BERSERKER! "), _("%s^K1 is a BERSERKER! %s^BG"), _("%s^K1 made TWENTY SCORES IN A ROW! %s^BG")) \
- SPREE_ITEM(25, 25, _("CARNAGE! "), _("%s^K1 inflicts CARNAGE! %s^BG"), _("%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG")) \
- SPREE_ITEM(30, 30, _("ARMAGEDDON! "), _("%s^K1 unleashes ARMAGEDDON! %s^BG"), _("%s^K1 made THIRTY SCORES IN A ROW! %s^BG"))
+#define KILL_SPREE_LIST SPREE_ITEM(3, 03, _("TRIPLE FRAG! "), _("%s^K1 made a TRIPLE FRAG! %s^BG"), _("%s^K1 made a TRIPLE SCORE! %s^BG")) SPREE_ITEM(5, 05, _("RAGE! "), _("%s^K1 unlocked RAGE! %s^BG"), _("%s^K1 made FIVE SCORES IN A ROW! %s^BG")) SPREE_ITEM(10, 10, _("MASSACRE! "), _("%s^K1 started a MASSACRE! %s^BG"), _("%s^K1 made TEN SCORES IN A ROW! %s^BG")) SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) SPREE_ITEM(20, 20, _("BERSERKER! "), _("%s^K1 is a BERSERKER! %s^BG"), _("%s^K1 made TWENTY SCORES IN A ROW! %s^BG")) SPREE_ITEM(25, 25, _("CARNAGE! "), _("%s^K1 inflicts CARNAGE! %s^BG"), _("%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG")) SPREE_ITEM(30, 30, _("ARMAGEDDON! "), _("%s^K1 unleashes ARMAGEDDON! %s^BG"), _("%s^K1 made THIRTY SCORES IN A ROW! %s^BG"))
#ifdef CSQC
string notif_arg_frag_ping(bool newline, float fping)
{
if(spree > 1)
{
- #define SPREE_ITEM(counta,countb,center,normal,gentle) \
- case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
+ #define SPREE_ITEM(counta,countb,center,normal,gentle) case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
switch(spree)
{
if(spree > 1)
{
- #define SPREE_ITEM(counta,countb,center,normal,gentle) \
- case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
+ #define SPREE_ITEM(counta,countb,center,normal,gentle) case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
switch(spree)
{
return it;
}
-#define MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, default, sound, channel, volume, position) \
- MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, default, sound, channel, volume, position)
-
-#define MSG_ANNCE_NOTIF(name, default, sound, channel, volume, position) \
- NOTIF_ADD_AUTOCVAR(ANNCE_##name, default) \
- MSG_ANNCE_NOTIF_(0, ANNCE_##name, ANNCE_##name, default, sound, channel, volume, position)
-
-#define MSG_ANNCE_NOTIF_(teamnum, name, cvarname, default, sound, channel, volume, position) \
- REGISTER(Notifications, name, m_id, new_pure(msg_annce_notification)) { \
- Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_ANNCE, strtoupper(#name), teamnum); \
- Create_Notification_Entity_Annce(this, ACVNN(cvarname), strtoupper(#name), \
- channel, /* channel */ \
- sound, /* snd */ \
- volume, /* vol */ \
- position); /* position */ \
- }
+#define MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, default, sound, channel, volume, position) MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, default, sound, channel, volume, position)
-#define MSG_INFO_NOTIF_TEAM(teamnum, name, cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle) \
- MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle)
-
-#define MSG_INFO_NOTIF(name, default, strnum, flnum, args, hudargs, icon, normal, gentle) \
- NOTIF_ADD_AUTOCVAR(INFO_##name, default) \
- MSG_INFO_NOTIF_(0, INFO_##name, INFO_##name, default, strnum, flnum, args, hudargs, icon, normal, gentle)
-
-#define MSG_INFO_NOTIF_(teamnum, name, cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle) \
- REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { \
- Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_INFO, strtoupper(#name), teamnum); \
- Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, \
- args, /* args */ \
- hudargs, /* hudargs */ \
- icon, /* icon */ \
- CPID_Null,/* cpid */ \
- "", /* durcnt */ \
- normal, /* normal */ \
- gentle); /* gentle */ \
- }
+#define MSG_ANNCE_NOTIF(name, default, sound, channel, volume, position) NOTIF_ADD_AUTOCVAR(ANNCE_##name, default) MSG_ANNCE_NOTIF_(0, ANNCE_##name, ANNCE_##name, default, sound, channel, volume, position)
+
+#define MSG_ANNCE_NOTIF_(teamnum, name, cvarname, default, sound, channel, volume, position) REGISTER(Notifications, name, m_id, new_pure(msg_annce_notification)) { Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_ANNCE, strtoupper(#name), teamnum); Create_Notification_Entity_Annce(this, ACVNN(cvarname), strtoupper(#name), channel, /* channel */ sound, /* snd */ volume, /* vol */ position); /* position */ }
+
+#define MSG_INFO_NOTIF_TEAM(teamnum, name, cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle) MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle)
+
+#define MSG_INFO_NOTIF(name, default, strnum, flnum, args, hudargs, icon, normal, gentle) NOTIF_ADD_AUTOCVAR(INFO_##name, default) MSG_INFO_NOTIF_(0, INFO_##name, INFO_##name, default, strnum, flnum, args, hudargs, icon, normal, gentle)
+
+#define MSG_INFO_NOTIF_(teamnum, name, cvarname, default, strnum, flnum, args, hudargs, icon, normal, gentle) REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_INFO, strtoupper(#name), teamnum); Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, args, /* args */ hudargs, /* hudargs */ icon, /* icon */ CPID_Null,/* cpid */ "", /* durcnt */ normal, /* normal */ gentle); /* gentle */ }
.string nent_iconargs;
-#define MULTIICON_INFO(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) \
- MULTIICON_INFO_(INFO_##name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
-#define MULTIICON_INFO_(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) \
- NOTIF_ADD_AUTOCVAR(name, default) \
- REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, strtoupper(#name), 0); \
- Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
- args, /* args */ \
- hudargs, /* hudargs */ \
- icon, /* icon */ \
- CPID_Null,/* cpid */ \
- "", /* durcnt */ \
- normal, /* normal */ \
- gentle); /* gentle */ \
- this.nent_iconargs = iconargs; \
- }
+#define MULTIICON_INFO(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) MULTIICON_INFO_(INFO_##name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
+#define MULTIICON_INFO_(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) NOTIF_ADD_AUTOCVAR(name, default) REGISTER(Notifications, name, m_id, new_pure(msg_info_notification)) { Create_Notification_Entity (this, default, ACVNN(name), MSG_INFO, strtoupper(#name), 0); Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, args, /* args */ hudargs, /* hudargs */ icon, /* icon */ CPID_Null,/* cpid */ "", /* durcnt */ normal, /* normal */ gentle); /* gentle */ this.nent_iconargs = iconargs; }
-#define MSG_CENTER_NOTIF_TEAM(teamnum, name, cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle) \
- MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
-
-#define MSG_CENTER_NOTIF(name, default, strnum, flnum, args, cpid, durcnt, normal, gentle) \
- NOTIF_ADD_AUTOCVAR(CENTER_##name, default) \
- MSG_CENTER_NOTIF_(0, CENTER_##name, CENTER_##name, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
-
-#define MSG_CENTER_NOTIF_(teamnum, name, cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle) \
- REGISTER(Notifications, name, m_id, new_pure(msg_center_notification)) { \
- Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_CENTER, strtoupper(#name), teamnum); \
- Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, \
- args, /* args */ \
- "", /* hudargs */ \
- "", /* icon */ \
- cpid, /* cpid */ \
- durcnt, /* durcnt */ \
- normal, /* normal */ \
- gentle); /* gentle */ \
- }
+#define MSG_CENTER_NOTIF_TEAM(teamnum, name, cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle) MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
-#define MSG_MULTI_NOTIF(name, default, anncename, infoname, centername) \
- NOTIF_ADD_AUTOCVAR(name, default) \
- REGISTER(Notifications, name, m_id, new_pure(msg_multi_notification)) { \
- Create_Notification_Entity (this, default, ACVNN(name), MSG_MULTI, strtoupper(#name), 0); \
- Create_Notification_Entity_Multi(this, ACVNN(name), strtoupper(#name), \
- anncename, /* anncename */ \
- infoname, /* infoname */ \
- centername); /* centername */ \
- }
+#define MSG_CENTER_NOTIF(name, default, strnum, flnum, args, cpid, durcnt, normal, gentle) NOTIF_ADD_AUTOCVAR(CENTER_##name, default) MSG_CENTER_NOTIF_(0, CENTER_##name, CENTER_##name, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
-#define MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) \
- MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, default, challow, chtype, optiona, optionb)
-
-#define MSG_CHOICE_NOTIF(name, default, challow, chtype, optiona, optionb) \
- NOTIF_ADD_AUTOCVAR(CHOICE_##name, default) \
- NOTIF_ADD_AUTOCVAR(CHOICE_##name##_ALLOWED, challow) \
- MSG_CHOICE_NOTIF_(0, CHOICE_##name, CHOICE_##name, default, challow, chtype, optiona, optionb)
-
-#define MSG_CHOICE_NOTIF_(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) \
- REGISTER(Notifications, name, m_id, new_pure(msg_choice_notification)) { \
- this.nent_choice_idx = nent_choice_count++; \
- Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_CHOICE, strtoupper(#name), teamnum); \
- Create_Notification_Entity_Choice(this, ACVNN(cvarname), strtoupper(#name), \
- challow, /* challow_def */ \
- autocvar_notification_##cvarname##_ALLOWED, /* challow_var */ \
- chtype, /* chtype */ \
- optiona, /* optiona */ \
- optionb); /* optionb */ \
- }
+#define MSG_CENTER_NOTIF_(teamnum, name, cvarname, default, strnum, flnum, args, cpid, durcnt, normal, gentle) REGISTER(Notifications, name, m_id, new_pure(msg_center_notification)) { Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_CENTER, strtoupper(#name), teamnum); Create_Notification_Entity_InfoCenter(this, ACVNN(cvarname), strtoupper(#name), strnum, flnum, args, /* args */ "", /* hudargs */ "", /* icon */ cpid, /* cpid */ durcnt, /* durcnt */ normal, /* normal */ gentle); /* gentle */ }
+
+#define MSG_MULTI_NOTIF(name, default, anncename, infoname, centername) NOTIF_ADD_AUTOCVAR(name, default) REGISTER(Notifications, name, m_id, new_pure(msg_multi_notification)) { Create_Notification_Entity (this, default, ACVNN(name), MSG_MULTI, strtoupper(#name), 0); Create_Notification_Entity_Multi(this, ACVNN(name), strtoupper(#name), anncename, /* anncename */ infoname, /* infoname */ centername); /* centername */ }
+
+#define MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, default, challow, chtype, optiona, optionb)
+
+#define MSG_CHOICE_NOTIF(name, default, challow, chtype, optiona, optionb) NOTIF_ADD_AUTOCVAR(CHOICE_##name, default) NOTIF_ADD_AUTOCVAR(CHOICE_##name##_ALLOWED, challow) MSG_CHOICE_NOTIF_(0, CHOICE_##name, CHOICE_##name, default, challow, chtype, optiona, optionb)
+
+#define MSG_CHOICE_NOTIF_(teamnum, name, cvarname, default, challow, chtype, optiona, optionb) REGISTER(Notifications, name, m_id, new_pure(msg_choice_notification)) { this.nent_choice_idx = nent_choice_count++; Create_Notification_Entity (this, default, ACVNN(cvarname), MSG_CHOICE, strtoupper(#name), teamnum); Create_Notification_Entity_Choice(this, ACVNN(cvarname), strtoupper(#name), challow, /* challow_def */ autocvar_notification_##cvarname##_ALLOWED, /* challow_var */ chtype, /* chtype */ optiona, /* optiona */ optionb); /* optionb */ }
REGISTRY_BEGIN(Notifications)
{
this.velocity = this.velocity * (1 - blendrate) + (newdir * blendrate) * velo;
}
*/
-#define movelib_move_simple(e,newdir,velo,blendrate) \
- e.velocity = e.velocity * (1 - blendrate) + (newdir * blendrate) * velo
+#define movelib_move_simple(e,newdir,velo,blendrate) e.velocity = e.velocity * (1 - blendrate) + (newdir * blendrate) * velo
-#define movelib_move_simple_gravity(e,newdir,velo,blendrate) \
- if(IS_ONGROUND(e)) movelib_move_simple(e,newdir,velo,blendrate)
+#define movelib_move_simple_gravity(e,newdir,velo,blendrate) if(IS_ONGROUND(e)) movelib_move_simple(e,newdir,velo,blendrate)
void movelib_brake_simple(entity this, float force);
int _Movetype_UnstickEntity(entity this) // SV_UnstickEntity
{
_Movetype_TestEntityPosition_ent = this;
- if (!_Movetype_TestEntityPosition(' 0 0 0')) {
+ if (!_Movetype_TestEntityPosition('0 0 0')) {
return UNSTICK_FINE;
}
#define X(v) if (_Movetype_TestEntityPosition(v))
- X('-1 0 0') X(' 1 0 0')
- X(' 0 -1 0') X(' 0 1 0')
- X('-1 -1 0') X(' 1 -1 0')
- X('-1 1 0') X(' 1 1 0')
+ X('-1 0 0') X('1 0 0')
+ X('0 -1 0') X('0 1 0')
+ X('-1 -1 0') X('1 -1 0')
+ X('-1 1 0') X('1 1 0')
#undef X
{
- #define X(i) \
- if (_Movetype_TestEntityPosition('0 0 -1' * i)) \
- if (_Movetype_TestEntityPosition('0 0 1' * i))
+ #define X(i) if (_Movetype_TestEntityPosition('0 0 -1' * i)) if (_Movetype_TestEntityPosition('0 0 1' * i))
X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8)
X(9) X(10) X(11) X(12) X(13) X(14) X(15) X(16)
X(17)
.vector tic_saved_angles;
void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy) // SV_Physics_Entity
{
-#define X(s) \
- if(this.(s) != this.tic_saved_##s) \
- this.tic_##s = this.(s)
+#define X(s) if(this.(s) != this.tic_saved_##s) this.tic_##s = this.(s)
X(origin);
X(velocity);
// used for special commands and idle checking, not from the engine
// TODO: cache
-#define PHYS_INPUT_BUTTON_MASK(s) ( \
- (1 << 0) * PHYS_INPUT_BUTTON_ATCK(s) \
- | (1 << 1) * PHYS_INPUT_BUTTON_JUMP(s) \
- | (1 << 2) * PHYS_INPUT_BUTTON_ATCK2(s) \
- | (1 << 3) * PHYS_INPUT_BUTTON_ZOOM(s) \
- | (1 << 4) * PHYS_INPUT_BUTTON_CROUCH(s) \
- | (1 << 5) * PHYS_INPUT_BUTTON_HOOK(s) \
- | (1 << 6) * PHYS_INPUT_BUTTON_USE(s) \
- | (1 << 7) * PHYS_INPUT_BUTTON_BACKWARD(s) \
- | (1 << 8) * PHYS_INPUT_BUTTON_FORWARD(s) \
- | (1 << 9) * PHYS_INPUT_BUTTON_LEFT(s) \
- | (1 << 10) * PHYS_INPUT_BUTTON_RIGHT(s) \
- )
+#define PHYS_INPUT_BUTTON_MASK(s) ( (1 << 0) * PHYS_INPUT_BUTTON_ATCK(s) | (1 << 1) * PHYS_INPUT_BUTTON_JUMP(s) | (1 << 2) * PHYS_INPUT_BUTTON_ATCK2(s) | (1 << 3) * PHYS_INPUT_BUTTON_ZOOM(s) | (1 << 4) * PHYS_INPUT_BUTTON_CROUCH(s) | (1 << 5) * PHYS_INPUT_BUTTON_HOOK(s) | (1 << 6) * PHYS_INPUT_BUTTON_USE(s) | (1 << 7) * PHYS_INPUT_BUTTON_BACKWARD(s) | (1 << 8) * PHYS_INPUT_BUTTON_FORWARD(s) | (1 << 9) * PHYS_INPUT_BUTTON_LEFT(s) | (1 << 10) * PHYS_INPUT_BUTTON_RIGHT(s) )
#define IS_JUMP_HELD(s) (!((s).flags & FL_JUMPRELEASED))
#define SET_JUMP_HELD(s) ((s).flags &= ~FL_JUMPRELEASED)
void PlayerStats_GameReport_Accuracy(entity p)
{
- #define ACCMAC(suffix, field) \
- PlayerStats_GameReport_Event_Player(p, \
- sprintf("acc-%s-%s", it.netname, suffix), CS(p).accuracy.(field[i-1]));
+ #define ACCMAC(suffix, field) PlayerStats_GameReport_Event_Player(p, sprintf("acc-%s-%s", it.netname, suffix), CS(p).accuracy.(field[i-1]));
FOREACH(Weapons, it != WEP_Null, {
ACCMAC("hit", accuracy_hit)
ACCMAC("fired", accuracy_fired)
#define Sounds_from(i) _Sounds_from(i, SND_Null)
REGISTER_REGISTRY(Sounds)
-#define SOUND(name, path) \
- string SND_##name##_get() { return path; } \
- REGISTER(Sounds, SND, name, m_id, NEW(Sound, SND_##name##_get))
+#define SOUND(name, path) string SND_##name##_get() { return path; } REGISTER(Sounds, SND, name, m_id, NEW(Sound, SND_##name##_get))
/** @deprecated Used in places where a string is required for legacy reasons, prefer using SND_id constants instead */
#define SND(id) Sound_fixpath(SND_##id)
// Play all sounds via sound7, for access to the extra channels.
// Otherwise, channels 8 to 15 would be blocked for a weird QW feature.
#ifdef SVQC
- #define _sound(e, c, s, v, a) \
- MACRO_BEGIN \
- entity __e = e; \
- if (sound_allowed(MSG_BROADCAST, __e)) \
- sound7(__e, c, s, v, a, 0, 0); \
- MACRO_END
+ #define _sound(e, c, s, v, a) MACRO_BEGIN entity __e = e; if (sound_allowed(MSG_BROADCAST, __e)) sound7(__e, c, s, v, a, 0, 0); MACRO_END
#else
#define _sound(e, c, s, v, a) sound7(e, c, s, v, a, 0, 0)
#endif
* @param speed
* @param sf
*/
-#define sound8(e, o, chan, samp, vol, atten, speed, sf) \
- MACRO_BEGIN \
- entity __e; \
- int __chan = chan; \
- string __samp = samp; \
- bool auto = false; \
- if (__chan > 0) __e = e; \
- else \
- { \
- auto = true; \
- __chan = fabs(__chan); \
- entity tmp = __e = new(csqc_autochannel); \
- setthink(tmp, SUB_Remove); \
- tmp.nextthink = time + soundlength(__samp); \
- } \
- vector old_origin = __e.origin; \
- vector old_mins = __e.mins; \
- vector old_maxs = __e.maxs; \
- setorigin(__e, o); \
- setsize(__e, '0 0 0', '0 0 0'); \
- sound7(__e, __chan, __samp, vol, atten, speed, sf); \
- if (!auto) \
- { \
- setorigin(__e, old_origin); \
- setsize(__e, old_mins, old_maxs); \
- } \
- MACRO_END
+#define sound8(e, o, chan, samp, vol, atten, speed, sf) MACRO_BEGIN entity __e; int __chan = chan; string __samp = samp; bool auto = false; if (__chan > 0) __e = e; else { auto = true; __chan = fabs(__chan); entity tmp = __e = new(csqc_autochannel); setthink(tmp, SUB_Remove); tmp.nextthink = time + soundlength(__samp); } vector old_origin = __e.origin; vector old_mins = __e.mins; vector old_maxs = __e.maxs; setorigin(__e, o); setsize(__e, '0 0 0', '0 0 0'); sound7(__e, __chan, __samp, vol, atten, speed, sf); if (!auto) { setorigin(__e, old_origin); setsize(__e, old_mins, old_maxs); } MACRO_END
string _Sound_fixpath(string base)
{
#ifdef SVQC
return strcat(base, ".wav"); // let the client engine decide
#else
-#define extensions(x) \
- x(wav) \
- x(ogg) \
- x(flac) \
- /**/
-#define tryext(ext) { \
- string s = strcat(base, "." #ext); \
- if (fexists(strcat("sound/", s))) { \
- return s; \
- } \
- }
+#define extensions(x) x(wav) x(ogg) x(flac) /**/
+#define tryext(ext) { string s = strcat(base, "." #ext); if (fexists(strcat("sound/", s))) { return s; } }
extensions(tryext);
LOG_WARNF("Missing sound: \"%s\"", strcat("sound/", base));
#undef tryext
entity _Sound_fixpath_this;
string _Sound_fixpath_cached;
-#define Sound_fixpath(this) ( \
- _Sound_fixpath_this = (this), \
- _Sound_fixpath_cached = _Sound_fixpath_this.sound_str_, \
- _Sound_fixpath_cached ? _Sound_fixpath_cached : _Sound_fixpath(_Sound_fixpath_this.sound_str()) \
-)
+#define Sound_fixpath(this) ( _Sound_fixpath_this = (this), _Sound_fixpath_cached = _Sound_fixpath_this.sound_str_, _Sound_fixpath_cached ? _Sound_fixpath_cached : _Sound_fixpath(_Sound_fixpath_this.sound_str()) )
string _fn2 = substring(_fn, 0 , strlen(_fn) -4);
this.item_simple = true;
- #define extensions(x) \
- x(md3) \
- x(dpm) \
- x(iqm) \
- x(mdl) \
- /**/
- #define tryext(ext) { \
- string s = strcat(_fn2, autocvar_cl_simpleitems_postfix, "." #ext); \
- string cached = HM_gets(ENT_CLIENT_ITEM_simple, s); \
- if (cached == "") { \
- HM_sets(ENT_CLIENT_ITEM_simple, s, cached = fexists(s) ? "1" : "0"); \
- } \
- if (cached != "0") { \
- strcpy(this.mdl, s); \
- break; \
- } \
- }
+ #define extensions(x) x(md3) x(dpm) x(iqm) x(mdl) /**/
+ #define tryext(ext) { string s = strcat(_fn2, autocvar_cl_simpleitems_postfix, "." #ext); string cached = HM_gets(ENT_CLIENT_ITEM_simple, s); if (cached == "") { HM_sets(ENT_CLIENT_ITEM_simple, s, cached = fexists(s) ? "1" : "0"); } if (cached != "0") { strcpy(this.mdl, s); break; } }
do {
extensions(tryext);
this.item_simple = false;
ATTRIB(Turret, spawnflags, int, 0);
/** turret hitbox size */
- ATTRIB(Turret, m_mins, vector, '-0 -0 -0');
+ ATTRIB(Turret, m_mins, vector, '0 0 0');
/** turret hitbox size */
ATTRIB(Turret, m_maxs, vector, '0 0 0');
float vehicles_exit_running;
// macros
-#define VEHICLE_UPDATE_PLAYER(ply,vehi,fld,vhname) \
- ply.vehicle_##fld = (vehi.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100
+#define VEHICLE_UPDATE_PLAYER(ply,vehi,fld,vhname) ply.vehicle_##fld = (vehi.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100
-#define VEHICLE_UPDATE_PLAYER_RESOURCE(ply,vehi,fld,vhname,res) \
- ply.vehicle_##fld = (GetResource(vehi, res) / autocvar_g_vehicle_##vhname##_##fld) * 100
+#define VEHICLE_UPDATE_PLAYER_RESOURCE(ply,vehi,fld,vhname,res) ply.vehicle_##fld = (GetResource(vehi, res) / autocvar_g_vehicle_##vhname##_##fld) * 100
.float vehicle_enter_delay; // prevent players jumping to and from vehicles instantly
/** */
ATTRIB(Vehicle, spawnflags, int, 0);
/** vehicle hitbox size */
- ATTRIB(Vehicle, m_mins, vector, '-0 -0 -0');
+ ATTRIB(Vehicle, m_mins, vector, '0 0 0');
/** vehicle hitbox size */
ATTRIB(Vehicle, m_maxs, vector, '0 0 0');
/** vehicle 3rd person view offset */
#define EVAL_REGISTER_WEAPON(...) __VA_ARGS__
#define REGISTER_WEAPON_2(id, inst) REGISTER(Weapons, WEP, id, m_id, inst)
/** TODO: deprecated - remove */
-#define REGISTER_WEAPON_3(id, sname, inst) \
- REGISTER_WEAPON_2(id, inst); \
- [[alias("WEP_" #id)]] Weapon _wep_##sname
+#define REGISTER_WEAPON_3(id, sname, inst) REGISTER_WEAPON_2(id, inst); [[alias("WEP_" #id)]] Weapon _wep_##sname
REGISTER_WEAPON(Null, NEW(Weapon));
-#define W_PROPS(L, class, prefix) \
- L(W_PROP_BEGIN, W_PROP, W_PROP_END, class, prefix) \
- L(W_CONFIG_BEGIN, W_CONFIG, W_CONFIG_END, class, prefix) \
- L(W_UPDATE_BEGIN, W_UPDATE, W_UPDATE_END, class, prefix) \
- L(W_NET_BEGIN, W_NET, W_NET_END, class, prefix) \
- /**/ \
-
+#define W_PROPS(L, class, prefix) L(W_PROP_BEGIN, W_PROP, W_PROP_END, class, prefix) L(W_CONFIG_BEGIN, W_CONFIG, W_CONFIG_END, class, prefix) L(W_UPDATE_BEGIN, W_UPDATE, W_UPDATE_END, class, prefix) L(W_NET_BEGIN, W_NET, W_NET_END, class, prefix) /**/
#define W_PROP(class, wepname, fld, T, m) W_PROP_##m(class, fld, T, wepname)
#define W_PROP_NONE(class, fld, T, wepname) _W_PROP(class, fld, T, wepname)
#define W_PROP_PRI(class, fld, T, wepname) _W_PROP(class, primary_##fld, T, wepname)
#define W_PROP_SEC(class, fld, T, wepname) _W_PROP(class, secondary_##fld, T, wepname)
- #define W_PROP_BOTH(class, fld, T, wepname) \
- W_PROP_PRI(class, fld, T, wepname) \
- W_PROP_SEC(class, fld, T, wepname)
+ #define W_PROP_BOTH(class, fld, T, wepname) W_PROP_PRI(class, fld, T, wepname) W_PROP_SEC(class, fld, T, wepname)
#define W_PROP_BEGIN(class)
- #define _W_PROP(class, fld, T, wepname) \
- /* static */ T _W_PROP_CVAR(wepname, fld); \
- ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
+ #define _W_PROP(class, fld, T, wepname) /* static */ T _W_PROP_CVAR(wepname, fld); ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
#define _W_PROP_CVAR(wepname, fld) autocvar_g_balance_##wepname##_##fld
#define W_PROP_END()
#define W_CONFIG_NONE(class, fld, T, wepname) _W_CONFIG(class, fld, T, wepname)
#define W_CONFIG_PRI(class, fld, T, wepname) _W_CONFIG(class, primary_##fld, T, wepname)
#define W_CONFIG_SEC(class, fld, T, wepname) _W_CONFIG(class, secondary_##fld, T, wepname)
- #define W_CONFIG_BOTH(class, fld, T, wepname) \
- W_CONFIG_PRI(class, fld, T, wepname) \
- W_CONFIG_SEC(class, fld, T, wepname)
+ #define W_CONFIG_BOTH(class, fld, T, wepname) W_CONFIG_PRI(class, fld, T, wepname) W_CONFIG_SEC(class, fld, T, wepname)
#define W_CONFIG_BEGIN(class) METHOD(class, wr_config, void(class this)) {
#ifdef SVQC
#define _W_CONFIG(class, fld, T, wepname) if (#wepname == this.netname) WEP_CONFIG_WRITE_CVARS(wepname, fld, T);
#define W_UPDATE_NONE(class, fld, T, wepname) _W_UPDATE(class, fld, T, wepname)
#define W_UPDATE_PRI(class, fld, T, wepname) _W_UPDATE(class, primary_##fld, T, wepname)
#define W_UPDATE_SEC(class, fld, T, wepname) _W_UPDATE(class, secondary_##fld, T, wepname)
- #define W_UPDATE_BOTH(class, fld, T, wepname) \
- W_UPDATE_PRI(class, fld, T, wepname) \
- W_UPDATE_SEC(class, fld, T, wepname)
+ #define W_UPDATE_BOTH(class, fld, T, wepname) W_UPDATE_PRI(class, fld, T, wepname) W_UPDATE_SEC(class, fld, T, wepname)
.entity baseline, baseline_target;
- #define W_UPDATE_BEGIN(class) \
- METHOD(class, wr_update, void(class this)) \
- { \
- noref entity b = this.baseline; \
- if (!b) \
- { \
- b = this.baseline = new_pure(baseline); \
- b.baseline_target = this; \
- }
+ #define W_UPDATE_BEGIN(class) METHOD(class, wr_update, void(class this)) { noref entity b = this.baseline; if (!b) { b = this.baseline = new_pure(baseline); b.baseline_target = this; }
#ifdef SVQC
- #define _W_UPDATE(class, fld, T, wepname) \
- { \
- T it = _W_PROP_CVAR(wepname, fld); \
- b.wepvar_##fld = this.wepvar_##fld; \
- this.wepvar_##fld = it; \
- }
+ #define _W_UPDATE(class, fld, T, wepname) { T it = _W_PROP_CVAR(wepname, fld); b.wepvar_##fld = this.wepvar_##fld; this.wepvar_##fld = it; }
#else
#define _W_UPDATE(class, fld, T, wepname)
#endif
#define W_NET_NONE(class, fld, T, wepname) _W_NET(class, fld, T, wepname)
#define W_NET_PRI(class, fld, T, wepname) _W_NET(class, primary_##fld, T, wepname)
#define W_NET_SEC(class, fld, T, wepname) _W_NET(class, secondary_##fld, T, wepname)
- #define W_NET_BOTH(class, fld, T, wepname) \
- W_NET_PRI(class, fld, T, wepname) \
- W_NET_SEC(class, fld, T, wepname)
+ #define W_NET_BOTH(class, fld, T, wepname) W_NET_PRI(class, fld, T, wepname) W_NET_SEC(class, fld, T, wepname)
REGISTER_NET_TEMP(WeaponUpdate)
#if defined(CSQC)
#define W_NET_BEGIN(class) METHOD(class, wr_net, void(class this, int i)) { int n = 0;
- #define _W_NET(class, fld, T, wepname) \
- { \
- if (++n == i) this.wepvar_##fld = Read_##T(); \
- }
+ #define _W_NET(class, fld, T, wepname) { if (++n == i) this.wepvar_##fld = Read_##T(); }
.void(Weapon this, int i) wr_net;
NET_HANDLE(WeaponUpdate, bool isnew)
{
}
#define W_NET_END() }
#elif defined(SVQC)
- #define W_NET_BEGIN(class) \
- METHOD(class, wr_net, void(class this, int chan)) \
- { \
- bool commit = false; \
- int i = 0;
- #define _W_NET(class, fld, T, wepname) \
- { \
- ++i; \
- T it = this.wepvar_##fld; \
- if (chan == MSG_ONE || it != this.baseline.wepvar_##fld) \
- { \
- if (!commit) { commit = true; WriteHeader(chan, WeaponUpdate); WriteByte(chan, this.m_id); } \
- WriteByte(chan, i); Write_##T(chan, it); \
- } \
- }
- #define W_NET_END() \
- if (commit) WriteByte(chan, 0); \
- }
+ #define W_NET_BEGIN(class) METHOD(class, wr_net, void(class this, int chan)) { bool commit = false; int i = 0;
+ #define _W_NET(class, fld, T, wepname) { ++i; T it = this.wepvar_##fld; if (chan == MSG_ONE || it != this.baseline.wepvar_##fld) { if (!commit) { commit = true; WriteHeader(chan, WeaponUpdate); WriteByte(chan, this.m_id); } WriteByte(chan, i); Write_##T(chan, it); } }
+ #define W_NET_END() if (commit) WriteByte(chan, 0); }
#else
#define W_NET_BEGIN(class)
#define _W_NET(class, fld, T, wepname)
bool wep_config_alsoprint;
int WEP_CONFIG_COUNT;
-#define WEP_CONFIG_QUEUE(a) { \
- config_queue[WEP_CONFIG_COUNT] = a; \
- ++WEP_CONFIG_COUNT; }
+#define WEP_CONFIG_QUEUE(a) { config_queue[WEP_CONFIG_COUNT] = a; ++WEP_CONFIG_COUNT; }
#define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)
-#define WEP_CONFIG_WRITE_PROPS_string(wepname, name) \
- { WEP_CONFIG_QUEUE( \
- sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, \
- cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))) }
+#define WEP_CONFIG_WRITE_PROPS_string(wepname, name) { WEP_CONFIG_QUEUE( sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))) }
-#define WEP_CONFIG_WRITE_PROPS_float(wepname, name) \
- { WEP_CONFIG_QUEUE( \
- sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
- cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
+#define WEP_CONFIG_WRITE_PROPS_float(wepname, name) { WEP_CONFIG_QUEUE( sprintf("set g_balance_%s_%s %g\n", #wepname, #name, cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
#endif
#ifdef SVQC
void weapon_defaultspawnfunc(entity this, Weapon e);
-#define SPAWNFUNC_WEAPON(name, weapon) \
- spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
+#define SPAWNFUNC_WEAPON(name, weapon) spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
#else
/* refname */ ATTRIB(Arc, netname, string, "arc");
/* wepname */ ATTRIB(Arc, m_name, string, _("Arc"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, bolt, float, NONE) \
- P(class, prefix, bolt_ammo, float, NONE) \
- P(class, prefix, bolt_damageforcescale, float, NONE) \
- P(class, prefix, bolt_damage, float, NONE) \
- P(class, prefix, bolt_edgedamage, float, NONE) \
- P(class, prefix, bolt_force, float, NONE) \
- P(class, prefix, bolt_health, float, NONE) \
- P(class, prefix, bolt_lifetime, float, NONE) \
- P(class, prefix, bolt_radius, float, NONE) \
- P(class, prefix, bolt_refire, float, NONE) \
- P(class, prefix, bolt_speed, float, NONE) \
- P(class, prefix, bolt_spread, float, NONE) \
- P(class, prefix, beam_ammo, float, NONE) \
- P(class, prefix, beam_animtime, float, NONE) \
- P(class, prefix, beam_botaimlifetime, float, NONE) \
- P(class, prefix, beam_botaimspeed, float, NONE) \
- P(class, prefix, beam_damage, float, NONE) \
- P(class, prefix, beam_degreespersegment, float, NONE) \
- P(class, prefix, beam_distancepersegment, float, NONE) \
- P(class, prefix, beam_falloff_halflifedist, float, NONE) \
- P(class, prefix, beam_falloff_maxdist, float, NONE) \
- P(class, prefix, beam_falloff_mindist, float, NONE) \
- P(class, prefix, beam_force, float, NONE) \
- P(class, prefix, beam_healing_amax, float, NONE) \
- P(class, prefix, beam_healing_aps, float, NONE) \
- P(class, prefix, beam_healing_hmax, float, NONE) \
- P(class, prefix, beam_healing_hps, float, NONE) \
- P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ \
- P(class, prefix, beam_maxangle, float, NONE) \
- P(class, prefix, beam_nonplayerdamage, float, NONE) \
- P(class, prefix, beam_range, float, NONE) \
- P(class, prefix, beam_refire, float, NONE) \
- P(class, prefix, beam_returnspeed, float, NONE) \
- P(class, prefix, beam_tightness, float, NONE) \
- P(class, prefix, burst_ammo, float, NONE) \
- P(class, prefix, burst_damage, float, NONE) \
- P(class, prefix, burst_healing_aps, float, NONE) \
- P(class, prefix, burst_healing_hps, float, NONE) \
- P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ \
- P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ \
- P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ \
- P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ \
- P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, bolt, float, NONE) P(class, prefix, bolt_ammo, float, NONE) P(class, prefix, bolt_damageforcescale, float, NONE) P(class, prefix, bolt_damage, float, NONE) P(class, prefix, bolt_edgedamage, float, NONE) P(class, prefix, bolt_force, float, NONE) P(class, prefix, bolt_health, float, NONE) P(class, prefix, bolt_lifetime, float, NONE) P(class, prefix, bolt_radius, float, NONE) P(class, prefix, bolt_refire, float, NONE) P(class, prefix, bolt_speed, float, NONE) P(class, prefix, bolt_spread, float, NONE) P(class, prefix, beam_ammo, float, NONE) P(class, prefix, beam_animtime, float, NONE) P(class, prefix, beam_botaimlifetime, float, NONE) P(class, prefix, beam_botaimspeed, float, NONE) P(class, prefix, beam_damage, float, NONE) P(class, prefix, beam_degreespersegment, float, NONE) P(class, prefix, beam_distancepersegment, float, NONE) P(class, prefix, beam_falloff_halflifedist, float, NONE) P(class, prefix, beam_falloff_maxdist, float, NONE) P(class, prefix, beam_falloff_mindist, float, NONE) P(class, prefix, beam_force, float, NONE) P(class, prefix, beam_healing_amax, float, NONE) P(class, prefix, beam_healing_aps, float, NONE) P(class, prefix, beam_healing_hmax, float, NONE) P(class, prefix, beam_healing_hps, float, NONE) P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ P(class, prefix, beam_maxangle, float, NONE) P(class, prefix, beam_nonplayerdamage, float, NONE) P(class, prefix, beam_range, float, NONE) P(class, prefix, beam_refire, float, NONE) P(class, prefix, beam_returnspeed, float, NONE) P(class, prefix, beam_tightness, float, NONE) P(class, prefix, burst_ammo, float, NONE) P(class, prefix, burst_damage, float, NONE) P(class, prefix, burst_healing_aps, float, NONE) P(class, prefix, burst_healing_hps, float, NONE) P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Arc, arc)
#undef X
/* refname */ ATTRIB(Blaster, netname, string, "blaster");
/* wepname */ ATTRIB(Blaster, m_name, string, _("Blaster"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, delay, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, force_zscale, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shotangle, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, animtime, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, delay, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, force_zscale, float, BOTH) P(class, prefix, lifetime, float, BOTH) P(class, prefix, radius, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, secondary, float, NONE) P(class, prefix, shotangle, float, BOTH) P(class, prefix, speed, float, BOTH) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Blaster, blaster)
#undef X
.float blaster_lifetime;
// Will be demacroed after WEP_CVAR macros are also demacroed.
-#define BLASTER_SECONDARY_ATTACK(weapon_name, actor, weaponentity) \
- makevectors(actor.v_angle); \
- W_Blaster_Attack( \
- actor, \
- weaponentity, \
- WEP_BLASTER.m_id | HITTYPE_SECONDARY, \
- WEP_CVAR_SEC(weapon_name, shotangle), \
- WEP_CVAR_SEC(weapon_name, damage), \
- WEP_CVAR_SEC(weapon_name, edgedamage), \
- WEP_CVAR_SEC(weapon_name, radius), \
- WEP_CVAR_SEC(weapon_name, force), \
- WEP_CVAR_SEC(weapon_name, speed), \
- WEP_CVAR_SEC(weapon_name, spread), \
- WEP_CVAR_SEC(weapon_name, delay), \
- WEP_CVAR_SEC(weapon_name, lifetime) \
- );
+#define BLASTER_SECONDARY_ATTACK(weapon_name, actor, weaponentity) makevectors(actor.v_angle); W_Blaster_Attack( actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(weapon_name, shotangle), WEP_CVAR_SEC(weapon_name, damage), WEP_CVAR_SEC(weapon_name, edgedamage), WEP_CVAR_SEC(weapon_name, radius), WEP_CVAR_SEC(weapon_name, force), WEP_CVAR_SEC(weapon_name, speed), WEP_CVAR_SEC(weapon_name, spread), WEP_CVAR_SEC(weapon_name, delay), WEP_CVAR_SEC(weapon_name, lifetime) );
#endif
/* refname */ ATTRIB(Crylink, netname, string, "crylink");
/* wepname */ ATTRIB(Crylink, m_name, string, _("Crylink"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncedamagefactor, float, BOTH) \
- P(class, prefix, bounces, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, joindelay, float, BOTH) \
- P(class, prefix, joinexplode, float, BOTH) \
- P(class, prefix, joinexplode_damage, float, BOTH) \
- P(class, prefix, joinexplode_edgedamage, float, BOTH) \
- P(class, prefix, joinexplode_force, float, BOTH) \
- P(class, prefix, joinexplode_radius, float, BOTH) \
- P(class, prefix, joinspread, float, BOTH) \
- P(class, prefix, linkexplode, float, BOTH) \
- P(class, prefix, middle_fadetime, float, BOTH) \
- P(class, prefix, middle_lifetime, float, BOTH) \
- P(class, prefix, other_fadetime, float, BOTH) \
- P(class, prefix, other_lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spreadtype, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, bouncedamagefactor, float, BOTH) P(class, prefix, bounces, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, joindelay, float, BOTH) P(class, prefix, joinexplode, float, BOTH) P(class, prefix, joinexplode_damage, float, BOTH) P(class, prefix, joinexplode_edgedamage, float, BOTH) P(class, prefix, joinexplode_force, float, BOTH) P(class, prefix, joinexplode_radius, float, BOTH) P(class, prefix, joinspread, float, BOTH) P(class, prefix, linkexplode, float, BOTH) P(class, prefix, middle_fadetime, float, BOTH) P(class, prefix, middle_lifetime, float, BOTH) P(class, prefix, other_fadetime, float, BOTH) P(class, prefix, other_lifetime, float, BOTH) P(class, prefix, radius, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, secondary, float, NONE) P(class, prefix, shots, float, BOTH) P(class, prefix, speed, float, BOTH) P(class, prefix, spreadtype, float, SEC) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Crylink, crylink)
#undef X
/* refname */ ATTRIB(Devastator, netname, string, "devastator");
/* wepname */ ATTRIB(Devastator, m_name, string, _("Devastator"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, NONE) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, damageforcescale, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, detonatedelay, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, guidedelay, float, NONE) \
- P(class, prefix, guidegoal, float, NONE) \
- P(class, prefix, guideratedelay, float, NONE) \
- P(class, prefix, guiderate, float, NONE) \
- P(class, prefix, guidestop, float, NONE) \
- P(class, prefix, health, float, NONE) \
- P(class, prefix, lifetime, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_damage, float, NONE) \
- P(class, prefix, remote_edgedamage, float, NONE) \
- P(class, prefix, remote_force, float, NONE) \
- P(class, prefix, remote_jump_damage, float, NONE) \
- P(class, prefix, remote_jump_force, float, NONE) \
- P(class, prefix, remote_jump_radius, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
- P(class, prefix, remote_radius, float, NONE) \
- P(class, prefix, speedaccel, float, NONE) \
- P(class, prefix, speedstart, float, NONE) \
- P(class, prefix, speed, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, NONE) P(class, prefix, animtime, float, NONE) P(class, prefix, damageforcescale, float, NONE) P(class, prefix, damage, float, NONE) P(class, prefix, detonatedelay, float, NONE) P(class, prefix, edgedamage, float, NONE) P(class, prefix, force, float, NONE) P(class, prefix, guidedelay, float, NONE) P(class, prefix, guidegoal, float, NONE) P(class, prefix, guideratedelay, float, NONE) P(class, prefix, guiderate, float, NONE) P(class, prefix, guidestop, float, NONE) P(class, prefix, health, float, NONE) P(class, prefix, lifetime, float, NONE) P(class, prefix, radius, float, NONE) P(class, prefix, refire, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, remote_damage, float, NONE) P(class, prefix, remote_edgedamage, float, NONE) P(class, prefix, remote_force, float, NONE) P(class, prefix, remote_jump_damage, float, NONE) P(class, prefix, remote_jump_force, float, NONE) P(class, prefix, remote_jump_radius, float, NONE) P(class, prefix, remote_jump_velocity_z_add, float, NONE) P(class, prefix, remote_jump_velocity_z_max, float, NONE) P(class, prefix, remote_jump_velocity_z_min, float, NONE) P(class, prefix, remote_radius, float, NONE) P(class, prefix, speedaccel, float, NONE) P(class, prefix, speedstart, float, NONE) P(class, prefix, speed, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Devastator, devastator)
#undef X
/* refname */ ATTRIB(Electro, netname, string, "electro");
/* wepname */ ATTRIB(Electro, m_name, string, _("Electro"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncefactor, float, SEC) \
- P(class, prefix, bouncestop, float, SEC) \
- P(class, prefix, comboradius, float, PRI) \
- P(class, prefix, combo_comboradius, float, NONE) \
- P(class, prefix, combo_comboradius_thruwall, float, NONE) \
- P(class, prefix, combo_damage, float, NONE) \
- P(class, prefix, combo_edgedamage, float, NONE) \
- P(class, prefix, combo_force, float, NONE) \
- P(class, prefix, combo_radius, float, NONE) \
- P(class, prefix, combo_safeammocheck, float, NONE) \
- P(class, prefix, combo_speed, float, NONE) \
- P(class, prefix, count, float, SEC) \
- P(class, prefix, damagedbycontents, float, SEC) \
- P(class, prefix, damageforcescale, float, SEC) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, SEC) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, midaircombo_explode, float, PRI) \
- P(class, prefix, midaircombo_interval, float, PRI) \
- P(class, prefix, midaircombo_radius, float, PRI) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire2, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, SEC) \
- P(class, prefix, speed_z, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, stick, float, SEC) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, touchexplode, float, SEC) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, bouncefactor, float, SEC) P(class, prefix, bouncestop, float, SEC) P(class, prefix, comboradius, float, PRI) P(class, prefix, combo_comboradius, float, NONE) P(class, prefix, combo_comboradius_thruwall, float, NONE) P(class, prefix, combo_damage, float, NONE) P(class, prefix, combo_edgedamage, float, NONE) P(class, prefix, combo_force, float, NONE) P(class, prefix, combo_radius, float, NONE) P(class, prefix, combo_safeammocheck, float, NONE) P(class, prefix, combo_speed, float, NONE) P(class, prefix, count, float, SEC) P(class, prefix, damagedbycontents, float, SEC) P(class, prefix, damageforcescale, float, SEC) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, health, float, SEC) P(class, prefix, lifetime, float, BOTH) P(class, prefix, midaircombo_explode, float, PRI) P(class, prefix, midaircombo_interval, float, PRI) P(class, prefix, midaircombo_radius, float, PRI) P(class, prefix, radius, float, BOTH) P(class, prefix, refire2, float, SEC) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, speed, float, BOTH) P(class, prefix, speed_up, float, SEC) P(class, prefix, speed_z, float, SEC) P(class, prefix, spread, float, BOTH) P(class, prefix, stick, float, SEC) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, touchexplode, float, SEC) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Electro, electro)
#undef X
void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
- W_Fireball_AttackEffect(actor, weaponentity, 0, '+1.25 +3.75 0');
+ W_Fireball_AttackEffect(actor, weaponentity, 0, '1.25 3.75 0');
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame4);
}
void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
- W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 +3.75 0');
+ W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 3.75 0');
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame3);
}
void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
- W_Fireball_AttackEffect(actor, weaponentity, 1, '+1.25 -3.75 0');
+ W_Fireball_AttackEffect(actor, weaponentity, 1, '1.25 -3.75 0');
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame2);
}
f_diff = '-1.25 -3.75 0';
break;
case 1:
- f_diff = '+1.25 -3.75 0';
+ f_diff = '1.25 -3.75 0';
break;
case 2:
- f_diff = '-1.25 +3.75 0';
+ f_diff = '-1.25 3.75 0';
break;
case 3:
default:
- f_diff = '+1.25 +3.75 0';
+ f_diff = '1.25 3.75 0';
break;
}
W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_FIREBALL_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage), WEP_FIREBALL.m_id | HITTYPE_SECONDARY);
/* refname */ ATTRIB(Fireball, netname, string, "fireball");
/* wepname */ ATTRIB(Fireball, m_name, string, _("Fireball"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bfgdamage, float, PRI) \
- P(class, prefix, bfgforce, float, PRI) \
- P(class, prefix, bfgradius, float, PRI) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damagetime, float, SEC) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, health, float, PRI) \
- P(class, prefix, laserburntime, float, BOTH) \
- P(class, prefix, laserdamage, float, BOTH) \
- P(class, prefix, laseredgedamage, float, BOTH) \
- P(class, prefix, laserradius, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, PRI) \
- P(class, prefix, refire2, float, PRI) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, SEC) \
- P(class, prefix, speed_z, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, animtime, float, BOTH) P(class, prefix, bfgdamage, float, PRI) P(class, prefix, bfgforce, float, PRI) P(class, prefix, bfgradius, float, PRI) P(class, prefix, damageforcescale, float, BOTH) P(class, prefix, damagetime, float, SEC) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, health, float, PRI) P(class, prefix, laserburntime, float, BOTH) P(class, prefix, laserdamage, float, BOTH) P(class, prefix, laseredgedamage, float, BOTH) P(class, prefix, laserradius, float, BOTH) P(class, prefix, lifetime, float, BOTH) P(class, prefix, radius, float, PRI) P(class, prefix, refire2, float, PRI) P(class, prefix, refire, float, BOTH) P(class, prefix, speed, float, BOTH) P(class, prefix, speed_up, float, SEC) P(class, prefix, speed_z, float, SEC) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Fireball, fireball)
#undef X
/* refname */ ATTRIB(Hagar, netname, string, "hagar");
/* wepname */ ATTRIB(Hagar, m_name, string, _("Hagar"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, BOTH) \
- P(class, prefix, lifetime, float, PRI) \
- P(class, prefix, lifetime_min, float, SEC) \
- P(class, prefix, lifetime_rand, float, SEC) \
- P(class, prefix, load, float, SEC) \
- P(class, prefix, load_abort, float, SEC) \
- P(class, prefix, load_animtime, float, SEC) \
- P(class, prefix, load_hold, float, SEC) \
- P(class, prefix, load_linkexplode, float, SEC) \
- P(class, prefix, load_max, float, SEC) \
- P(class, prefix, load_releasedeath, float, SEC) \
- P(class, prefix, load_speed, float, SEC) \
- P(class, prefix, load_spread, float, SEC) \
- P(class, prefix, load_spread_bias, float, SEC) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, damageforcescale, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, health, float, BOTH) P(class, prefix, lifetime, float, PRI) P(class, prefix, lifetime_min, float, SEC) P(class, prefix, lifetime_rand, float, SEC) P(class, prefix, load, float, SEC) P(class, prefix, load_abort, float, SEC) P(class, prefix, load_animtime, float, SEC) P(class, prefix, load_hold, float, SEC) P(class, prefix, load_linkexplode, float, SEC) P(class, prefix, load_max, float, SEC) P(class, prefix, load_releasedeath, float, SEC) P(class, prefix, load_speed, float, SEC) P(class, prefix, load_spread, float, SEC) P(class, prefix, load_spread_bias, float, SEC) P(class, prefix, radius, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, secondary, float, NONE) P(class, prefix, speed, float, BOTH) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Hagar, hagar)
#undef X
/* refname */ ATTRIB(HLAC, netname, string, "hlac");
/* wepname */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, SEC) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, spread_add, float, PRI) \
- P(class, prefix, spread_crouchmod, float, BOTH) \
- P(class, prefix, spread_max, float, PRI) \
- P(class, prefix, spread_min, float, PRI) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, lifetime, float, BOTH) P(class, prefix, radius, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, secondary, float, NONE) P(class, prefix, shots, float, SEC) P(class, prefix, speed, float, BOTH) P(class, prefix, spread, float, SEC) P(class, prefix, spread_add, float, PRI) P(class, prefix, spread_crouchmod, float, BOTH) P(class, prefix, spread_max, float, PRI) P(class, prefix, spread_min, float, PRI) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, HLAC, hlac)
#undef X
/* wepname */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
ATTRIB(Hook, ammo_factor, float, 1);
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damageforcescale, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, duration, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, gravity, float, SEC) \
- P(class, prefix, health, float, SEC) \
- P(class, prefix, hooked_ammo, float, PRI) \
- P(class, prefix, hooked_time_free, float, PRI) \
- P(class, prefix, hooked_time_max, float, PRI) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, power, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, BOTH) P(class, prefix, damageforcescale, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, duration, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, gravity, float, SEC) P(class, prefix, health, float, SEC) P(class, prefix, hooked_ammo, float, PRI) P(class, prefix, hooked_time_free, float, PRI) P(class, prefix, hooked_time_max, float, PRI) P(class, prefix, lifetime, float, SEC) P(class, prefix, power, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, BOTH) P(class, prefix, speed, float, SEC) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Hook, hook)
#undef X
/* refname */ ATTRIB(MachineGun, netname, string, "machinegun");
/* wepname */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, burst, float, NONE) \
- P(class, prefix, burst_ammo, float, NONE) \
- P(class, prefix, burst_animtime, float, NONE) \
- P(class, prefix, burst_refire2, float, NONE) \
- P(class, prefix, burst_refire, float, NONE) \
- P(class, prefix, burst_speed, float, NONE) \
- P(class, prefix, first, float, NONE) \
- P(class, prefix, first_ammo, float, NONE) \
- P(class, prefix, first_damage, float, NONE) \
- P(class, prefix, first_force, float, NONE) \
- P(class, prefix, first_refire, float, NONE) \
- P(class, prefix, first_spread, float, NONE) \
- P(class, prefix, mode, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, solidpenetration, float, NONE) \
- P(class, prefix, spread_add, float, NONE) \
- P(class, prefix, spread_max, float, NONE) \
- P(class, prefix, spread_min, float, NONE) \
- P(class, prefix, sustained_ammo, float, NONE) \
- P(class, prefix, sustained_damage, float, NONE) \
- P(class, prefix, sustained_force, float, NONE) \
- P(class, prefix, sustained_refire, float, NONE) \
- P(class, prefix, sustained_spread, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, burst, float, NONE) P(class, prefix, burst_ammo, float, NONE) P(class, prefix, burst_animtime, float, NONE) P(class, prefix, burst_refire2, float, NONE) P(class, prefix, burst_refire, float, NONE) P(class, prefix, burst_speed, float, NONE) P(class, prefix, first, float, NONE) P(class, prefix, first_ammo, float, NONE) P(class, prefix, first_damage, float, NONE) P(class, prefix, first_force, float, NONE) P(class, prefix, first_refire, float, NONE) P(class, prefix, first_spread, float, NONE) P(class, prefix, mode, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, solidpenetration, float, NONE) P(class, prefix, spread_add, float, NONE) P(class, prefix, spread_max, float, NONE) P(class, prefix, spread_min, float, NONE) P(class, prefix, sustained_ammo, float, NONE) P(class, prefix, sustained_damage, float, NONE) P(class, prefix, sustained_force, float, NONE) P(class, prefix, sustained_refire, float, NONE) P(class, prefix, sustained_spread, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, MachineGun, machinegun)
#undef X
/* refname */ ATTRIB(MineLayer, netname, string, "minelayer");
/* wepname */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, NONE) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, damageforcescale, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, detonatedelay, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, health, float, NONE) \
- P(class, prefix, lifetime, float, NONE) \
- P(class, prefix, lifetime_countdown, float, NONE) \
- P(class, prefix, limit, float, NONE) \
- P(class, prefix, protection, float, NONE) \
- P(class, prefix, proximityradius, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_damage, float, NONE) \
- P(class, prefix, remote_edgedamage, float, NONE) \
- P(class, prefix, remote_force, float, NONE) \
- P(class, prefix, remote_radius, float, NONE) \
- P(class, prefix, speed, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, time, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, NONE) P(class, prefix, animtime, float, NONE) P(class, prefix, damageforcescale, float, NONE) P(class, prefix, damage, float, NONE) P(class, prefix, detonatedelay, float, NONE) P(class, prefix, edgedamage, float, NONE) P(class, prefix, force, float, NONE) P(class, prefix, health, float, NONE) P(class, prefix, lifetime, float, NONE) P(class, prefix, lifetime_countdown, float, NONE) P(class, prefix, limit, float, NONE) P(class, prefix, protection, float, NONE) P(class, prefix, proximityradius, float, NONE) P(class, prefix, radius, float, NONE) P(class, prefix, refire, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, remote_damage, float, NONE) P(class, prefix, remote_edgedamage, float, NONE) P(class, prefix, remote_force, float, NONE) P(class, prefix, remote_radius, float, NONE) P(class, prefix, speed, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, time, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, MineLayer, minelayer)
#undef X
ENDCLASS(MineLayer)
/* refname */ ATTRIB(Mortar, netname, string, "mortar");
/* wepname */ ATTRIB(Mortar, m_name, string, _("Mortar"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncefactor, float, NONE) \
- P(class, prefix, bouncestop, float, NONE) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, lifetime_bounce, float, SEC) \
- P(class, prefix, lifetime_stick, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_detonateprimary, float, SEC) \
- P(class, prefix, remote_minbouncecnt, float, PRI) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, BOTH) \
- P(class, prefix, speed_z, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, type, float, BOTH) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, bouncefactor, float, NONE) P(class, prefix, bouncestop, float, NONE) P(class, prefix, damageforcescale, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, edgedamage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, health, float, BOTH) P(class, prefix, lifetime, float, BOTH) P(class, prefix, lifetime_bounce, float, SEC) P(class, prefix, lifetime_stick, float, BOTH) P(class, prefix, radius, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, remote_detonateprimary, float, SEC) P(class, prefix, remote_minbouncecnt, float, PRI) P(class, prefix, speed, float, BOTH) P(class, prefix, speed_up, float, BOTH) P(class, prefix, speed_z, float, BOTH) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, type, float, BOTH) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Mortar, mortar)
#undef X
ENDCLASS(Mortar)
/* refname */ ATTRIB(PortoLaunch, netname, string, "porto");
/* wepname */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, animtime, float, BOTH) P(class, prefix, lifetime, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, secondary, float, NONE) P(class, prefix, speed, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, PortoLaunch, porto)
#undef X
ENDCLASS(PortoLaunch)
/* refname */ ATTRIB(Rifle, netname, string, "rifle");
/* wepname */ ATTRIB(Rifle, m_name, string, _("Rifle"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bullethail, float, BOTH) \
- P(class, prefix, burstcost, float, BOTH) \
- P(class, prefix, bursttime, float, NONE) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, BOTH) \
- P(class, prefix, solidpenetration, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, tracer, float, BOTH) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, bullethail, float, BOTH) P(class, prefix, burstcost, float, BOTH) P(class, prefix, bursttime, float, NONE) P(class, prefix, damage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, reload, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, secondary, float, NONE) P(class, prefix, shots, float, BOTH) P(class, prefix, solidpenetration, float, BOTH) P(class, prefix, spread, float, BOTH) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, tracer, float, BOTH) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Rifle, rifle)
#undef X
ENDCLASS(Rifle)
f_diff = '-1.25 -3.75 0';
break;
case 1:
- f_diff = '+1.25 -3.75 0';
+ f_diff = '1.25 -3.75 0';
break;
case 2:
- f_diff = '-1.25 +3.75 0';
+ f_diff = '-1.25 3.75 0';
break;
case 3:
default:
- f_diff = '+1.25 +3.75 0';
+ f_diff = '1.25 3.75 0';
break;
}
W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), thiswep.m_id | HITTYPE_SECONDARY);
W_Seeker_Fire_Missile(thiswep, own, weaponentity, '-1.25 -3.75 0', own.enemy); // TODO
break;
case 1:
- W_Seeker_Fire_Missile(thiswep, own, weaponentity, '+1.25 -3.75 0', own.enemy); // TODO
+ W_Seeker_Fire_Missile(thiswep, own, weaponentity, '1.25 -3.75 0', own.enemy); // TODO
break;
case 2:
- W_Seeker_Fire_Missile(thiswep, own, weaponentity, '-1.25 +3.75 0', own.enemy); // TODO
+ W_Seeker_Fire_Missile(thiswep, own, weaponentity, '-1.25 3.75 0', own.enemy); // TODO
break;
case 3:
default:
- W_Seeker_Fire_Missile(thiswep, own, weaponentity, '+1.25 +3.75 0', own.enemy); // TODO
+ W_Seeker_Fire_Missile(thiswep, own, weaponentity, '1.25 3.75 0', own.enemy); // TODO
break;
}
/* refname */ ATTRIB(Seeker, netname, string, "seeker");
/* wepname */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, flac_ammo, float, NONE) \
- P(class, prefix, flac_animtime, float, NONE) \
- P(class, prefix, flac_damage, float, NONE) \
- P(class, prefix, flac_edgedamage, float, NONE) \
- P(class, prefix, flac_force, float, NONE) \
- P(class, prefix, flac_lifetime, float, NONE) \
- P(class, prefix, flac_lifetime_rand, float, NONE) \
- P(class, prefix, flac_radius, float, NONE) \
- P(class, prefix, flac_refire, float, NONE) \
- P(class, prefix, flac_speed, float, NONE) \
- P(class, prefix, flac_speed_up, float, NONE) \
- P(class, prefix, flac_speed_z, float, NONE) \
- P(class, prefix, flac_spread, float, NONE) \
- P(class, prefix, missile_accel, float, NONE) \
- P(class, prefix, missile_ammo, float, NONE) \
- P(class, prefix, missile_animtime, float, NONE) \
- P(class, prefix, missile_count, float, NONE) \
- P(class, prefix, missile_damageforcescale, float, NONE) \
- P(class, prefix, missile_damage, float, NONE) \
- P(class, prefix, missile_decel, float, NONE) \
- P(class, prefix, missile_delay, float, NONE) \
- P(class, prefix, missile_edgedamage, float, NONE) \
- P(class, prefix, missile_force, float, NONE) \
- P(class, prefix, missile_health, float, NONE) \
- P(class, prefix, missile_lifetime, float, NONE) \
- P(class, prefix, missile_proxy, float, NONE) \
- P(class, prefix, missile_proxy_delay, float, NONE) \
- P(class, prefix, missile_proxy_maxrange, float, NONE) \
- P(class, prefix, missile_radius, float, NONE) \
- P(class, prefix, missile_refire, float, NONE) \
- P(class, prefix, missile_smart, float, NONE) \
- P(class, prefix, missile_smart_mindist, float, NONE) \
- P(class, prefix, missile_smart_trace_max, float, NONE) \
- P(class, prefix, missile_smart_trace_min, float, NONE) \
- P(class, prefix, missile_speed, float, NONE) \
- P(class, prefix, missile_speed_max, float, NONE) \
- P(class, prefix, missile_speed_up, float, NONE) \
- P(class, prefix, missile_speed_z, float, NONE) \
- P(class, prefix, missile_spread, float, NONE) \
- P(class, prefix, missile_turnrate, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, tag_ammo, float, NONE) \
- P(class, prefix, tag_animtime, float, NONE) \
- P(class, prefix, tag_damageforcescale, float, NONE) \
- P(class, prefix, tag_health, float, NONE) \
- P(class, prefix, tag_lifetime, float, NONE) \
- P(class, prefix, tag_refire, float, NONE) \
- P(class, prefix, tag_speed, float, NONE) \
- P(class, prefix, tag_spread, float, NONE) \
- P(class, prefix, tag_tracker_lifetime, float, NONE) \
- P(class, prefix, type, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, flac_ammo, float, NONE) P(class, prefix, flac_animtime, float, NONE) P(class, prefix, flac_damage, float, NONE) P(class, prefix, flac_edgedamage, float, NONE) P(class, prefix, flac_force, float, NONE) P(class, prefix, flac_lifetime, float, NONE) P(class, prefix, flac_lifetime_rand, float, NONE) P(class, prefix, flac_radius, float, NONE) P(class, prefix, flac_refire, float, NONE) P(class, prefix, flac_speed, float, NONE) P(class, prefix, flac_speed_up, float, NONE) P(class, prefix, flac_speed_z, float, NONE) P(class, prefix, flac_spread, float, NONE) P(class, prefix, missile_accel, float, NONE) P(class, prefix, missile_ammo, float, NONE) P(class, prefix, missile_animtime, float, NONE) P(class, prefix, missile_count, float, NONE) P(class, prefix, missile_damageforcescale, float, NONE) P(class, prefix, missile_damage, float, NONE) P(class, prefix, missile_decel, float, NONE) P(class, prefix, missile_delay, float, NONE) P(class, prefix, missile_edgedamage, float, NONE) P(class, prefix, missile_force, float, NONE) P(class, prefix, missile_health, float, NONE) P(class, prefix, missile_lifetime, float, NONE) P(class, prefix, missile_proxy, float, NONE) P(class, prefix, missile_proxy_delay, float, NONE) P(class, prefix, missile_proxy_maxrange, float, NONE) P(class, prefix, missile_radius, float, NONE) P(class, prefix, missile_refire, float, NONE) P(class, prefix, missile_smart, float, NONE) P(class, prefix, missile_smart_mindist, float, NONE) P(class, prefix, missile_smart_trace_max, float, NONE) P(class, prefix, missile_smart_trace_min, float, NONE) P(class, prefix, missile_speed, float, NONE) P(class, prefix, missile_speed_max, float, NONE) P(class, prefix, missile_speed_up, float, NONE) P(class, prefix, missile_speed_z, float, NONE) P(class, prefix, missile_spread, float, NONE) P(class, prefix, missile_turnrate, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, tag_ammo, float, NONE) P(class, prefix, tag_animtime, float, NONE) P(class, prefix, tag_damageforcescale, float, NONE) P(class, prefix, tag_health, float, NONE) P(class, prefix, tag_lifetime, float, NONE) P(class, prefix, tag_refire, float, NONE) P(class, prefix, tag_speed, float, NONE) P(class, prefix, tag_spread, float, NONE) P(class, prefix, tag_tracker_lifetime, float, NONE) P(class, prefix, type, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Seeker, seeker)
#undef X
ENDCLASS(Seeker)
/* refname */ ATTRIB(Shockwave, netname, string, "shockwave");
/* wepname */ ATTRIB(Shockwave, m_name, string, _("Shockwave"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, blast_animtime, float, NONE) \
- P(class, prefix, blast_damage, float, NONE) \
- P(class, prefix, blast_distance, float, NONE) \
- P(class, prefix, blast_edgedamage, float, NONE) \
- P(class, prefix, blast_force, float, NONE) \
- P(class, prefix, blast_force_forwardbias, float, NONE) \
- P(class, prefix, blast_force_zscale, float, NONE) \
- P(class, prefix, blast_jump_damage, float, NONE) \
- P(class, prefix, blast_jump_edgedamage, float, NONE) \
- P(class, prefix, blast_jump_force, float, NONE) \
- P(class, prefix, blast_jump_force_velocitybias, float, NONE) \
- P(class, prefix, blast_jump_force_zscale, float, NONE) \
- P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_jump_multiplier_distance, float, NONE) \
- P(class, prefix, blast_jump_multiplier_min, float, NONE) \
- P(class, prefix, blast_jump_radius, float, NONE) \
- P(class, prefix, blast_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_multiplier_distance, float, NONE) \
- P(class, prefix, blast_multiplier_min, float, NONE) \
- P(class, prefix, blast_refire, float, NONE) \
- P(class, prefix, blast_splash_damage, float, NONE) \
- P(class, prefix, blast_splash_edgedamage, float, NONE) \
- P(class, prefix, blast_splash_force, float, NONE) \
- P(class, prefix, blast_splash_force_forwardbias, float, NONE) \
- P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_splash_multiplier_distance, float, NONE) \
- P(class, prefix, blast_splash_multiplier_min, float, NONE) \
- P(class, prefix, blast_splash_radius, float, NONE) \
- P(class, prefix, blast_spread_max, float, NONE) \
- P(class, prefix, blast_spread_min, float, NONE) \
- P(class, prefix, melee_animtime, float, NONE) \
- P(class, prefix, melee_damage, float, NONE) \
- P(class, prefix, melee_delay, float, NONE) \
- P(class, prefix, melee_force, float, NONE) \
- P(class, prefix, melee_multihit, float, NONE) \
- P(class, prefix, melee_no_doubleslap, float, NONE) \
- P(class, prefix, melee_nonplayerdamage, float, NONE) \
- P(class, prefix, melee_range, float, NONE) \
- P(class, prefix, melee_refire, float, NONE) \
- P(class, prefix, melee_swing_side, float, NONE) \
- P(class, prefix, melee_swing_up, float, NONE) \
- P(class, prefix, melee_time, float, NONE) \
- P(class, prefix, melee_traces, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, blast_animtime, float, NONE) P(class, prefix, blast_damage, float, NONE) P(class, prefix, blast_distance, float, NONE) P(class, prefix, blast_edgedamage, float, NONE) P(class, prefix, blast_force, float, NONE) P(class, prefix, blast_force_forwardbias, float, NONE) P(class, prefix, blast_force_zscale, float, NONE) P(class, prefix, blast_jump_damage, float, NONE) P(class, prefix, blast_jump_edgedamage, float, NONE) P(class, prefix, blast_jump_force, float, NONE) P(class, prefix, blast_jump_force_velocitybias, float, NONE) P(class, prefix, blast_jump_force_zscale, float, NONE) P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) P(class, prefix, blast_jump_multiplier_distance, float, NONE) P(class, prefix, blast_jump_multiplier_min, float, NONE) P(class, prefix, blast_jump_radius, float, NONE) P(class, prefix, blast_multiplier_accuracy, float, NONE) P(class, prefix, blast_multiplier_distance, float, NONE) P(class, prefix, blast_multiplier_min, float, NONE) P(class, prefix, blast_refire, float, NONE) P(class, prefix, blast_splash_damage, float, NONE) P(class, prefix, blast_splash_edgedamage, float, NONE) P(class, prefix, blast_splash_force, float, NONE) P(class, prefix, blast_splash_force_forwardbias, float, NONE) P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) P(class, prefix, blast_splash_multiplier_distance, float, NONE) P(class, prefix, blast_splash_multiplier_min, float, NONE) P(class, prefix, blast_splash_radius, float, NONE) P(class, prefix, blast_spread_max, float, NONE) P(class, prefix, blast_spread_min, float, NONE) P(class, prefix, melee_animtime, float, NONE) P(class, prefix, melee_damage, float, NONE) P(class, prefix, melee_delay, float, NONE) P(class, prefix, melee_force, float, NONE) P(class, prefix, melee_multihit, float, NONE) P(class, prefix, melee_no_doubleslap, float, NONE) P(class, prefix, melee_nonplayerdamage, float, NONE) P(class, prefix, melee_range, float, NONE) P(class, prefix, melee_refire, float, NONE) P(class, prefix, melee_swing_side, float, NONE) P(class, prefix, melee_swing_up, float, NONE) P(class, prefix, melee_time, float, NONE) P(class, prefix, melee_traces, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Shockwave, shockwave)
#undef X
/* refname */ ATTRIB(Shotgun, netname, string, "shotgun");
/* wepname */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, alt_animtime, float, SEC) \
- P(class, prefix, alt_refire, float, SEC) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bullets, float, PRI) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, melee_delay, float, SEC) \
- P(class, prefix, melee_multihit, float, SEC) \
- P(class, prefix, melee_nonplayerdamage, float, SEC) \
- P(class, prefix, melee_no_doubleslap, float, SEC) \
- P(class, prefix, melee_range, float, SEC) \
- P(class, prefix, melee_swing_side, float, SEC) \
- P(class, prefix, melee_swing_up, float, SEC) \
- P(class, prefix, melee_time, float, SEC) \
- P(class, prefix, melee_traces, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, solidpenetration, float, PRI) \
- P(class, prefix, spread, float, PRI) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, alt_animtime, float, SEC) P(class, prefix, alt_refire, float, SEC) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, BOTH) P(class, prefix, bullets, float, PRI) P(class, prefix, damage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, melee_delay, float, SEC) P(class, prefix, melee_multihit, float, SEC) P(class, prefix, melee_nonplayerdamage, float, SEC) P(class, prefix, melee_no_doubleslap, float, SEC) P(class, prefix, melee_range, float, SEC) P(class, prefix, melee_swing_side, float, SEC) P(class, prefix, melee_swing_up, float, SEC) P(class, prefix, melee_time, float, SEC) P(class, prefix, melee_traces, float, SEC) P(class, prefix, refire, float, BOTH) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, secondary, float, NONE) P(class, prefix, solidpenetration, float, PRI) P(class, prefix, spread, float, PRI) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, weaponreplace, string,NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Shotgun, shotgun)
#undef X
/* xgettext:no-c-format */
/* wepname */ ATTRIB(Tuba, m_name, string, _("@!#%'n Tuba"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, attenuation, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, fadetime, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, pitchstep, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, volume, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, animtime, float, NONE) P(class, prefix, attenuation, float, NONE) P(class, prefix, damage, float, NONE) P(class, prefix, edgedamage, float, NONE) P(class, prefix, fadetime, float, NONE) P(class, prefix, force, float, NONE) P(class, prefix, pitchstep, float, NONE) P(class, prefix, radius, float, NONE) P(class, prefix, refire, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, volume, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Tuba, tuba)
#undef X
ENDCLASS(Tuba)
/* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
/* wepname */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, ammo, float, SEC) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, PRI) P(class, prefix, animtime, float, PRI) P(class, prefix, damage, float, PRI) P(class, prefix, force, float, PRI) P(class, prefix, refire, float, PRI) P(class, prefix, ammo, float, SEC) P(class, prefix, animtime, float, SEC) P(class, prefix, damage, float, SEC) P(class, prefix, delay, float, SEC) P(class, prefix, edgedamage, float, SEC) P(class, prefix, force, float, SEC) P(class, prefix, lifetime, float, SEC) P(class, prefix, radius, float, SEC) P(class, prefix, refire, float, SEC) P(class, prefix, shotangle, float, SEC) P(class, prefix, speed, float, SEC) P(class, prefix, spread, float, SEC) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Vaporizer, vaporizer)
#undef X
/* refname */ ATTRIB(Vortex, netname, string, "vortex");
/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, armorpierce, float, BOTH) \
- P(class, prefix, chargepool, float, SEC) \
- P(class, prefix, chargepool_pause_regen, float, SEC) \
- P(class, prefix, chargepool_regen, float, SEC) \
- P(class, prefix, charge, float, NONE) \
- P(class, prefix, charge_animlimit, float, NONE) \
- P(class, prefix, charge_limit, float, NONE) \
- P(class, prefix, charge_maxspeed, float, NONE) \
- P(class, prefix, charge_mindmg, float, NONE) \
- P(class, prefix, charge_minspeed, float, NONE) \
- P(class, prefix, charge_rate, float, NONE) \
- P(class, prefix, charge_rot_pause, float, NONE) \
- P(class, prefix, charge_rot_rate, float, NONE) \
- P(class, prefix, charge_shot_multiplier, float, NONE) \
- P(class, prefix, charge_start, float, NONE) \
- P(class, prefix, charge_velocity_rate, float, NONE) \
- P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
- P(class, prefix, damagefalloff_halflife, float, BOTH) \
- P(class, prefix, damagefalloff_maxdist, float, BOTH) \
- P(class, prefix, damagefalloff_mindist, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
+#define X(BEGIN, P, END, class, prefix) BEGIN(class) P(class, prefix, ammo, float, BOTH) P(class, prefix, animtime, float, BOTH) P(class, prefix, armorpierce, float, BOTH) P(class, prefix, chargepool, float, SEC) P(class, prefix, chargepool_pause_regen, float, SEC) P(class, prefix, chargepool_regen, float, SEC) P(class, prefix, charge, float, NONE) P(class, prefix, charge_animlimit, float, NONE) P(class, prefix, charge_limit, float, NONE) P(class, prefix, charge_maxspeed, float, NONE) P(class, prefix, charge_mindmg, float, NONE) P(class, prefix, charge_minspeed, float, NONE) P(class, prefix, charge_rate, float, NONE) P(class, prefix, charge_rot_pause, float, NONE) P(class, prefix, charge_rot_rate, float, NONE) P(class, prefix, charge_shot_multiplier, float, NONE) P(class, prefix, charge_start, float, NONE) P(class, prefix, charge_velocity_rate, float, NONE) P(class, prefix, damagefalloff_forcehalflife, float, BOTH) P(class, prefix, damagefalloff_halflife, float, BOTH) P(class, prefix, damagefalloff_maxdist, float, BOTH) P(class, prefix, damagefalloff_mindist, float, BOTH) P(class, prefix, damage, float, BOTH) P(class, prefix, force, float, BOTH) P(class, prefix, refire, float, BOTH) P(class, prefix, secondary, float, NONE) P(class, prefix, reload_ammo, float, NONE) P(class, prefix, reload_time, float, NONE) P(class, prefix, switchdelay_raise, float, NONE) P(class, prefix, switchdelay_drop, float, NONE) P(class, prefix, weaponreplace, string, NONE) P(class, prefix, weaponstart, float, NONE) P(class, prefix, weaponstartoverride, float, NONE) P(class, prefix, weaponthrowable, float, NONE) END()
W_PROPS(X, Vortex, vortex)
#undef X
#include "wepent.qh"
-#define WEPENT_SET_NORMAL(var, x) MACRO_BEGIN \
- var = x; \
-MACRO_END
+#define WEPENT_SET_NORMAL(var, x) MACRO_BEGIN var = x; MACRO_END
// #define PROP(public, fld, set, sv, cl)
-#define WEPENT_NETPROPS(PROP) PROP(false, sv_entnum, WEPENT_SET_NORMAL, {}, {}) /* sentinel */ \
- PROP(false, m_switchweapon, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.m_switchweapon.m_id); }, \
- { (viewmodels[this.m_wepent_slot]).switchweapon = Weapons_from(ReadByte()); }) \
- \
- PROP(false, m_switchingweapon, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.m_switchingweapon.m_id); }, \
- { (viewmodels[this.m_wepent_slot]).switchingweapon = Weapons_from(ReadByte()); }) \
- \
- PROP(false, m_weapon, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.m_weapon.m_id); }, \
- { (viewmodels[this.m_wepent_slot]).activeweapon = Weapons_from(ReadByte()); }) \
- \
- PROP(false, m_alpha, WEPENT_SET_NORMAL, \
- { WriteByte(chan, rint(bound(-1, 254 * this.m_alpha, 254) - -1)); }, \
- { (viewmodels[this.m_wepent_slot]).m_alpha = (ReadByte() + -1) / 254; }) \
- \
- PROP(false, vortex_charge, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.vortex_charge * 255); }, \
- { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 255; }) \
- \
- PROP(false, oknex_charge, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.oknex_charge * 16); }, \
- { (viewmodels[this.m_wepent_slot]).oknex_charge = ReadByte() / 16; }) \
- \
- PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.m_gunalign); }, \
- { (viewmodels[this.m_wepent_slot]).m_gunalign = ReadByte(); }) \
- \
- PROP(false, porto_v_angle_held, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.porto_v_angle_held); if(this.porto_v_angle_held) { \
- WriteAngle(chan, this.porto_v_angle.x); WriteAngle(chan, this.porto_v_angle.y); \
- } }, \
- { (viewmodels[this.m_wepent_slot]).angles_held_status = ReadByte(); if((viewmodels[this.m_wepent_slot]).angles_held_status) { \
- (viewmodels[this.m_wepent_slot]).angles_held_x = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_y = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_z = 0; } \
- else { (viewmodels[this.m_wepent_slot]).angles_held = '0 0 0'; } }) \
- \
- PROP(false, tuba_instrument, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.tuba_instrument); }, \
- { (viewmodels[this.m_wepent_slot]).tuba_instrument = ReadByte(); }) \
- \
- PROP(false, hagar_load, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.hagar_load); }, \
- { (viewmodels[this.m_wepent_slot]).hagar_load = ReadByte(); }) \
- \
- PROP(false, minelayer_mines, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.minelayer_mines); }, \
- { (viewmodels[this.m_wepent_slot]).minelayer_mines = ReadByte(); }) \
- \
- PROP(false, arc_heat_percent, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.arc_heat_percent * 255); }, \
- { (viewmodels[this.m_wepent_slot]).arc_heat_percent = ReadByte() / 255; }) \
- \
- PROP(false, vortex_chargepool_ammo, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.vortex_chargepool_ammo * 16); }, \
- { (viewmodels[this.m_wepent_slot]).vortex_chargepool_ammo = ReadByte() / 16; }) \
- \
- PROP(false, oknex_chargepool_ammo, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.oknex_chargepool_ammo * 16); }, \
- { (viewmodels[this.m_wepent_slot]).oknex_chargepool_ammo = ReadByte() / 16; }) \
- \
- PROP(false, clip_load, WEPENT_SET_NORMAL, \
- { WriteShort(chan, this.clip_load); }, \
- { (viewmodels[this.m_wepent_slot]).clip_load = ReadShort(); }) \
- \
- PROP(false, clip_size, WEPENT_SET_NORMAL, \
- { WriteShort(chan, this.clip_size); }, \
- { (viewmodels[this.m_wepent_slot]).clip_size = ReadShort(); }) \
- \
- /**/
+#define WEPENT_NETPROPS(PROP) PROP(false, sv_entnum, WEPENT_SET_NORMAL, {}, {}) /* sentinel */ PROP(false, m_switchweapon, WEPENT_SET_NORMAL, { WriteByte(chan, this.m_switchweapon.m_id); }, { (viewmodels[this.m_wepent_slot]).switchweapon = Weapons_from(ReadByte()); }) PROP(false, m_switchingweapon, WEPENT_SET_NORMAL, { WriteByte(chan, this.m_switchingweapon.m_id); }, { (viewmodels[this.m_wepent_slot]).switchingweapon = Weapons_from(ReadByte()); }) PROP(false, m_weapon, WEPENT_SET_NORMAL, { WriteByte(chan, this.m_weapon.m_id); }, { (viewmodels[this.m_wepent_slot]).activeweapon = Weapons_from(ReadByte()); }) PROP(false, m_alpha, WEPENT_SET_NORMAL, { WriteByte(chan, rint(bound(-1, 254 * this.m_alpha, 254) - -1)); }, { (viewmodels[this.m_wepent_slot]).m_alpha = (ReadByte() + -1) / 254; }) PROP(false, vortex_charge, WEPENT_SET_NORMAL, { WriteByte(chan, this.vortex_charge * 255); }, { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 255; }) PROP(false, oknex_charge, WEPENT_SET_NORMAL, { WriteByte(chan, this.oknex_charge * 16); }, { (viewmodels[this.m_wepent_slot]).oknex_charge = ReadByte() / 16; }) PROP(false, m_gunalign, WEPENT_SET_NORMAL, { WriteByte(chan, this.m_gunalign); }, { (viewmodels[this.m_wepent_slot]).m_gunalign = ReadByte(); }) PROP(false, porto_v_angle_held, WEPENT_SET_NORMAL, { WriteByte(chan, this.porto_v_angle_held); if(this.porto_v_angle_held) { WriteAngle(chan, this.porto_v_angle.x); WriteAngle(chan, this.porto_v_angle.y); } }, { (viewmodels[this.m_wepent_slot]).angles_held_status = ReadByte(); if((viewmodels[this.m_wepent_slot]).angles_held_status) { (viewmodels[this.m_wepent_slot]).angles_held_x = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_y = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_z = 0; } else { (viewmodels[this.m_wepent_slot]).angles_held = '0 0 0'; } }) PROP(false, tuba_instrument, WEPENT_SET_NORMAL, { WriteByte(chan, this.tuba_instrument); }, { (viewmodels[this.m_wepent_slot]).tuba_instrument = ReadByte(); }) PROP(false, hagar_load, WEPENT_SET_NORMAL, { WriteByte(chan, this.hagar_load); }, { (viewmodels[this.m_wepent_slot]).hagar_load = ReadByte(); }) PROP(false, minelayer_mines, WEPENT_SET_NORMAL, { WriteByte(chan, this.minelayer_mines); }, { (viewmodels[this.m_wepent_slot]).minelayer_mines = ReadByte(); }) PROP(false, arc_heat_percent, WEPENT_SET_NORMAL, { WriteByte(chan, this.arc_heat_percent * 255); }, { (viewmodels[this.m_wepent_slot]).arc_heat_percent = ReadByte() / 255; }) PROP(false, vortex_chargepool_ammo, WEPENT_SET_NORMAL, { WriteByte(chan, this.vortex_chargepool_ammo * 16); }, { (viewmodels[this.m_wepent_slot]).vortex_chargepool_ammo = ReadByte() / 16; }) PROP(false, oknex_chargepool_ammo, WEPENT_SET_NORMAL, { WriteByte(chan, this.oknex_chargepool_ammo * 16); }, { (viewmodels[this.m_wepent_slot]).oknex_chargepool_ammo = ReadByte() / 16; }) PROP(false, clip_load, WEPENT_SET_NORMAL, { WriteShort(chan, this.clip_load); }, { (viewmodels[this.m_wepent_slot]).clip_load = ReadShort(); }) PROP(false, clip_size, WEPENT_SET_NORMAL, { WriteShort(chan, this.clip_size); }, { (viewmodels[this.m_wepent_slot]).clip_size = ReadShort(); }) /**/
#ifdef SVQC
STATIC_INIT(WEPENT_PUBLICMASK)
{
int i = 0;
- #define X(public, fld, set, sv, cl) { \
- if (public) { \
- WEPENT_PUBLICMASK |= BIT(i); \
- } \
- i += 1; \
- }
+ #define X(public, fld, set, sv, cl) { if (public) { WEPENT_PUBLICMASK |= BIT(i); } i += 1; }
WEPENT_NETPROPS(X);
#undef X
if (i >= BITS(24 - 1)) LOG_FATAL("Exceeded WEPENT_NETPROPS limit");
WriteByte(chan, weaponslot(weaponentity));
WriteInt24_t(chan, sf);
int i = 0;
- #define X(public, fld, set, sv, cl) { \
- if (sf & BIT(i)) { \
- sv; \
- } \
- i += 1; \
- }
+ #define X(public, fld, set, sv, cl) { if (sf & BIT(i)) { sv; } i += 1; }
WEPENT_NETPROPS(X);
#undef X
return true;
entity o = this.owner;
int i = 0;
- #define X(public, fld, set, sv, cl) { \
- if (this.fld != o.fld) { \
- set(this.fld, o.fld); \
- this.SendFlags |= BIT(i); \
- } \
- i += 1; \
- }
+ #define X(public, fld, set, sv, cl) { if (this.fld != o.fld) { set(this.fld, o.fld); this.SendFlags |= BIT(i); } i += 1; }
WEPENT_NETPROPS(X);
#undef X
}
viewmodels[slot].m_wepent_slot = slot;
int sf = ReadInt24_t();
int i = 0;
- #define X(public, fld, set, sv, cl) { \
- if (sf & BIT(i)) { \
- cl; \
- } \
- i += 1; \
- }
+ #define X(public, fld, set, sv, cl) { if (sf & BIT(i)) { cl; } i += 1; }
WEPENT_NETPROPS(X);
#undef X
return true;
#undef spawn
#undef setmodel
-#define stuffcmd(cl, ...) MACRO_BEGIN \
- entity _cl = (cl); \
- if (IS_REAL_CLIENT(_cl)) stuffcmd(_cl, __VA_ARGS__); \
-MACRO_END
+#define stuffcmd(cl, ...) MACRO_BEGIN entity _cl = (cl); if (IS_REAL_CLIENT(_cl)) stuffcmd(_cl, __VA_ARGS__); MACRO_END
#pragma noref 0
#pragma once
/** Components always interpolate from the previous state */
-#define COMPONENT(com) \
- void com_##com##_interpolate(entity it, float a); \
- .bool com_##com
+#define COMPONENT(com) void com_##com##_interpolate(entity it, float a); .bool com_##com
#define FOREACH_COMPONENT(com, body) FOREACH_ENTITY_FLOAT(com_##com, true, body)
#define EVENT(T, args) .bool evt_##T##_listener; .void args evt_##T
-#define emit(T, ...) \
- MACRO_BEGIN \
- FOREACH_ENTITY_FLOAT_ORDERED(evt_##T##_listener, true, it.evt_##T(__VA_ARGS__)); \
- MACRO_END
+#define emit(T, ...) MACRO_BEGIN FOREACH_ENTITY_FLOAT_ORDERED(evt_##T##_listener, true, it.evt_##T(__VA_ARGS__)); MACRO_END
-#define subscribe(listener, T, fn) \
- MACRO_BEGIN \
- listener.evt_##T = (fn); \
- listener.evt_##T##_listener = true; \
- MACRO_END
+#define subscribe(listener, T, fn) MACRO_BEGIN listener.evt_##T = (fn); listener.evt_##T##_listener = true; MACRO_END
/**
* framelimit 0 is no limit, interpolation does not apply
* framerate below minfps will result in less than 100% speed
*/
-#define SYSTEM(sys, frameLimit, minfps) \
- void sys_##sys##_update(entity this, float dt); \
- noref float autocvar_xon_sys_##sys##_dt = ((frameLimit) ? (1 / (frameLimit)) : 0); \
- noref float autocvar_xon_sys_##sys##_minfps = (1 / (1 / (minfps)))
-
-#define SYSTEM_UPDATE(sys) \
- MACRO_BEGIN \
- static float t = 0; \
- float dt = autocvar_xon_sys_##sys##_dt; \
- float minfps = autocvar_xon_sys_##sys##_minfps; \
- static float accumulator = 0; \
- float a = 0; \
- if (dt) { \
- accumulator += min(frametime, 1 / (minfps)); \
- } else { \
- accumulator += frametime; \
- dt = accumulator; \
- a = 1; \
- } \
- while (accumulator >= dt) \
- { \
- time = t; \
- FOREACH_COMPONENT(sys, sys_##sys##_update(it, dt)); \
- t += dt; \
- accumulator -= dt; \
- } \
- if (!a) a = accumulator / dt; \
- FOREACH_COMPONENT(sys, com_##sys##_interpolate(it, a)); \
- MACRO_END
+#define SYSTEM(sys, frameLimit, minfps) void sys_##sys##_update(entity this, float dt); noref float autocvar_xon_sys_##sys##_dt = ((frameLimit) ? (1 / (frameLimit)) : 0); noref float autocvar_xon_sys_##sys##_minfps = (1 / (1 / (minfps)))
+
+#define SYSTEM_UPDATE(sys) MACRO_BEGIN static float t = 0; float dt = autocvar_xon_sys_##sys##_dt; float minfps = autocvar_xon_sys_##sys##_minfps; static float accumulator = 0; float a = 0; if (dt) { accumulator += min(frametime, 1 / (minfps)); } else { accumulator += frametime; dt = accumulator; a = 1; } while (accumulator >= dt) { time = t; FOREACH_COMPONENT(sys, sys_##sys##_update(it, dt)); t += dt; accumulator -= dt; } if (!a) a = accumulator / dt; FOREACH_COMPONENT(sys, com_##sys##_interpolate(it, a)); MACRO_END
#if NDEBUG
#define TC(T, sym) MACRO_BEGIN MACRO_END
#else
- #define TC(T, sym) MACRO_BEGIN \
- if (!is_##T(sym)) { \
- LOG_WARNF("Type check failed: " #sym " :: " #T); \
- isnt_##T(sym); \
- } \
- MACRO_END
+ #define TC(T, sym) MACRO_BEGIN if (!is_##T(sym)) { LOG_WARNF("Type check failed: " #sym " :: " #T); isnt_##T(sym); } MACRO_END
#endif
#if !(NDEBUG)
#define objerror_safe(e) make_safe_for_remove(e)
#endif
-#define objerror(this, msg) MACRO_BEGIN \
- LOG_WARN("======OBJECT ERROR======"); \
- entity _e = (this); \
- eprint(_e); \
- objerror_safe(_e); \
- delete(_e); \
- LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
-MACRO_END
+#define objerror(this, msg) MACRO_BEGIN LOG_WARN("======OBJECT ERROR======"); entity _e = (this); eprint(_e); objerror_safe(_e); delete(_e); LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); MACRO_END
#ifdef MENUQC
void _m_init();
#pragma once
#ifdef QCC_SUPPORT_ACCUMULATE
- #define ACCUMULATE_FUNCTION(func, otherfunc) \
- ACCUMULATE void func() \
- { \
- otherfunc(); \
- }
- #define CALL_ACCUMULATED_FUNCTION(func) \
- func()
+ #define ACCUMULATE_FUNCTION(func, otherfunc) ACCUMULATE void func() { otherfunc(); }
+ #define CALL_ACCUMULATED_FUNCTION(func) func()
#else
#ifdef HAVE_YO_DAWG_CPP
// YO DAWG!
// I HERD YO LIEK MACROS
// SO I PUT A MACRO DEFINITION IN YO MACRO DEFINITION
// SO YO CAN EXPAND MACROS WHILE YO EXPAND MACROS
- #define ACCUMULATE_FUNCTION(func, otherfunc) \
- #ifdef func \
- void __merge__##otherfunc() \
- { \
- func(); otherfunc(); \
- } \
- #undef func \
- #define func __merge__##otherfunc \
- #else \
- #define func otherfunc \
- #endif
- #define CALL_ACCUMULATED_FUNCTION(func) \
- func()
+ #define ACCUMULATE_FUNCTION(func, otherfunc) #ifdef func void __merge__##otherfunc() { func(); otherfunc(); } #undef func #define func __merge__##otherfunc #else #define func otherfunc #endif
+ #define CALL_ACCUMULATED_FUNCTION(func) func()
#else
- #define ACCUMULATE_FUNCTION(func, otherfunc) \
- .float _ACCUMULATE_##func##__##otherfunc;
+ #define ACCUMULATE_FUNCTION(func, otherfunc) .float _ACCUMULATE_##func##__##otherfunc;
void ACCUMULATE_call(string func)
{
float i;
if (substring(name, 0, funcprefixlen) == funcprefix) callfunction(substring(name, funcprefixlen, -1));
}
}
- #define CALL_ACCUMULATED_FUNCTION(func) \
- ACCUMULATE_call( #func)
+ #define CALL_ACCUMULATED_FUNCTION(func) ACCUMULATE_call( #func)
#endif
#endif
// used for simplifying ACCUMULATE_FUNCTIONs
-#define SET_FIRST_OR_LAST(input, first, count) \
- if (!input) { input = (first + count); }
-#define SET_FIELD_COUNT(field, first, count) \
- if (!field) { field = (first + count); ++count; }
-#define CHECK_MAX_COUNT(name, max, count, type) \
- if (count > max) { error(strcat("Maximum ", type, " hit: ", #name, ": ", ftos(count), ".\n")); }
+#define SET_FIRST_OR_LAST(input, first, count) if (!input) { input = (first + count); }
+#define SET_FIELD_COUNT(field, first, count) if (!field) { field = (first + count); ++count; }
+#define CHECK_MAX_COUNT(name, max, count, type) if (count > max) { error(strcat("Maximum ", type, " hit: ", #name, ": ", ftos(count), ".\n")); }
.int al_buf;
.int al_len;
-#define AL_NEW(this, n, default, T) \
- MACRO_BEGIN \
- ArrayList _al = this = new_pure(ArrayList); \
- _al.al_buf = buf_create(); \
- for (int i = 0, _n = _al.al_len = n; i < _n; ++i) \
- { \
- const _AL_type__##T() it = default; \
- AL_set##T(this, i, it); \
- } \
- MACRO_END
+#define AL_NEW(this, n, default, T) MACRO_BEGIN ArrayList _al = this = new_pure(ArrayList); _al.al_buf = buf_create(); for (int i = 0, _n = _al.al_len = n; i < _n; ++i) { const _AL_type__##T() it = default; AL_set##T(this, i, it); } MACRO_END
-#define AL_DELETE(this) \
- MACRO_BEGIN \
- buf_del(this.al_buf); \
- delete(this); \
- this = NULL; \
- MACRO_END
+#define AL_DELETE(this) MACRO_BEGIN buf_del(this.al_buf); delete(this); this = NULL; MACRO_END
#define _AL_type__s() string
#define AL_gets(this, idx) bufstr_get(this.al_buf, idx)
#define AL_gete(this, idx) al_ftoe(AL_getf(this, idx))
#define AL_sete(this, idx, val) AL_setf(this, idx, al_etof(val))
-#define AL_EACH(this, T, cond, body) \
- MACRO_BEGIN \
- const noref ArrayList _al = this; \
- for (int i = 0, n = _al.al_len; i < n; ++i) \
- { \
- const noref _AL_type__##T() it = AL_get##T(_al, i); \
- if (cond) { body } \
- } \
- MACRO_END
+#define AL_EACH(this, T, cond, body) MACRO_BEGIN const noref ArrayList _al = this; for (int i = 0, n = _al.al_len; i < n; ++i) { const noref _AL_type__##T() it = AL_get##T(_al, i); if (cond) { body } } MACRO_END
{
switch (c)
{
- case 0: return '1.000000 1.000000 1.000000';
- case 1: return '1.000000 0.333333 0.000000';
- case 2: return '0.000000 1.000000 0.501961';
- case 3: return '0.000000 1.000000 0.000000';
- case 4: return '1.000000 0.000000 0.000000';
- case 5: return '0.000000 0.666667 1.000000';
- case 6: return '0.000000 1.000000 1.000000';
- case 7: return '0.501961 1.000000 0.000000';
- case 8: return '0.501961 0.000000 1.000000';
- case 9: return '1.000000 0.000000 1.000000';
- case 10: return '1.000000 0.000000 0.501961';
- case 11: return '0.000000 0.000000 1.000000';
- case 12: return '1.000000 1.000000 0.000000';
- case 13: return '0.000000 0.333333 1.000000';
- case 14: return '1.000000 0.666667 0.000000';
+ case 0: return '1 1 1';
+ case 1: return '1 0.333333 0';
+ case 2: return '0 1 0.501961';
+ case 3: return '0 1 0';
+ case 4: return '1 0 0';
+ case 5: return '0 0.666667 1';
+ case 6: return '0 1 1';
+ case 7: return '0.501961 1 0';
+ case 8: return '0.501961 0 1';
+ case 9: return '1 0 1';
+ case 10: return '1 0 0.501961';
+ case 11: return '0 0 1';
+ case 12: return '1 1 0';
+ case 13: return '0 0.333333 1';
+ case 14: return '1 0.666667 0';
case 15:
if (isPants)
return '1 0 0' * (0.502 + 0.498 * sin(t / M_E + 0))
return '1 0 0' * (0.502 + 0.498 * sin(t / M_PI + M_PI * 5 / 3))
+ '0 1 0' * (0.502 + 0.498 * sin(t / M_PI + M_PI))
+ '0 0 1' * (0.502 + 0.498 * sin(t / M_PI + M_PI * 1 / 3));
- default: return '0.000 0.000 0.000';
+ default: return '0 0 0';
}
}
// ===============================================
#define count_years_decs(time, decs) sprintf(CTX(_("CI_DEC^%s years")), ftos_decimals(time, decs))
-#define count_years(time) \
- count_fill(time, \
- _("CI_ZER^%d years"), /* zeroth */ \
- _("CI_FIR^%d year"), /* first */ \
- _("CI_SEC^%d years"), /* year */ \
- _("CI_THI^%d years"), /* third */ \
- _("CI_MUL^%d years")) /* multi */
+#define count_years(time) count_fill(time, _("CI_ZER^%d years"), /* zeroth */ _("CI_FIR^%d year"), /* first */ _("CI_SEC^%d years"), /* year */ _("CI_THI^%d years"), /* third */ _("CI_MUL^%d years")) /* multi */
#define count_weeks_decs(time, decs) sprintf(CTX(_("CI_DEC^%s weeks")), ftos_decimals(time, decs))
-#define count_weeks(time) \
- count_fill(time, \
- _("CI_ZER^%d weeks"), /* zeroth */ \
- _("CI_FIR^%d week"), /* first */ \
- _("CI_SEC^%d weeks"), /* week */ \
- _("CI_THI^%d weeks"), /* third */ \
- _("CI_MUL^%d weeks")) /* multi */
+#define count_weeks(time) count_fill(time, _("CI_ZER^%d weeks"), /* zeroth */ _("CI_FIR^%d week"), /* first */ _("CI_SEC^%d weeks"), /* week */ _("CI_THI^%d weeks"), /* third */ _("CI_MUL^%d weeks")) /* multi */
#define count_days_decs(time, decs) sprintf(CTX(_("CI_DEC^%s days")), ftos_decimals(time, decs))
-#define count_days(time) \
- count_fill(time, \
- _("CI_ZER^%d days"), /* zeroth */ \
- _("CI_FIR^%d day"), /* first */ \
- _("CI_SEC^%d days"), /* day */ \
- _("CI_THI^%d days"), /* third */ \
- _("CI_MUL^%d days")) /* multi */
+#define count_days(time) count_fill(time, _("CI_ZER^%d days"), /* zeroth */ _("CI_FIR^%d day"), /* first */ _("CI_SEC^%d days"), /* day */ _("CI_THI^%d days"), /* third */ _("CI_MUL^%d days")) /* multi */
#define count_hours_decs(time, decs) sprintf(CTX(_("CI_DEC^%s hours")), ftos_decimals(time, decs))
-#define count_hours(time) \
- count_fill(time, \
- _("CI_ZER^%d hours"), /* zeroth */ \
- _("CI_FIR^%d hour"), /* first */ \
- _("CI_SEC^%d hours"), /* hour */ \
- _("CI_THI^%d hours"), /* third */ \
- _("CI_MUL^%d hours")) /* multi */
+#define count_hours(time) count_fill(time, _("CI_ZER^%d hours"), /* zeroth */ _("CI_FIR^%d hour"), /* first */ _("CI_SEC^%d hours"), /* hour */ _("CI_THI^%d hours"), /* third */ _("CI_MUL^%d hours")) /* multi */
#define count_minutes_decs(time, decs) sprintf(CTX(_("CI_DEC^%s minutes")), ftos_decimals(time, decs))
-#define count_minutes(time) \
- count_fill(time, \
- _("CI_ZER^%d minutes"), /* zeroth */ \
- _("CI_FIR^%d minute"), /* first */ \
- _("CI_SEC^%d minutes"), /* minute */ \
- _("CI_THI^%d minutes"), /* third */ \
- _("CI_MUL^%d minutes")) /* multi */
+#define count_minutes(time) count_fill(time, _("CI_ZER^%d minutes"), /* zeroth */ _("CI_FIR^%d minute"), /* first */ _("CI_SEC^%d minutes"), /* minute */ _("CI_THI^%d minutes"), /* third */ _("CI_MUL^%d minutes")) /* multi */
#define count_seconds_decs(time, decs) sprintf(CTX(_("CI_DEC^%s seconds")), ftos_decimals(time, decs))
-#define count_seconds(time) \
- count_fill(time, \
- _("CI_ZER^%d seconds"), /* zeroth */ \
- _("CI_FIR^%d second"), /* first */ \
- _("CI_SEC^%d seconds"), /* second */ \
- _("CI_THI^%d seconds"), /* third */ \
- _("CI_MUL^%d seconds")) /* multi */
+#define count_seconds(time) count_fill(time, _("CI_ZER^%d seconds"), /* zeroth */ _("CI_FIR^%d second"), /* first */ _("CI_SEC^%d seconds"), /* second */ _("CI_THI^%d seconds"), /* third */ _("CI_MUL^%d seconds")) /* multi */
ERASEABLE
string count_ordinal(int interval)
#define CSQCMODEL_IF(cond) if(cond) {
#define CSQCMODEL_ENDIF }
-#define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
- if(sf & flag) \
- this.f = r();
-#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) \
- if(sf & flag) \
- this.f = (r() + mi) / s;
+#define CSQCMODEL_PROPERTY(flag,t,r,w,f) if(sf & flag) this.f = r();
+#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) if(sf & flag) this.f = (r() + mi) / s;
ALLPROPERTIES
#undef CSQCMODEL_PROPERTY_SCALED
#undef CSQCMODEL_PROPERTY
#define CSQCMODEL_IF(cond)
#define CSQCMODEL_ENDIF
-#define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
- .t f;
+#define CSQCMODEL_PROPERTY(flag,t,r,w,f) .t f;
#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,t,r,w,f)
ALLPROPERTIES
#undef CSQCMODEL_PROPERTY_SCALED
#include <common/csqcmodel_settings.qh>
-noref string csqcmodel_license = "\
-Copyright (c) 2011 Rudolf Polzer\
-\
-Permission is hereby granted, free of charge, to any person obtaining a copy\
-of this software and associated documentation files (the \"Software\"), to\
-deal in the Software without restriction, including without limitation the\
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\
-sell copies of the Software, and to permit persons to whom the Software is\
-furnished to do so, subject to the following conditions:\
-\
-The above copyright notice and this permission notice shall be included in\
-all copies or substantial portions of the Software.\
-\
-THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\
-IN THE SOFTWARE.\
-"; // "
+noref string csqcmodel_license = "Copyright (c) 2011 Rudolf PolzerPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the \"Software\"), todeal in the Software without restriction, including without limitation therights to use, copy, modify, merge, publish, distribute, sublicense, and/orsell copies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGSIN THE SOFTWARE."; // "
.vector glowmod;
.vector view_ofs;
const int CSQCMODEL_PROPERTY_LERPFRAC = BIT(16);
const int CSQCMODEL_PROPERTY_SIZE = BIT(15);
-#define ALLPROPERTIES_COMMON \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, int, ReadByte, WriteByte, frame) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, int, ReadShort, WriteShort, modelindex) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, vector, ReadVector, WriteVector, origin) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, mins) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, maxs) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_x) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, float, ReadAngle, WriteAngle, angles_y) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_z) \
- CSQCMODEL_EXTRAPROPERTIES
+#define ALLPROPERTIES_COMMON CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, int, ReadByte, WriteByte, frame) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, int, ReadShort, WriteShort, modelindex) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, vector, ReadVector, WriteVector, origin) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, mins) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, maxs) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_x) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, float, ReadAngle, WriteAngle, angles_y) CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_z) CSQCMODEL_EXTRAPROPERTIES
#ifdef CSQCMODEL_HAVE_TWO_FRAMES
.float frame3;
.float frame4;
.float frame4time;
.float lerpfrac4;
-#define ALLPROPERTIES ALLPROPERTIES_COMMON \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME2, int, ReadByte, WriteByte, frame2) \
- CSQCMODEL_PROPERTY_SCALED(CSQCMODEL_PROPERTY_LERPFRAC, float, ReadByte, WriteByte, lerpfrac, 255, 0, 255)
+#define ALLPROPERTIES ALLPROPERTIES_COMMON CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME2, int, ReadByte, WriteByte, frame2) CSQCMODEL_PROPERTY_SCALED(CSQCMODEL_PROPERTY_LERPFRAC, float, ReadByte, WriteByte, lerpfrac, 255, 0, 255)
#else
#define ALLPROPERTIES ALLPROPERTIES_COMMON
#endif
//#define CSQCMODEL_SUPPORT_GETTAGINFO_BEFORE_DRAW
// add properties you want networked to CSQC here
-#define CSQCMODEL_EXTRAPROPERTIES \
- /* CSQCMODEL_PROPERTY(1, float, ReadShort, WriteShort, colormap) */ \
- /* CSQCMODEL_PROPERTY(2, float, ReadInt24_t, WriteInt24_t, effects) */
+#define CSQCMODEL_EXTRAPROPERTIES /* CSQCMODEL_PROPERTY(1, float, ReadShort, WriteShort, colormap) */ /* CSQCMODEL_PROPERTY(2, float, ReadInt24_t, WriteInt24_t, effects) */
// add hook function calls here
#define CSQCPLAYER_HOOK_POSTCAMERASETUP
#define CSQCMODEL_IF(cond) if(cond) {
#define CSQCMODEL_ENDIF }
-#define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
- if(sf & flag) \
- { \
- w(MSG_ENTITY, this.csqcmodel_##f); \
- }
+#define CSQCMODEL_PROPERTY(flag,t,r,w,f) if(sf & flag) { w(MSG_ENTITY, this.csqcmodel_##f); }
#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,t,r,w,f)
ALLPROPERTIES
#undef CSQCMODEL_PROPERTY_SCALED
#define CSQCMODEL_IF(cond) if(cond) {
#define CSQCMODEL_ENDIF }
-#define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
- { \
- t tmp = e.f; \
- if(tmp != e.csqcmodel_##f) \
- { \
- e.csqcmodel_##f = tmp; \
- e.SendFlags |= flag; \
- } \
- }
-#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) \
- { \
- t tmp = rint(bound(mi, s * e.f, ma) - mi); \
- if(tmp != e.csqcmodel_##f) \
- { \
- e.csqcmodel_##f = tmp; \
- e.SendFlags |= flag; \
- } \
- }
+#define CSQCMODEL_PROPERTY(flag,t,r,w,f) { t tmp = e.f; if(tmp != e.csqcmodel_##f) { e.csqcmodel_##f = tmp; e.SendFlags |= flag; } }
+#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) { t tmp = rint(bound(mi, s * e.f, ma) - mi); if(tmp != e.csqcmodel_##f) { e.csqcmodel_##f = tmp; e.SendFlags |= flag; } }
ALLPROPERTIES
#undef CSQCMODEL_PROPERTY_SCALED
#undef CSQCMODEL_PROPERTY
#define CSQCMODEL_IF(cond)
#define CSQCMODEL_ENDIF
-#define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
- .t f; \
- .t csqcmodel_##f;
+#define CSQCMODEL_PROPERTY(flag,t,r,w,f) .t f; .t csqcmodel_##f;
#define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,t,r,w,f)
ALLPROPERTIES
#undef CSQCMODEL_PROPERTY_SCALED
// where default_cvar_value has type <qc_var_type>
// e.g.: AUTOCVAR(mycvar, float, 2.5, "cvar description")
-#define __AUTOCVAR(file, archive, var, type, desc, default) \
- ACCUMULATE void RegisterCvars(void(string, string, string, bool, string) f) \
- { \
- f( #var, repr_cvar_##type(default), desc, archive, file); \
- } \
- type autocvar_##var = default
-#define AUTOCVAR_5(file, archive, var, type, desc) \
- __AUTOCVAR(file, archive, var, type, desc, default_##type)
-#define AUTOCVAR_6(file, archive, var, type, default, desc) \
- __AUTOCVAR(file, archive, var, type, desc, default)
+#define __AUTOCVAR(file, archive, var, type, desc, default) ACCUMULATE void RegisterCvars(void(string, string, string, bool, string) f) { f( #var, repr_cvar_##type(default), desc, archive, file); } type autocvar_##var = default
+#define AUTOCVAR_5(file, archive, var, type, desc) __AUTOCVAR(file, archive, var, type, desc, default_##type)
+#define AUTOCVAR_6(file, archive, var, type, default, desc) __AUTOCVAR(file, archive, var, type, desc, default)
#define _AUTOCVAR(...) EVAL__AUTOCVAR(OVERLOAD(AUTOCVAR, __FILE__, __VA_ARGS__))
#define EVAL__AUTOCVAR(...) __VA_ARGS__
#define AUTOCVAR_SAVE(...) _AUTOCVAR(true, __VA_ARGS__)
else
{
dY = theBorderSize.x * eY;
- drawsubpic(theOrigin, width * 0.5 + dY, pic, '0 0 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic, '0 0 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width * 0.5 + dY, pic, '0 0 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic, '0 0 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
drawsubpic(theOrigin + height - dY, width * 0.5 + dY, pic, '0 0.75 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
drawsubpic(theOrigin + width * 0.5 + height - dY, width * 0.5 + dY, pic, '0 0.75 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
}
// not high enough... draw just top and bottom then
bH = eY * (0.25 * theSize.y / (theBorderSize.y * 2));
dX = theBorderSize.x * eX;
- drawsubpic(theOrigin, dX + height * 0.5, pic, '0 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, dX + height * 0.5, pic, '0 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
drawsubpic(theOrigin + width - dX, dX + height * 0.5, pic, '0.75 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic, '0 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic, '0 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
drawsubpic(theOrigin + width - dX + height * 0.5, dX + height * 0.5, pic, '0.75 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
}
else
{
dX = theBorderSize.x * eX;
dY = theBorderSize.x * eY;
- drawsubpic(theOrigin, dX + dY, pic, '0 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + width - dX, dX + dY, pic, '0.75 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + height - dY, dX + dY, pic, '0 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, dX + dY, pic, '0 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width - dX, dX + dY, pic, '0.75 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height - dY, dX + dY, pic, '0 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
drawsubpic(theOrigin + height - dY + width - dX, dX + dY, pic, '0.75 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
}
}
/**
* Remove all elements
*/
-#define IL_CLEAR(this) \
- MACRO_BEGIN \
- IntrusiveList __il = this; \
- assert(__il); \
- .entity il_prev = __il.il_prevfld; \
- IL_EACH(__il, true, it.(il_next) = it.(il_prev) = NULL); \
- __il.il_head = __il.il_tail = NULL; \
- MACRO_END
+#define IL_CLEAR(this) MACRO_BEGIN IntrusiveList __il = this; assert(__il); .entity il_prev = __il.il_prevfld; IL_EACH(__il, true, it.(il_next) = it.(il_prev) = NULL); __il.il_head = __il.il_tail = NULL; MACRO_END
/**
* Delete the list
*/
-#define IL_DELETE(this) \
- MACRO_BEGIN \
- delete(this); \
- this = NULL; \
- MACRO_END
+#define IL_DELETE(this) MACRO_BEGIN delete(this); this = NULL; MACRO_END
-#define IL_EACH(this, cond, body) \
- MACRO_BEGIN \
- IntrusiveList _il = this; \
- assert(_il); \
- .entity il_next = _il.il_nextfld; \
- noref int i = 0; \
- for (entity _next, _it = _il.il_head; _it; (_it = _next, ++i)) \
- { \
- const noref entity it = _it; \
- _next = it.(il_next); \
- if (cond) { LAMBDA(body) } \
- } \
- MACRO_END
+#define IL_EACH(this, cond, body) MACRO_BEGIN IntrusiveList _il = this; assert(_il); .entity il_next = _il.il_nextfld; noref int i = 0; for (entity _next, _it = _il.il_head; _it; (_it = _next, ++i)) { const noref entity it = _it; _next = it.(il_next); if (cond) { LAMBDA(body) } } MACRO_END
.int il_id;
IntrusiveList il_links[IL_MAX];
#define ITER_CONST
#endif
-#define FOREACH_ARRAY(arr, start, end, cond, body) \
- MACRO_BEGIN \
- for (int _i = start; _i < end; ++_i) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = arr[i]; \
- if (cond) { LAMBDA(body) } \
- } \
- MACRO_END
+#define FOREACH_ARRAY(arr, start, end, cond, body) MACRO_BEGIN for (int _i = start; _i < end; ++_i) { const noref int i = _i; ITER_CONST noref entity it = arr[i]; if (cond) { LAMBDA(body) } } MACRO_END
#define FOREACH(list, cond, body) FOREACH_LIST(list, enemy, cond, body)
-#define FOREACH_LIST(list, next, cond, body) \
- MACRO_BEGIN \
- int _i = 0; \
- for (entity _it = list##_first, _next = NULL; _it; (_it = _next, ++_i)) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = _it; \
- _next = _it.next; \
- if (cond) { LAMBDA(body) } \
- } \
- MACRO_END
-
-#define FOREACH_WORD(words, cond, body) \
- MACRO_BEGIN \
- string _words = words; \
- int _i = 0; \
- for (string _it; (_it = car(_words)); (_words = cdr(_words), ++_i)) \
- { \
- const noref int i = _i; \
- const noref string it = _it; \
- if (cond) { LAMBDA(body) } \
- } \
- MACRO_END
-
-#define STRING_ITERATOR(this, s, i) \
- string this##_s = s; \
- int this##_i = i
-
-#define STRING_ITERATOR_SET(this, s, i) \
- MACRO_BEGIN \
- this##_s = s; \
- this##_i = i; \
- MACRO_END
+#define FOREACH_LIST(list, next, cond, body) MACRO_BEGIN int _i = 0; for (entity _it = list##_first, _next = NULL; _it; (_it = _next, ++_i)) { const noref int i = _i; ITER_CONST noref entity it = _it; _next = _it.next; if (cond) { LAMBDA(body) } } MACRO_END
+
+#define FOREACH_WORD(words, cond, body) MACRO_BEGIN string _words = words; int _i = 0; for (string _it; (_it = car(_words)); (_words = cdr(_words), ++_i)) { const noref int i = _i; const noref string it = _it; if (cond) { LAMBDA(body) } } MACRO_END
+
+#define STRING_ITERATOR(this, s, i) string this##_s = s; int this##_i = i
+
+#define STRING_ITERATOR_SET(this, s, i) MACRO_BEGIN this##_s = s; this##_i = i; MACRO_END
#define STRING_ITERATOR_GET(this) str2chr(this##_s, this##_i++)
#define STRING_ITERATOR_PEEK(this) str2chr(this##_s, this##_i)
#define STRING_ITERATOR_SAVE(this) this##_i
#define STRING_ITERATOR_LOAD(this, n) MACRO_BEGIN this##_i = n; MACRO_END
-#define FOREACH_CHAR(s, cond, body) \
- MACRO_BEGIN \
- STRING_ITERATOR(iter, s, 0); \
- int _it; \
- while ((_it = STRING_ITERATOR_GET(iter)) > 0) \
- { \
- const noref int it = _it; \
- if (cond) { LAMBDA(body) } \
- } \
- MACRO_END
+#define FOREACH_CHAR(s, cond, body) MACRO_BEGIN STRING_ITERATOR(iter, s, 0); int _it; while ((_it = STRING_ITERATOR_GET(iter)) > 0) { const noref int it = _it; if (cond) { LAMBDA(body) } } MACRO_END
#if defined(CSQC)
entity(entity start, .string fld, string match) _findstring = #18;
#endif
#define ORDERED(F) F##_UNORDERED
-#define _FOREACH_ENTITY_FIND_ORDERED(T, fld, match, cond, body) \
- MACRO_BEGIN \
- int _i = 0; \
- for (entity _it = NULL; (_it = _find##T(_it, fld, match)); ++_i) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = _it; \
- if (cond) LAMBDA(body) \
- } \
- MACRO_END
-#define MUTEX_LOCK(this) MACRO_BEGIN \
- if (this) LOG_SEVEREF("Loop mutex held by %s", this); \
- this = __FUNC__; \
-MACRO_END
-#define MUTEX_UNLOCK(this) MACRO_BEGIN \
- this = string_null; \
-MACRO_END
-#define _FOREACH_ENTITY_FIND_UNORDERED(id, T, fld, match, cond, body) \
- MACRO_BEGIN \
- MUTEX_LOCK(_FOREACH_ENTITY_FIND_##T##_##id##mutex); \
- entity _foundchain_first = _findchain##T##_tofield(fld, match, _FOREACH_ENTITY_FIND_##T##_next##id); \
- FOREACH_LIST(_foundchain, _FOREACH_ENTITY_FIND_##T##_next##id, cond, body); \
- MUTEX_UNLOCK(_FOREACH_ENTITY_FIND_##T##_##id##mutex); \
- MACRO_END
+#define _FOREACH_ENTITY_FIND_ORDERED(T, fld, match, cond, body) MACRO_BEGIN int _i = 0; for (entity _it = NULL; (_it = _find##T(_it, fld, match)); ++_i) { const noref int i = _i; ITER_CONST noref entity it = _it; if (cond) LAMBDA(body) } MACRO_END
+#define MUTEX_LOCK(this) MACRO_BEGIN if (this) LOG_SEVEREF("Loop mutex held by %s", this); this = __FUNC__; MACRO_END
+#define MUTEX_UNLOCK(this) MACRO_BEGIN this = string_null; MACRO_END
+#define _FOREACH_ENTITY_FIND_UNORDERED(id, T, fld, match, cond, body) MACRO_BEGIN MUTEX_LOCK(_FOREACH_ENTITY_FIND_##T##_##id##mutex); entity _foundchain_first = _findchain##T##_tofield(fld, match, _FOREACH_ENTITY_FIND_##T##_next##id); FOREACH_LIST(_foundchain, _FOREACH_ENTITY_FIND_##T##_next##id, cond, body); MUTEX_UNLOCK(_FOREACH_ENTITY_FIND_##T##_##id##mutex); MACRO_END
#define FOREACH_ENTITY(cond, body) ORDERED(FOREACH_ENTITY)(cond, body)
-#define FOREACH_ENTITY_ORDERED(cond, body) \
- MACRO_BEGIN \
- int _i = 0; \
- for (entity _it = NULL; (_it = nextent(_it)); ++_i) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = _it; \
- if (cond) LAMBDA(body) \
- } \
- MACRO_END
+#define FOREACH_ENTITY_ORDERED(cond, body) MACRO_BEGIN int _i = 0; for (entity _it = NULL; (_it = nextent(_it)); ++_i) { const noref int i = _i; ITER_CONST noref entity it = _it; if (cond) LAMBDA(body) } MACRO_END
/** marker field, always NULL */
.entity _FOREACH_ENTITY_fld;
.entity _FOREACH_ENTITY_FIND_entity_nextall; noref string _FOREACH_ENTITY_FIND_entity_allmutex;
.entity _FOREACH_ENTITY_FIND_radius_next; noref string _FOREACH_ENTITY_FIND_radius_mutex;
#define FOREACH_ENTITY_RADIUS_UNORDERED(org, dist, cond, body) _FOREACH_ENTITY_FIND_UNORDERED(, radius, org, dist, cond, body)
.entity _FOREACH_ENTITY_FIND_radius_nexttmp; noref string _FOREACH_ENTITY_FIND_radius_tmpmutex;
-#define FOREACH_ENTITY_RADIUS_ORDERED(org, dist, cond, body) \
-MACRO_BEGIN \
- entity _rev_first = NULL; \
- _FOREACH_ENTITY_FIND_UNORDERED(tmp, radius, org, dist, cond, (it._FOREACH_ENTITY_FIND_radius_nexttmp = _rev_first, _rev_first = it)); \
- MUTEX_LOCK(_FOREACH_ENTITY_FIND_radius_tmpmutex); \
- FOREACH_LIST(_rev, _FOREACH_ENTITY_FIND_radius_nexttmp, true, body); \
- MUTEX_UNLOCK(_FOREACH_ENTITY_FIND_radius_tmpmutex); \
-MACRO_END
+#define FOREACH_ENTITY_RADIUS_ORDERED(org, dist, cond, body) MACRO_BEGIN entity _rev_first = NULL; _FOREACH_ENTITY_FIND_UNORDERED(tmp, radius, org, dist, cond, (it._FOREACH_ENTITY_FIND_radius_nexttmp = _rev_first, _rev_first = it)); MUTEX_LOCK(_FOREACH_ENTITY_FIND_radius_tmpmutex); FOREACH_LIST(_rev, _FOREACH_ENTITY_FIND_radius_nexttmp, true, body); MUTEX_UNLOCK(_FOREACH_ENTITY_FIND_radius_tmpmutex); MACRO_END
#endif
#define FOREACH_ENTITY_FLOAT(fld, match, body) ORDERED(FOREACH_ENTITY_FLOAT)(fld, match, body)
#define JSON_BEGIN() int __i = STRING_ITERATOR_SAVE(_json)
#define JSON_FAIL(reason) goto fail
-#define JSON_END() \
- return true; \
-:fail \
- STRING_ITERATOR_LOAD(_json, __i); \
- return false;
+#define JSON_END() return true; :fail STRING_ITERATOR_LOAD(_json, __i); return false;
// Current namespace
string _json_ns;
// Current keys
TEST(json, Parse)
{
- string s = "{\n\
- \"m_string\": \"\\\"string\\\"\",\n\
- \"m_int\": 123,\n\
- \"m_bool\": true,\n\
- \"m_null\": null,\n\
- \"m_obj\": { },\n\
- \"m_arr\": [ ]\n}"; // "
+ string s = "{\n \"m_string\": \"\\\"string\\\"\",\n \"m_int\": 123,\n \"m_bool\": true,\n \"m_null\": null,\n \"m_obj\": { },\n \"m_arr\": [ ]\n}"; // "
print(s, "\n");
int buf = json_parse(s, _json_parse_object);
EXPECT_NE(-1, buf);
ENDCLASS(Lazy)
#define LAZY(id) __lazy_##id
-#define LAZY_NEW(id, compute) \
- entity LAZY(id)() { \
- static bool done; \
- static entity it; \
- if (!done) { it = compute; done = true; } \
- return it; \
- }
+#define LAZY_NEW(id, compute) entity LAZY(id)() { static bool done; static entity it; if (!done) { it = compute; done = true; } return it; }
#define LL_CLEAR(...) EVAL_LL_CLEAR(OVERLOAD(LL_CLEAR, __VA_ARGS__))
#define EVAL_LL_CLEAR(...) __VA_ARGS__
#define LL_CLEAR_1(this) LL_CLEAR_2(this, LAMBDA())
-#define LL_CLEAR_2(this, dtor) \
- MACRO_BEGIN \
- LinkedList _ll = this; \
- assert(_ll); \
- while (_ll.ll_tail) \
- { \
- entity it = LL_POP(_ll); \
- if (!it) continue; \
- dtor \
- delete(it); \
- } \
- MACRO_END
+#define LL_CLEAR_2(this, dtor) MACRO_BEGIN LinkedList _ll = this; assert(_ll); while (_ll.ll_tail) { entity it = LL_POP(_ll); if (!it) continue; dtor delete(it); } MACRO_END
#define LL_DELETE(...) EVAL_LL_DELETE(OVERLOAD(LL_DELETE, __VA_ARGS__))
#define EVAL_LL_DELETE(...) __VA_ARGS__
#define LL_DELETE_1(this) LL_DELETE_2(this, LAMBDA())
-#define LL_DELETE_2(this, dtor) \
- MACRO_BEGIN \
- LL_CLEAR_2(this, dtor); \
- delete(this); \
- this = NULL; \
- MACRO_END
+#define LL_DELETE_2(this, dtor) MACRO_BEGIN LL_CLEAR_2(this, dtor); delete(this); this = NULL; MACRO_END
-#define LL_EACH(list, cond, body) \
- MACRO_BEGIN \
- noref int i = 0; \
- for (entity _it = list.ll_head; _it; (_it = _it.ll_next, ++i)) \
- { \
- ITER_CONST noref entity it = _it.ll_data; \
- if (cond) { body } \
- } \
- MACRO_END
+#define LL_EACH(list, cond, body) MACRO_BEGIN noref int i = 0; for (entity _it = list.ll_head; _it; (_it = _it.ll_next, ++i)) { ITER_CONST noref entity it = _it.ll_data; if (cond) { body } } MACRO_END
#define assert(expr, ...) _assert(print_assertfailed_severe, expr, __VA_ARGS__)
#define devassert(...) MACRO_BEGIN if (autocvar_developer) assert(__VA_ARGS__); MACRO_END
-#define assert_once(expr, ...) \
- MACRO_BEGIN \
- static bool __once; \
- if (!__once) \
- { \
- assert(expr, __VA_ARGS__); \
- __once = true; \
- } \
- MACRO_END
+#define assert_once(expr, ...) MACRO_BEGIN static bool __once; if (!__once) { assert(expr, __VA_ARGS__); __once = true; } MACRO_END
#define devassert_once(...) MACRO_BEGIN if (autocvar_developer) assert_once(__VA_ARGS__); MACRO_END
#define demand(expr, ...) _assert(print_assertfailed_fatal, expr, __VA_ARGS__)
#define devdemand(...) MACRO_BEGIN if (autocvar_developer) demand(__VA_ARGS__); MACRO_END
-#define _assert(f, expr, then) \
- MACRO_BEGIN \
- if (!(expr)) \
- { \
- f(#expr); \
- then; \
- } \
- MACRO_END
+#define _assert(f, expr, then) MACRO_BEGIN if (!(expr)) { f(#expr); then; } MACRO_END
#define ASSERT_LESS(name, var, const) noref int name[(const - var + 1)];
#endif
#define _LOG_HEADER(level) "^9[::^7"PROGNAME"^9::"level"^9] ", __SOURCELOC__
-#define _LOG(f, level, s) \
- MACRO_BEGIN \
- f(strcat1n(_LOG_HEADER(level), "\n^7", s, "\n")); \
- MACRO_END
+#define _LOG(f, level, s) MACRO_BEGIN f(strcat1n(_LOG_HEADER(level), "\n^7", s, "\n")); MACRO_END
#define LOG_FATAL(...) _LOG_FATAL(strcat1n(__VA_ARGS__))
#define LOG_FATALF(...) _LOG_FATAL(sprintf(__VA_ARGS__))
#define LOG_INFO(...) _LOG_INFO(strcat1n(__VA_ARGS__))
#define LOG_INFOF(...) _LOG_INFO(sprintf(__VA_ARGS__))
-#define _LOG_INFO(s) \
- MACRO_BEGIN \
- dprint(_LOG_HEADER("^5INFO")); \
- string __s = s; \
- print("\n^7", __s); \
- /* TODO: unconditionally add a newline when possible */ \
- if (str2chr(__s, strlen(__s) - 1) != '\n') { print("\n"); } \
- MACRO_END
+#define _LOG_INFO(s) MACRO_BEGIN dprint(_LOG_HEADER("^5INFO")); string __s = s; print("\n^7", __s); /* TODO: unconditionally add a newline when possible */ if (str2chr(__s, strlen(__s) - 1) != '\n') { print("\n"); } MACRO_END
#define LOG_TRACE(...) _LOG_TRACE(strcat1n(__VA_ARGS__))
#define LOG_TRACEF(...) _LOG_TRACE(sprintf(__VA_ARGS__))
#define LOG_DEBUGF(...) _LOG_DEBUG(sprintf(__VA_ARGS__))
#define _LOG_DEBUG(s) _LOG(dprint2, "^2DEBUG", s)
-#define dprint2(msg) \
- MACRO_BEGIN \
- if (autocvar_developer > 1) dprint(msg); \
- MACRO_END
+#define dprint2(msg) MACRO_BEGIN if (autocvar_developer > 1) dprint(msg); MACRO_END
// TODO: this sucks, lets find a better way to do backtraces?
#define _backtrace() builtin_remove(NULL)
#define bt_cvar_set(cvar, value) cvar_set(cvar, value)
#endif
-#define backtrace(msg) \
- MACRO_BEGIN \
- int dev = autocvar_developer; \
- bool war = autocvar_prvm_backtraceforwarnings; \
- bt_cvar_set("developer", "1"); \
- bt_cvar_set("prvm_backtraceforwarnings", "1"); \
- print("\n--- CUT HERE ---\n", msg); \
- _backtrace(); \
- print("\n--- CUT UNTIL HERE ---\n"); \
- bt_cvar_set("developer", ftos(dev)); \
- bt_cvar_set("prvm_backtraceforwarnings", ftos(war)); \
- MACRO_END
+#define backtrace(msg) MACRO_BEGIN int dev = autocvar_developer; bool war = autocvar_prvm_backtraceforwarnings; bt_cvar_set("developer", "1"); bt_cvar_set("prvm_backtraceforwarnings", "1"); print("\n--- CUT HERE ---\n", msg); _backtrace(); print("\n--- CUT UNTIL HERE ---\n"); bt_cvar_set("developer", ftos(dev)); bt_cvar_set("prvm_backtraceforwarnings", ftos(war)); MACRO_END
void print_assertfailed_severe(string expr)
{
TEST(Markdown, LineWrap)
{
- #define X(expect, in) MACRO_BEGIN \
- string out = markdown(in); \
- EXPECT_TRUE(expect == out); \
- LOG_INFO(expect); \
- LOG_INFO(out); \
- MACRO_END
+ #define X(expect, in) MACRO_BEGIN string out = markdown(in); EXPECT_TRUE(expect == out); LOG_INFO(expect); LOG_INFO(out); MACRO_END
// identity
X("lorem ipsum", "lorem ipsum");
#define LAMBDA(...) { __VA_ARGS__; }
// With block may not contain continue or break
-#define WITH(type, name, value, block) \
- MACRO_BEGIN \
- type __with_save = (name); \
- name = (value); \
- LAMBDA(block) \
- name = __with_save; \
- MACRO_END
+#define WITH(type, name, value, block) MACRO_BEGIN type __with_save = (name); name = (value); LAMBDA(block) name = __with_save; MACRO_END
.bool(entity this, entity sender, bool isNew) m_read;
#define NET_HANDLE(id, param) bool Net_Handle_##id(entity this, entity sender, param)
-#define NET_GUARD(id) \
- bool Net_Handle_##id##_guard(entity this, entity sender, bool isNew) { \
- bool valid = false; \
- serialize_marker(to, valid); \
- if (!valid) LOG_FATALF("Last message not fully parsed: %s", _net_prevmsgstr); \
- _net_prevmsgstr = #id; \
- return Net_Handle_##id(this, sender, isNew); \
- }
+#define NET_GUARD(id) bool Net_Handle_##id##_guard(entity this, entity sender, bool isNew) { bool valid = false; serialize_marker(to, valid); if (!valid) LOG_FATALF("Last message not fully parsed: %s", _net_prevmsgstr); _net_prevmsgstr = #id; return Net_Handle_##id(this, sender, isNew); }
#ifdef CSQC
string _net_prevmsgstr;
- #define REGISTER_NET_TEMP(id) \
- NET_HANDLE(id, bool); \
- NET_GUARD(id); \
- REGISTER(TempEntities, NET, id, m_id, new_pure(net_temp_packet)) { \
- this.netname = #id; \
- this.m_read = Net_Handle_##id##_guard; \
- }
+ #define REGISTER_NET_TEMP(id) NET_HANDLE(id, bool); NET_GUARD(id); REGISTER(TempEntities, NET, id, m_id, new_pure(net_temp_packet)) { this.netname = #id; this.m_read = Net_Handle_##id##_guard; }
#else
- #define REGISTER_NET_TEMP(id) \
- const bool NET_##id##_istemp = true; \
- REGISTER(TempEntities, NET, id, m_id, new_pure(net_temp_packet)) \
- { \
- this.netname = #id; \
- }
+ #define REGISTER_NET_TEMP(id) const bool NET_##id##_istemp = true; REGISTER(TempEntities, NET, id, m_id, new_pure(net_temp_packet)) { this.netname = #id; }
#endif
#define REGISTER_NET_S2C(id) REGISTER_NET_TEMP(id)
#ifdef CSQC
- #define REGISTER_NET_LINKED(id) \
- ACCUMULATE NET_HANDLE(id, bool isnew) \
- { \
- this = __self; \
- this.sourceLoc = __FILE__":"STR(__LINE__); \
- if (!this) isnew = true; \
- } \
- NET_GUARD(id); \
- REGISTER(LinkedEntities, NET, id, m_id, new_pure(net_linked_packet)) \
- { \
- this.netname = #id; \
- this.m_read = Net_Handle_##id##_guard; \
- }
+ #define REGISTER_NET_LINKED(id) ACCUMULATE NET_HANDLE(id, bool isnew) { this = __self; this.sourceLoc = __FILE__":"STR(__LINE__); if (!this) isnew = true; } NET_GUARD(id); REGISTER(LinkedEntities, NET, id, m_id, new_pure(net_linked_packet)) { this.netname = #id; this.m_read = Net_Handle_##id##_guard; }
#else
- #define REGISTER_NET_LINKED(id) \
- const bool NET_##id##_istemp = false; \
- REGISTER(LinkedEntities, NET, id, m_id, new_pure(net_linked_packet)) \
- { \
- this.netname = #id; \
- }
+ #define REGISTER_NET_LINKED(id) const bool NET_##id##_istemp = false; REGISTER(LinkedEntities, NET, id, m_id, new_pure(net_linked_packet)) { this.netname = #id; }
#endif
REGISTRY(LinkedEntities, BITS(8) - 1)
#ifdef SVQC
- #define REGISTER_NET_C2S(id) \
- NET_HANDLE(id, bool); \
- REGISTER(C2S_Protocol, NET, id, m_id, new_pure(net_c2s_packet)) \
- { \
- this.netname = #id; \
- this.m_read = Net_Handle_##id; \
- }
+ #define REGISTER_NET_C2S(id) NET_HANDLE(id, bool); REGISTER(C2S_Protocol, NET, id, m_id, new_pure(net_c2s_packet)) { this.netname = #id; this.m_read = Net_Handle_##id; }
#else
- #define REGISTER_NET_C2S(id) \
- const bool NET_##id##_istemp = true; \
- REGISTER(C2S_Protocol, NET, id, m_id, new_pure(net_c2s_packet)) \
- { \
- this.netname = #id; \
- }
+ #define REGISTER_NET_C2S(id) const bool NET_##id##_istemp = true; REGISTER(C2S_Protocol, NET, id, m_id, new_pure(net_c2s_packet)) { this.netname = #id; }
#endif
REGISTRY(C2S_Protocol, BITS(8) - 1)
#ifdef CSQC
const int MSG_C2S = 0;
- #define Net_Accept(classname) \
- MACRO_BEGIN \
- if (!this) this = new(classname); \
- MACRO_END
- #define Net_Reject() \
- MACRO_BEGIN \
- if (this) delete(this); \
- MACRO_END
+ #define Net_Accept(classname) MACRO_BEGIN if (!this) this = new(classname); MACRO_END
+ #define Net_Reject() MACRO_BEGIN if (this) delete(this); MACRO_END
string g_buf;
#endif
#if defined(CSQC)
- #define WriteHeader(to, id) \
- WriteByte(to, NET_##id.m_id)
+ #define WriteHeader(to, id) WriteByte(to, NET_##id.m_id)
#elif defined(SVQC)
- #define WriteHeader(to, id) \
- MACRO_BEGIN \
- if (NET_##id##_istemp) WriteByte(to, SVC_TEMPENTITY); \
- WriteByte(to, NET_##id.m_id); \
- bool _net_valid = false; serialize_marker(to, _net_valid); \
- MACRO_END
+ #define WriteHeader(to, id) MACRO_BEGIN if (NET_##id##_istemp) WriteByte(to, SVC_TEMPENTITY); WriteByte(to, NET_##id.m_id); bool _net_valid = false; serialize_marker(to, _net_valid); MACRO_END
#endif
// serialization: new style
#define stream_writing(stream) false
#endif
-#define serialize(T, stream, ...) \
-MACRO_BEGIN \
- noref Stream _stream = stream; \
- serialize_##T(_stream, __VA_ARGS__); \
-MACRO_END
+#define serialize(T, stream, ...) MACRO_BEGIN noref Stream _stream = stream; serialize_##T(_stream, __VA_ARGS__); MACRO_END
#if defined(SVQC)
- #define serialize_byte(stream, this) \
- MACRO_BEGIN \
- WriteByte(stream, this); \
- MACRO_END
+ #define serialize_byte(stream, this) MACRO_BEGIN WriteByte(stream, this); MACRO_END
#elif defined(CSQC)
- #define serialize_byte(stream, this) \
- MACRO_BEGIN \
- this = ReadByte(); \
- MACRO_END
+ #define serialize_byte(stream, this) MACRO_BEGIN this = ReadByte(); MACRO_END
#endif
#if defined(SVQC)
- #define serialize_float(stream, this) \
- MACRO_BEGIN \
- WriteCoord(stream, this); \
- MACRO_END
+ #define serialize_float(stream, this) MACRO_BEGIN WriteCoord(stream, this); MACRO_END
#elif defined(CSQC)
- #define serialize_float(stream, this) \
- MACRO_BEGIN \
- this = ReadCoord(); \
- MACRO_END
+ #define serialize_float(stream, this) MACRO_BEGIN this = ReadCoord(); MACRO_END
#endif
-#define serialize_vector(stream, this) \
-MACRO_BEGIN \
- vector _v = this; \
- serialize_float(stream, _v.x); \
- serialize_float(stream, _v.y); \
- serialize_float(stream, _v.z); \
- this = _v; \
-MACRO_END
-
-#define serialize_marker(stream, this) \
-MACRO_BEGIN \
- if (NDEBUG) { \
- this = true; \
- } else { \
- int _de = 0xDE, _ad = 0xAD, _be = 0xBE, _ef = 0xEF; \
- serialize_byte(stream, _de); \
- serialize_byte(stream, _ad); \
- serialize_byte(stream, _be); \
- serialize_byte(stream, _ef); \
- this = (_de == 0xDE && _ad == 0xAD && _be == 0xBE && _ef == 0xEF); \
- } \
-MACRO_END
+#define serialize_vector(stream, this) MACRO_BEGIN vector _v = this; serialize_float(stream, _v.x); serialize_float(stream, _v.y); serialize_float(stream, _v.z); this = _v; MACRO_END
+
+#define serialize_marker(stream, this) MACRO_BEGIN if (NDEBUG) { this = true; } else { int _de = 0xDE, _ad = 0xAD, _be = 0xBE, _ef = 0xEF; serialize_byte(stream, _de); serialize_byte(stream, _ad); serialize_byte(stream, _be); serialize_byte(stream, _ef); this = (_de == 0xDE && _ad == 0xAD && _be == 0xBE && _ef == 0xEF); } MACRO_END
// serialization: old
}
// allow writing to also pass through to spectators (like so spectators see the same centerprints as players for example)
- #define WRITESPECTATABLE_MSG_ONE(to, statement) MACRO_BEGIN \
- entity prev = msg_entity; \
- entity dst = to; \
- FOREACH_CLIENT(IS_REAL_CLIENT(it), { \
- if (it == dst || (it.classname == STR_SPECTATOR && it.enemy == dst)) \
- { \
- msg_entity = it; \
- LAMBDA(statement); \
- } \
- }); \
- msg_entity = prev; \
- MACRO_END
+ #define WRITESPECTATABLE_MSG_ONE(to, statement) MACRO_BEGIN entity prev = msg_entity; entity dst = to; FOREACH_CLIENT(IS_REAL_CLIENT(it), { if (it == dst || (it.classname == STR_SPECTATOR && it.enemy == dst)) { msg_entity = it; LAMBDA(statement); } }); msg_entity = prev; MACRO_END
#endif
#endif
.bool pure_data;
#define is_pure(e) ((e).pure_data)
/** @deprecated use new_pure or NEW(class) */
-#define make_pure(e) MACRO_BEGIN \
- (e).pure_data = true; \
-MACRO_END
-#define make_impure(e) MACRO_BEGIN \
- (e).pure_data = false; \
-MACRO_END
+#define make_pure(e) MACRO_BEGIN (e).pure_data = true; MACRO_END
+#define make_impure(e) MACRO_BEGIN (e).pure_data = false; MACRO_END
.string classname;
/** Location entity was spawned from in source */
#endif
.void(entity this) dtor;
-#define delete(this) MACRO_BEGIN \
- entity _this = (this); \
- void(entity) _dtor = _this.dtor; \
- ONREMOVE(this); \
- if (_dtor) _dtor(_this); else delete_fn(_this); \
- /* this = NULL; */ \
-MACRO_END
+#define delete(this) MACRO_BEGIN entity _this = (this); void(entity) _dtor = _this.dtor; ONREMOVE(this); if (_dtor) _dtor(_this); else delete_fn(_this); /* this = NULL; */ MACRO_END
entity _clearentity_ent;
STATIC_INIT(clearentity)
// Macros to hide this implementation detail:
#ifdef __STDC__
- #define NEW(cname, ...) \
- OVERLOAD_(spawn##cname, new_pure(cname) P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
+ #define NEW(cname, ...) OVERLOAD_(spawn##cname, new_pure(cname) P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
- #define _TRANSMUTE(cname, this, ...) \
- OVERLOAD_(spawn##cname, this P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
+ #define _TRANSMUTE(cname, this, ...) OVERLOAD_(spawn##cname, this P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
- #define CONSTRUCT(cname, ...) \
- OVERLOAD_(spawn##cname, this P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
+ #define CONSTRUCT(cname, ...) OVERLOAD_(spawn##cname, this P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__))
#else
- #define NEW(cname, ...) \
- OVERLOAD(spawn##cname, new_pure(cname),##__VA_ARGS__)
+ #define NEW(cname, ...) OVERLOAD(spawn##cname, new_pure(cname),##__VA_ARGS__)
- #define _TRANSMUTE(cname, this, ...) \
- OVERLOAD(spawn##cname, this,##__VA_ARGS__)
+ #define _TRANSMUTE(cname, this, ...) OVERLOAD(spawn##cname, this,##__VA_ARGS__)
- #define CONSTRUCT(cname, ...) \
- OVERLOAD(spawn##cname, this,##__VA_ARGS__)
+ #define CONSTRUCT(cname, ...) OVERLOAD(spawn##cname, this,##__VA_ARGS__)
#endif
-#define TRANSMUTE(cname, this, ...) MACRO_BEGIN \
- entity _e = (this); \
- if (_e.vtblbase != cname##_vtbl) { \
- _e.transmute = true; \
- _e.classname = #cname; \
- _TRANSMUTE(cname, _e, __VA_ARGS__); \
- } \
- MACRO_END
+#define TRANSMUTE(cname, this, ...) MACRO_BEGIN entity _e = (this); if (_e.vtblbase != cname##_vtbl) { _e.transmute = true; _e.classname = #cname; _TRANSMUTE(cname, _e, __VA_ARGS__); } MACRO_END
#define CLASS(...) EVAL_CLASS(OVERLOAD__(CLASS, __VA_ARGS__))
#define EVAL_CLASS(...) __VA_ARGS__
#else
#define CLASS_1(cname) CLASS_2(cname, )
-#define CLASS_2(cname, base) \
- entityclass(cname, base); \
- classfield(cname).bool instanceOf##cname; \
- DEBUG_STUFF(cname) \
- VTBL(cname, base) \
- _INIT_STATIC(cname) \
- { \
- if (cname##_vtbl && !this.transmute) \
- { \
- copyentity(cname##_vtbl, this); \
- return; \
- } \
- spawn##base##_static(this); \
- this.instanceOf##cname = true; \
- } \
- INIT(cname) \
- { \
- /* Only statically initialize the current class, it contains everything it inherits */ \
- if (cname##_vtbl.vtblname == this.classname) \
- { \
- spawn##cname##_static(this); \
- this.transmute = false; \
- this.classname = #cname; \
- this.vtblname = string_null; \
- this.vtblbase = cname##_vtbl; \
- } \
- spawn##base##_1(this); \
- }
+#define CLASS_2(cname, base) entityclass(cname, base); classfield(cname).bool instanceOf##cname; DEBUG_STUFF(cname) VTBL(cname, base) _INIT_STATIC(cname) { if (cname##_vtbl && !this.transmute) { copyentity(cname##_vtbl, this); return; } spawn##base##_static(this); this.instanceOf##cname = true; } INIT(cname) { /* Only statically initialize the current class, it contains everything it inherits */ if (cname##_vtbl.vtblname == this.classname) { spawn##cname##_static(this); this.transmute = false; this.classname = #cname; this.vtblname = string_null; this.vtblbase = cname##_vtbl; } spawn##base##_1(this); }
+
+#define INIT(cname) ACCUMULATE cname spawn##cname##_1(cname this)
+
+#define CONSTRUCTOR(cname, ...) cname OVERLOAD(spawn##cname, cname this, __VA_ARGS__) { return = this; } ACCUMULATE cname OVERLOAD(spawn##cname, cname this, __VA_ARGS__)
-#define INIT(cname) \
- ACCUMULATE cname spawn##cname##_1(cname this)
-
-#define CONSTRUCTOR(cname, ...) \
- cname OVERLOAD(spawn##cname, cname this, __VA_ARGS__) \
- { \
- return = this; \
- } \
- ACCUMULATE cname OVERLOAD(spawn##cname, cname this, __VA_ARGS__)
-
-#define DESTRUCTOR(cname) \
- STATIC_METHOD(cname, dtorimpl, void(cname this)); \
- METHOD(cname, dtor, void(cname this)) \
- { \
- METHOD_REFERENCE(cname, dtorimpl)(this); \
- this.instanceOf##cname = false; \
- entity super = SUPER(cname); \
- if (super != cname##_vtbl) super.dtor(this); \
- } \
- STATIC_METHOD(cname, dtorimpl, void(cname this))
+#define DESTRUCTOR(cname) STATIC_METHOD(cname, dtorimpl, void(cname this)); METHOD(cname, dtor, void(cname this)) { METHOD_REFERENCE(cname, dtorimpl)(this); this.instanceOf##cname = false; entity super = SUPER(cname); if (super != cname##_vtbl) super.dtor(this); } STATIC_METHOD(cname, dtorimpl, void(cname this))
#define SUPER(cname) (cname##_vtbl.vtblbase)
#define ATTRIB_3(cname, name, type) classfield(cname) .type name
-#define ATTRIB_4(cname, name, type, val) \
- ATTRIB_3(cname, name, type); \
- INIT(cname) \
- { \
- noref bool strzone; /* Error on strzone() calls. */ \
- this.name = val; \
- } \
- ATTRIB_3(cname, name, type)
-
-#define STATIC_ATTRIB(cname, name, type, val) \
- type cname##_##name; \
- _INIT_STATIC(cname) \
- { \
- noref bool strzone; /* Error on strzone() calls. */ \
- cname##_##name = val; \
- }
+#define ATTRIB_4(cname, name, type, val) ATTRIB_3(cname, name, type); INIT(cname) { noref bool strzone; /* Error on strzone() calls. */ this.name = val; } ATTRIB_3(cname, name, type)
+
+#define STATIC_ATTRIB(cname, name, type, val) type cname##_##name; _INIT_STATIC(cname) { noref bool strzone; /* Error on strzone() calls. */ cname##_##name = val; }
// cleanup potentially zoned strings from base classes
-#define ATTRIB_STRZONE(cname, name, type, val) \
- classfield(cname).type name; \
- INIT(cname) \
- { \
- strcpy(this.name, val); \
- }
+#define ATTRIB_STRZONE(cname, name, type, val) classfield(cname).type name; INIT(cname) { strcpy(this.name, val); }
-#define STATIC_ATTRIB_STRZONE(cname, name, type, val) \
- type cname##_##name; \
- _INIT_STATIC(cname) \
- { \
- strcpy(cname##_##name, val); \
- }
+#define STATIC_ATTRIB_STRZONE(cname, name, type, val) type cname##_##name; _INIT_STATIC(cname) { strcpy(cname##_##name, val); }
-#define ATTRIBARRAY(cname, name, type, cnt) \
- classfield(cname) .type name[cnt]
-
-#define METHOD(cname, name, prototype) \
- STATIC_METHOD(cname, name, prototype); \
- classfield(cname) .prototype name; \
- _INIT_STATIC(cname) \
- { \
- this.name = METHOD_REFERENCE(cname, name); \
- } \
- STATIC_METHOD(cname, name, prototype)
-
-#define STATIC_METHOD(cname, name, prototype) \
- prototype METHOD_REFERENCE(cname, name)
-
-#define ENDCLASS(cname) \
- INIT(cname) \
- { \
- return this; \
- }
+#define ATTRIBARRAY(cname, name, type, cnt) classfield(cname) .type name[cnt]
+
+#define METHOD(cname, name, prototype) STATIC_METHOD(cname, name, prototype); classfield(cname) .prototype name; _INIT_STATIC(cname) { this.name = METHOD_REFERENCE(cname, name); } STATIC_METHOD(cname, name, prototype)
+
+#define STATIC_METHOD(cname, name, prototype) prototype METHOD_REFERENCE(cname, name)
+
+#define ENDCLASS(cname) INIT(cname) { return this; }
// impl
RegisterClasses();
}
-#define VTBL(cname, base) \
- _INIT_STATIC(cname); \
- entity cname##_vtbl; \
- void cname##_vtbl_init() \
- { \
- cname e = new_pure(vtbl); \
- spawn##cname##_static(e); \
- e.vtblname = #cname; \
- /* Top level objects refer to themselves */ \
- e.vtblbase = base##_vtbl ? base##_vtbl : e; \
- cname##_vtbl = e; \
- } \
- ACCUMULATE_FUNCTION(RegisterClasses, cname##_vtbl_init)
+#define VTBL(cname, base) _INIT_STATIC(cname); entity cname##_vtbl; void cname##_vtbl_init() { cname e = new_pure(vtbl); spawn##cname##_static(e); e.vtblname = #cname; /* Top level objects refer to themselves */ e.vtblbase = base##_vtbl ? base##_vtbl : e; cname##_vtbl = e; } ACCUMULATE_FUNCTION(RegisterClasses, cname##_vtbl_init)
#define _INIT_STATIC(cname) ACCUMULATE void spawn##cname##_static(cname this)
#if NDEBUG
#define DEBUG_STUFF(cname)
#else
- #define DEBUG_STUFF(cname) \
- ERASEABLE bool is_##cname(entity e) { return e.instanceOf##cname; } \
- ERASEABLE void isnt_##cname(entity e) { eprint(e); }
+ #define DEBUG_STUFF(cname) ERASEABLE bool is_##cname(entity e) { return e.instanceOf##cname; } ERASEABLE void isnt_##cname(entity e) { eprint(e); }
#endif
-#define METHOD_REFERENCE(cname, name) \
- cname##_##name
+#define METHOD_REFERENCE(cname, name) cname##_##name
#endif
#pragma once
#define P99_MAX_NUMBER 16
-#define P00_ARG( \
- _01, _02, _03, _04, _05, _06, _07, _08, \
- _09, _10, _11, _12, _13, _14, _15, _16, \
- _00, ...) _00
-#define P00_NARG(...) P00_ARG(__VA_ARGS__, \
- 16, 15, 14, 13, 12, 11, 10, 9, \
- 8, 7, 6, 5, 4, 3, 2, 1, \
- 0, )
-#define P99_HAS_COMMA(...) P00_ARG(__VA_ARGS__, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 0, \
- 0)
+#define P00_ARG( _01, _02, _03, _04, _05, _06, _07, _08, _09, _10, _11, _12, _13, _14, _15, _16, _00, ...) _00
+#define P00_NARG(...) P00_ARG(__VA_ARGS__, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, )
+#define P99_HAS_COMMA(...) P00_ARG(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0)
#define P99_IF_EMPTY(...) P99_IF_EQ(1, P99_IS_EMPTY(__VA_ARGS__))
// P99_HAS_COMMA(__VA_ARGS__), : test if there is just one argument, that might be empty
// P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__), : test if P99_IS__EQ__ together with the argument adds a comma
// P99_HAS_COMMA(__VA_ARGS__ (/*empty*/)), : test if the argument together with a parenthesis adds a comma
// P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__ (/*empty*/)) : test if placing it between P99_IS__EQ__ and the parenthesis adds a comma
- #define P99_IS_EMPTY(...) \
- P00_ISEMPTY( \
- P99_HAS_COMMA(__VA_ARGS__), \
- P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__), \
- P99_HAS_COMMA(__VA_ARGS__ (/*empty*/)), \
- P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__ (/*empty*/)) \
- )
+ #define P99_IS_EMPTY(...) P00_ISEMPTY( P99_HAS_COMMA(__VA_ARGS__), P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__), P99_HAS_COMMA(__VA_ARGS__ (/*empty*/)), P99_HAS_COMMA(P00_IS__EQ__ __VA_ARGS__ (/*empty*/)) )
#define P00_IS__EQ__(...) ,
#define P00_ISEMPTY(_1, _2, _3, _4) P99_HAS_COMMA(P99_PASTE5(P00_IS_EMPTY_CASE_, _1, _2, _3, _4))
#define P00_IS_EMPTY_CASE_0000 P00_IS_EMPTY_CASE_0000
#define P99_CAT2(_1, _2) _1 ## _2
-#define P99_PASTE2(_1, _2) \
- P99_CAT2(_1, _2)
-#define P99_PASTE3(_1, _2, _3) \
- P99_PASTE2(P99_PASTE2(_1, _2), _3)
-#define P99_PASTE4(_1, _2, _3, _4) \
- P99_PASTE2(P99_PASTE3(_1, _2, _3), _4)
-#define P99_PASTE5(_1, _2, _3, _4, _5) \
- P99_PASTE2(P99_PASTE4(_1, _2, _3, _4), _5)
+#define P99_PASTE2(_1, _2) P99_CAT2(_1, _2)
+#define P99_PASTE3(_1, _2, _3) P99_PASTE2(P99_PASTE2(_1, _2), _3)
+#define P99_PASTE4(_1, _2, _3, _4) P99_PASTE2(P99_PASTE3(_1, _2, _3), _4)
+#define P99_PASTE5(_1, _2, _3, _4, _5) P99_PASTE2(P99_PASTE4(_1, _2, _3, _4), _5)
* Don't forget to call `REGISTER_REGISTRY`:
* REGISTER_REGISTRY(Foos)
*/
-#define REGISTRY(id, max) \
- void Register##id(); \
- ACCUMULATE void REGISTRY_DEPENDS_(id) {} \
- REGISTRY_BEGIN(id) {} \
- REGISTRY_END(id) {} \
- void _Register##id() {} \
- int id##_state = 0; \
- void Register##id() { if (id##_state) return; id##_state = 1; REGISTRY_DEPENDS_(id); REGISTRY_BEGIN_(id); _Register##id(); id##_state = 2; REGISTRY_END_(id); } \
- const int id##_MAX = max; \
- int id##_COUNT; \
- noref entity id##_first, id##_last; \
- _R_MAP(_##id, id##_MAX); \
- SHUTDOWN(id) { _R_DEL(_##id); } \
- entity _##id##_from(int i, entity null) { if (i >= 0 && i < id##_COUNT) { entity e = _R_GET(_##id, i); if (e) return e; } return null; }
+#define REGISTRY(id, max) void Register##id(); ACCUMULATE void REGISTRY_DEPENDS_(id) {} REGISTRY_BEGIN(id) {} REGISTRY_END(id) {} void _Register##id() {} int id##_state = 0; void Register##id() { if (id##_state) return; id##_state = 1; REGISTRY_DEPENDS_(id); REGISTRY_BEGIN_(id); _Register##id(); id##_state = 2; REGISTRY_END_(id); } const int id##_MAX = max; int id##_COUNT; noref entity id##_first, id##_last; _R_MAP(_##id, id##_MAX); SHUTDOWN(id) { _R_DEL(_##id); } entity _##id##_from(int i, entity null) { if (i >= 0 && i < id##_COUNT) { entity e = _R_GET(_##id, i); if (e) return e; } return null; }
/** Add registry dependencies to a registry */
#define REGISTRY_DEPENDS(id, dep) void Register##dep(); void REGISTRY_DEPENDS_(id) { Register##dep(); }
* Register a new entity with a registry.
* Must be followed by a semicolon or a function body with a `this` parameter.
* Wrapper macros may perform actions after user initialization like so:
- * #define REGISTER_FOO(id) \
- * REGISTER(Foos, FOO, id, m_id, NEW(Foo)) { \
- * print("Registering foo #", this.m_id + 1, "\n"); \
- * } \
- * REGISTER_INIT(FOO, id)
+ * #define REGISTER_FOO(id) * REGISTER(Foos, FOO, id, m_id, NEW(Foo)) { * print("Registering foo #", this.m_id + 1, "\n"); * } * REGISTER_INIT(FOO, id)
*
*
* @param registry The registry to add each entity to.
#define REGISTER(...) EVAL_REGISTER(OVERLOAD_(REGISTER, __VA_ARGS__))
#define EVAL_REGISTER(...) __VA_ARGS__
#define REGISTER_5(registry, ns, id, fld, inst) REGISTER_4(registry, ns##_##id, fld, inst)
-#define REGISTER_4(registry, id, fld, inst) \
- entity id; \
- REGISTER_INIT(id) {} \
- void Register_##id() \
- { \
- entity this = id; \
- if (this == NULL) { \
- _regCheck(registry##_COUNT, registry##_MAX); \
- this = id = inst; \
- this.registered_id = #id; \
- REGISTRY_PUSH(registry, fld, this); \
- } \
- Register_##id##_init(this); \
- } \
- ACCUMULATE_FUNCTION(_Register##registry, Register_##id) \
- REGISTER_INIT(id)
-
-#define REGISTRY_PUSH(registry, fld, it) MACRO_BEGIN \
- it.fld = registry##_COUNT; \
- _R_SET(_##registry, registry##_COUNT, it); \
- ++registry##_COUNT; \
- if (!registry##_first) registry##_first = it; \
- if (registry##_last) registry##_last.REGISTRY_NEXT = it; \
- registry##_last = it; \
-MACRO_END
-
-#define REGISTRY_RESERVE(registry, fld, id, suffix) MACRO_BEGIN \
- entity e = new_pure(registry_reserved); \
- e.registered_id = #id "/" #suffix; \
- REGISTRY_PUSH(registry, fld, e); \
-MACRO_END
+#define REGISTER_4(registry, id, fld, inst) entity id; REGISTER_INIT(id) {} void Register_##id() { entity this = id; if (this == NULL) { _regCheck(registry##_COUNT, registry##_MAX); this = id = inst; this.registered_id = #id; REGISTRY_PUSH(registry, fld, this); } Register_##id##_init(this); } ACCUMULATE_FUNCTION(_Register##registry, Register_##id) REGISTER_INIT(id)
+
+#define REGISTRY_PUSH(registry, fld, it) MACRO_BEGIN it.fld = registry##_COUNT; _R_SET(_##registry, registry##_COUNT, it); ++registry##_COUNT; if (!registry##_first) registry##_first = it; if (registry##_last) registry##_last.REGISTRY_NEXT = it; registry##_last = it; MACRO_END
+
+#define REGISTRY_RESERVE(registry, fld, id, suffix) MACRO_BEGIN entity e = new_pure(registry_reserved); e.registered_id = #id "/" #suffix; REGISTRY_PUSH(registry, fld, e); MACRO_END
#define REGISTER_INIT(id) ACCUMULATE void Register_##id##_init(entity this)
#define REGISTRY_SORT(...) EVAL_REGISTRY_SORT(OVERLOAD(REGISTRY_SORT, __VA_ARGS__))
#define EVAL_REGISTRY_SORT(...) __VA_ARGS__
#define REGISTRY_SORT_1(id) REGISTRY_SORT_2(id, 0)
-#define REGISTRY_SORT_2(id, skip) \
- void _REGISTRY_SWAP_##id(int i, int j, entity pass) \
- { \
- i += skip; j += skip; \
- \
- entity a = _R_GET(_##id, i), b = _R_GET(_##id, j); \
- _R_SET(_##id, i, b); \
- _R_SET(_##id, j, a); \
- \
- entity a_next = a.REGISTRY_NEXT, b_next = b.REGISTRY_NEXT; \
- a.REGISTRY_NEXT = b_next; \
- b.REGISTRY_NEXT = a_next; \
- \
- if (i == 0) id##_first = b; \
- else _R_GET(_##id, i - 1).REGISTRY_NEXT = b; \
- \
- if (j == 0) id##_first = a; \
- else _R_GET(_##id, j - 1).REGISTRY_NEXT = a; \
- } \
- int _REGISTRY_CMP_##id(int i, int j, entity pass) \
- { \
- i += skip; j += skip; \
- string a = _R_GET(_##id, i).registered_id; \
- string b = _R_GET(_##id, j).registered_id; \
- return strcmp(a, b); \
- } \
- STATIC_INIT(Registry_sort_##id) \
- { \
- heapsort(id##_COUNT - (skip), _REGISTRY_SWAP_##id, _REGISTRY_CMP_##id, NULL); \
- }
+#define REGISTRY_SORT_2(id, skip) void _REGISTRY_SWAP_##id(int i, int j, entity pass) { i += skip; j += skip; entity a = _R_GET(_##id, i), b = _R_GET(_##id, j); _R_SET(_##id, i, b); _R_SET(_##id, j, a); entity a_next = a.REGISTRY_NEXT, b_next = b.REGISTRY_NEXT; a.REGISTRY_NEXT = b_next; b.REGISTRY_NEXT = a_next; if (i == 0) id##_first = b; else _R_GET(_##id, i - 1).REGISTRY_NEXT = b; if (j == 0) id##_first = a; else _R_GET(_##id, j - 1).REGISTRY_NEXT = a; } int _REGISTRY_CMP_##id(int i, int j, entity pass) { i += skip; j += skip; string a = _R_GET(_##id, i).registered_id; string b = _R_GET(_##id, j).registered_id; return strcmp(a, b); } STATIC_INIT(Registry_sort_##id) { heapsort(id##_COUNT - (skip), _REGISTRY_SWAP_##id, _REGISTRY_CMP_##id, NULL); }
#define REGISTRY_HASH(id) Registry_hash_##id
#define Registry_send(id, hash)
#endif
-#define REGISTRY_CHECK(id) \
- string REGISTRY_HASH(id); \
- STATIC_INIT(Registry_check_##id) \
- { \
- /* Note: SHA256 isn't always available, use MD4 instead */ \
- string s = "", join = ":"; \
- FOREACH(id, true, s = strcat(s, join, it.registered_id)); \
- s = substring(s, strlen(join), -1); \
- string h = REGISTRY_HASH(id) = strzone(digest_hex("MD4", s)); \
- LOG_DEBUGF(#id ": %s\n[%s]", h, s); \
- } \
- void Registry_check(string r, string sv) \
- { \
- if (r == #id) \
- { \
- string cl = REGISTRY_HASH(id); \
- if (cl != sv) \
- { \
- LOG_FATALF("client/server mismatch (%s).\nCL: %s\nSV: %s", r, cl, sv); \
- } \
- } \
- } \
- void Registry_send_all() { Registry_send(#id, REGISTRY_HASH(id)); } \
-
+#define REGISTRY_CHECK(id) string REGISTRY_HASH(id); STATIC_INIT(Registry_check_##id) { /* Note: SHA256 isn't always available, use MD4 instead */ string s = "", join = ":"; FOREACH(id, true, s = strcat(s, join, it.registered_id)); s = substring(s, strlen(join), -1); string h = REGISTRY_HASH(id) = strzone(digest_hex("MD4", s)); LOG_DEBUGF(#id ": %s\n[%s]", h, s); } void Registry_check(string r, string sv) { if (r == #id) { string cl = REGISTRY_HASH(id); if (cl != sv) { LOG_FATALF("client/server mismatch (%s).\nCL: %s\nSV: %s", r, cl, sv); } } } void Registry_send_all() { Registry_send(#id, REGISTRY_HASH(id)); }
#define REGISTER_REGISTRY(...) EVAL_REGISTER_REGISTRY(OVERLOAD(REGISTER_REGISTRY, __VA_ARGS__))
#define EVAL_REGISTER_REGISTRY(...) __VA_ARGS__
#define REGISTER_REGISTRY_1(id) REGISTER_REGISTRY_2(id, #id)
-#define REGISTER_REGISTRY_2(id, str) \
- ACCUMULATE_FUNCTION(__static_init_1, Register##id) \
- CLASS(id##Registry, Object) \
- ATTRIB(id##Registry, m_name, string, str); \
- ATTRIB(id##Registry, REGISTRY_NEXT, entity, id##_first); \
- METHOD(id##Registry, m_reload, void()); \
- ENDCLASS(id##Registry) \
- REGISTER(Registries, REGISTRY, id, m_id, NEW(id##Registry)); \
- METHOD(id##Registry, m_reload, void()) { \
- id##_state = 0; \
- Register##id(); \
- }
+#define REGISTER_REGISTRY_2(id, str) ACCUMULATE_FUNCTION(__static_init_1, Register##id) CLASS(id##Registry, Object) ATTRIB(id##Registry, m_name, string, str); ATTRIB(id##Registry, REGISTRY_NEXT, entity, id##_first); METHOD(id##Registry, m_reload, void()); ENDCLASS(id##Registry) REGISTER(Registries, REGISTRY, id, m_id, NEW(id##Registry)); METHOD(id##Registry, m_reload, void()) { id##_state = 0; Register##id(); }
#define REPLICATE_3(fld, type, var) REPLICATE_4(fld, type, var, )
#define REPLICATE_4(fld, type, var, func) REPLICATE_##type(fld, var, func)
- #define REPLICATE_string(fld, var, func) \
- REPLICATE_7(fld, string, var, , \
- { strcpy(field, it); }, \
- { strfree(field); }, \
- { \
- /* also initialize to the default value of func when requesting cvars */ \
- string s = func(field); \
- if (s != field) \
- { \
- strcpy(field, s); \
- } \
- })
+ #define REPLICATE_string(fld, var, func) REPLICATE_7(fld, string, var, , { strcpy(field, it); }, { strfree(field); }, { /* also initialize to the default value of func when requesting cvars */ string s = func(field); if (s != field) { strcpy(field, s); } })
#define REPLICATE_float(fld, var, func) REPLICATE_7(fld, float, var, func, { field = stof(it); }, , )
#define REPLICATE_bool(fld, var, func) REPLICATE_7(fld, bool, var, func, { field = boolean(stoi(it)); }, , )
#define REPLICATE_int(fld, var, func) REPLICATE_7(fld, int, var, func, { field = stoi(it); }, , )
#if defined(SVQC)
- #define REPLICATE_7(fld, type, var, func, create, destroy, after) \
- void ReplicateVars(entity this, entity store, string thisname, int i) \
- { \
- type field = store.fld; \
- if (i < 0) { destroy } \
- else \
- { \
- string it = func(argv(i + 1)); \
- bool current = thisname == var; \
- if (i > 0) \
- { \
- if (current) { create } \
- } \
- else \
- { \
- stuffcmd(this, "cl_cmd sendcvar " var "\n"); \
- } \
- if (current) { after } \
- } \
- store.fld = field; \
- }
+ #define REPLICATE_7(fld, type, var, func, create, destroy, after) void ReplicateVars(entity this, entity store, string thisname, int i) { type field = store.fld; if (i < 0) { destroy } else { string it = func(argv(i + 1)); bool current = thisname == var; if (i > 0) { if (current) { create } } else { stuffcmd(this, "cl_cmd sendcvar " var "\n"); } if (current) { after } } store.fld = field; }
#elif defined(CSQC)
// TODO
#define REPLICATE_7(fld, type, var, func, create, destroy, after)
#define WITHSELF(value, block) block
#endif
-#define SELFWRAP(T, R, oldargs, args, forward) \
- .R oldargs T; \
- noref .R oldargs __##T = T; \
- .R args self##T; \
- R T##_self oldargs { ENGINE_EVENT(); return this.self##T forward; }
+#define SELFWRAP(T, R, oldargs, args, forward) .R oldargs T; noref .R oldargs __##T = T; .R args self##T; R T##_self oldargs { ENGINE_EVENT(); return this.self##T forward; }
noref entity _selftemp;
-#define SELFWRAP_SET(T, e, f) \
- (_selftemp = (e), _selftemp.__##T = ((f) ? T##_self : func_null), _selftemp.self##T = (f))
-#define SELFWRAP_GET(T, e) \
- (RVALUE, (e).self##T)
-#define _SELFWRAP_SET(T, e, f) \
- ((e).__##T = (f))
-#define _SELFWRAP_GET(T, e) \
- (RVALUE, (e).__##T)
+#define SELFWRAP_SET(T, e, f) (_selftemp = (e), _selftemp.__##T = ((f) ? T##_self : func_null), _selftemp.self##T = (f))
+#define SELFWRAP_GET(T, e) (RVALUE, (e).self##T)
+#define _SELFWRAP_SET(T, e, f) ((e).__##T = (f))
+#define _SELFWRAP_GET(T, e) (RVALUE, (e).__##T)
SELFWRAP(think, void, (), (entity this), (this))
#define setthink(e, f) SELFWRAP_SET(think, e, f)
ERASEABLE
void heapsort(int n, swapfunc_t swap, comparefunc_t cmp, entity pass)
{
- #define heapify(_count) \
- MACRO_BEGIN \
- for (int start = floor(((_count) - 2) / 2); start >= 0; --start) \
- { \
- siftdown(start, (_count) - 1); \
- } \
- MACRO_END
+ #define heapify(_count) MACRO_BEGIN for (int start = floor(((_count) - 2) / 2); start >= 0; --start) { siftdown(start, (_count) - 1); } MACRO_END
- #define siftdown(_start, _end) \
- MACRO_BEGIN \
- for (int root = (_start); root * 2 + 1 <= (_end); ) \
- { \
- int child = root * 2 + 1; \
- if (child < (_end) && cmp(child, child + 1, pass) < 0) child += 1; \
- if (cmp(root, child, pass) >= 0) break; \
- swap(root, child, pass); \
- root = child; \
- } \
- MACRO_END
+ #define siftdown(_start, _end) MACRO_BEGIN for (int root = (_start); root * 2 + 1 <= (_end); ) { int child = root * 2 + 1; if (child < (_end) && cmp(child, child + 1, pass) < 0) child += 1; if (cmp(root, child, pass) >= 0) break; swap(root, child, pass); root = child; } MACRO_END
heapify(n);
int end = n - 1;
* @param a FIRST entity
* @param b entity after a
*/
-#define SORT_SWAP(a, b) \
- b.sort_prev = a.sort_prev; \
- a.sort_next = b.sort_next; \
- if (b.sort_next) b.sort_next.sort_prev = a; \
- if (a.sort_prev) a.sort_prev.sort_next = b; \
- a.sort_prev = b; \
- b.sort_next = a
+#define SORT_SWAP(a, b) b.sort_prev = a.sort_prev; a.sort_next = b.sort_next; if (b.sort_next) b.sort_next.sort_prev = a; if (a.sort_prev) a.sort_prev.sort_next = b; a.sort_prev = b; b.sort_next = a
return false;
}
- #define _spawnfunc_checktypes(fld) \
- if (s == #fld) \
- if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted", s);
+ #define _spawnfunc_checktypes(fld) if (s == #fld) if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted", s);
#else
#define _spawnfunc_checktypes(fld)
#endif
- #define _spawnfunc_check(fld) \
- if (s == #fld) continue;
+ #define _spawnfunc_check(fld) if (s == #fld) continue;
noref int __spawnfunc_expecting;
noref entity __spawnfunc_expect;
.void(entity) __spawnfunc_constructor;
noref IntrusiveList g_spawn_queue;
- #define SPAWNFUNC_INTERNAL_FIELDS(X) \
- X(string, classname, "spawnfunc") \
- X(string, target, string_null) \
- X(string, target2, string_null) \
- X(string, target3, string_null) \
- X(string, target4, string_null) \
- X(string, targetname, string_null) \
- /**/
+ #define SPAWNFUNC_INTERNAL_FIELDS(X) X(string, classname, "spawnfunc") X(string, target, string_null) X(string, target2, string_null) X(string, target3, string_null) X(string, target4, string_null) X(string, targetname, string_null) /**/
#define X(T, fld, def) .T fld, __spawnfunc_##fld;
SPAWNFUNC_INTERNAL_FIELDS(X)
}
noref IntrusiveList g_map_entities;
- #define __spawnfunc_spawn_all() MACRO_BEGIN \
- g_map_entities = IL_NEW(); \
- IL_EACH(g_spawn_queue, true, __spawnfunc_spawn(it)); \
- MACRO_END
+ #define __spawnfunc_spawn_all() MACRO_BEGIN g_map_entities = IL_NEW(); IL_EACH(g_spawn_queue, true, __spawnfunc_spawn(it)); MACRO_END
#ifdef SVQC
void _SV_OnEntityPreSpawnFunction(entity this);
#endif
e.__spawnfunc_constructor(e);
}
- #define FIELD_SCALAR(fld, n) \
- fld(n)
- #define FIELD_VEC(fld, n) \
- fld(n) \
- fld(n##_x) \
- fld(n##_y) \
- fld(n##_z)
+ #define FIELD_SCALAR(fld, n) fld(n)
+ #define FIELD_VEC(fld, n) fld(n) fld(n##_x) fld(n##_y) fld(n##_z)
#define FIELDS_NONE(fld)
#define FIELDS_ALL(fld) if (false)
- #define FIELDS_COMMON(fld) \
- FIELD_SCALAR(fld, classname) \
- FIELD_SCALAR(fld, sourceLoc) \
- FIELD_SCALAR(fld, spawnfunc_checked) \
- FIELD_VEC(fld, origin) \
- /**/
+ #define FIELDS_COMMON(fld) FIELD_SCALAR(fld, classname) FIELD_SCALAR(fld, sourceLoc) FIELD_SCALAR(fld, spawnfunc_checked) FIELD_VEC(fld, origin) /**/
- #define FIELDS_UNION(fld) \
- FIELD_SCALAR(fld, Version) \
- FIELD_SCALAR(fld, ammo_cells) \
- FIELD_SCALAR(fld, ammo_nails) \
- FIELD_SCALAR(fld, ammo_rockets) \
- FIELD_SCALAR(fld, antiwall_flag) \
- FIELD_SCALAR(fld, armorvalue) \
- FIELD_SCALAR(fld, atten) \
- FIELD_SCALAR(fld, bgmscriptdecay) \
- FIELD_SCALAR(fld, bgmscriptsustain) \
- FIELD_SCALAR(fld, bgmscript) \
- FIELD_SCALAR(fld, button0) \
- FIELD_SCALAR(fld, chmap) \
- FIELD_SCALAR(fld, cnt) \
- FIELD_SCALAR(fld, colormap) \
- FIELD_SCALAR(fld, count) \
- FIELD_SCALAR(fld, curvetarget) \
- FIELD_SCALAR(fld, cvarfilter) \
- FIELD_SCALAR(fld, debrisdamageforcescale) \
- FIELD_SCALAR(fld, debrisfadetime) \
- FIELD_SCALAR(fld, debrismovetype) \
- FIELD_SCALAR(fld, debrisskin) \
- FIELD_SCALAR(fld, debristimejitter) \
- FIELD_SCALAR(fld, debristime) \
- FIELD_SCALAR(fld, debris) \
- FIELD_SCALAR(fld, delay) \
- FIELD_SCALAR(fld, dmgtime) \
- FIELD_SCALAR(fld, dmg) \
- FIELD_SCALAR(fld, dmg_edge) \
- FIELD_SCALAR(fld, dmg_force) \
- FIELD_SCALAR(fld, dmg_radius) \
- FIELD_SCALAR(fld, effects) \
- FIELD_SCALAR(fld, falloff) \
- FIELD_SCALAR(fld, flags) \
- FIELD_SCALAR(fld, fog) \
- FIELD_SCALAR(fld, frags) \
- FIELD_SCALAR(fld, frame) \
- FIELD_SCALAR(fld, gametype) \
- FIELD_SCALAR(fld, gametypefilter) \
- FIELD_SCALAR(fld, geomtype) \
- FIELD_SCALAR(fld, gravity) \
- FIELD_SCALAR(fld, health) \
- FIELD_SCALAR(fld, height) \
- FIELD_SCALAR(fld, impulse) \
- FIELD_SCALAR(fld, killtarget) \
- FIELD_SCALAR(fld, lerpfrac) \
- FIELD_SCALAR(fld, light_lev) \
- FIELD_SCALAR(fld, lip) \
- FIELD_SCALAR(fld, loddistance1) \
- FIELD_SCALAR(fld, lodmodel1) \
- FIELD_SCALAR(fld, ltime) \
- FIELD_SCALAR(fld, map) \
- FIELD_SCALAR(fld, max_health) \
- FIELD_SCALAR(fld, mdl) \
- FIELD_SCALAR(fld, message2) \
- FIELD_SCALAR(fld, message) \
- FIELD_SCALAR(fld, modelindex) \
- FIELD_SCALAR(fld, modelscale) \
- FIELD_SCALAR(fld, model) \
- FIELD_SCALAR(fld, monsterid) \
- FIELD_SCALAR(fld, monster_moveflags) \
- FIELD_SCALAR(fld, monster_name) \
- FIELD_SCALAR(fld, movetype) \
- FIELD_SCALAR(fld, move_movetype) \
- FIELD_SCALAR(fld, netname) \
- FIELD_SCALAR(fld, nextthink) \
- FIELD_SCALAR(fld, noalign) \
- FIELD_SCALAR(fld, noise1) \
- FIELD_SCALAR(fld, noise2) \
- FIELD_SCALAR(fld, noise3) \
- FIELD_SCALAR(fld, noise) \
- FIELD_SCALAR(fld, phase) \
- FIELD_SCALAR(fld, platmovetype) \
- FIELD_SCALAR(fld, race_place) \
- FIELD_SCALAR(fld, radius) \
- FIELD_SCALAR(fld, respawntimestart) \
- FIELD_SCALAR(fld, respawntimejitter) \
- FIELD_SCALAR(fld, respawntime) \
- FIELD_SCALAR(fld, restriction) \
- FIELD_SCALAR(fld, scale) \
- FIELD_SCALAR(fld, skin) \
- FIELD_SCALAR(fld, solid) \
- FIELD_SCALAR(fld, sound1) \
- FIELD_SCALAR(fld, sounds) \
- FIELD_SCALAR(fld, spawnflags) \
- FIELD_SCALAR(fld, spawnmob) \
- FIELD_SCALAR(fld, speed) \
- FIELD_SCALAR(fld, strength) \
- FIELD_SCALAR(fld, style) \
- FIELD_SCALAR(fld, target2) \
- FIELD_SCALAR(fld, target3) \
- FIELD_SCALAR(fld, target4) \
- FIELD_SCALAR(fld, targetname) \
- FIELD_SCALAR(fld, target) \
- FIELD_SCALAR(fld, target_random) \
- FIELD_SCALAR(fld, target_range) \
- FIELD_SCALAR(fld, team) \
- FIELD_SCALAR(fld, trigger_reverse) \
- FIELD_SCALAR(fld, turret_scale_health) \
- FIELD_SCALAR(fld, turret_scale_range) \
- FIELD_SCALAR(fld, turret_scale_respawn) \
- FIELD_SCALAR(fld, volume) \
- FIELD_SCALAR(fld, wait) \
- FIELD_SCALAR(fld, warpzone_fadeend) \
- FIELD_SCALAR(fld, warpzone_fadestart) \
- FIELD_SCALAR(fld, weapon) \
- FIELD_SCALAR(fld, worldtype) \
- FIELD_VEC(fld, absmax) \
- FIELD_VEC(fld, absmin) \
- FIELD_VEC(fld, angles) \
- FIELD_VEC(fld, avelocity) \
- FIELD_VEC(fld, beam_color)\
- FIELD_VEC(fld, debrisavelocityjitter) \
- FIELD_VEC(fld, debrisvelocity) \
- FIELD_VEC(fld, debrisvelocityjitter) \
- FIELD_VEC(fld, color) \
- FIELD_VEC(fld, mangle) \
- FIELD_VEC(fld, maxs) \
- FIELD_VEC(fld, mins) \
- FIELD_VEC(fld, modelscale_vec) \
- FIELD_VEC(fld, velocity) \
- /**/
+ #define FIELDS_UNION(fld) FIELD_SCALAR(fld, Version) FIELD_SCALAR(fld, ammo_cells) FIELD_SCALAR(fld, ammo_nails) FIELD_SCALAR(fld, ammo_rockets) FIELD_SCALAR(fld, antiwall_flag) FIELD_SCALAR(fld, armorvalue) FIELD_SCALAR(fld, atten) FIELD_SCALAR(fld, bgmscriptdecay) FIELD_SCALAR(fld, bgmscriptsustain) FIELD_SCALAR(fld, bgmscript) FIELD_SCALAR(fld, button0) FIELD_SCALAR(fld, chmap) FIELD_SCALAR(fld, cnt) FIELD_SCALAR(fld, colormap) FIELD_SCALAR(fld, count) FIELD_SCALAR(fld, curvetarget) FIELD_SCALAR(fld, cvarfilter) FIELD_SCALAR(fld, debrisdamageforcescale) FIELD_SCALAR(fld, debrisfadetime) FIELD_SCALAR(fld, debrismovetype) FIELD_SCALAR(fld, debrisskin) FIELD_SCALAR(fld, debristimejitter) FIELD_SCALAR(fld, debristime) FIELD_SCALAR(fld, debris) FIELD_SCALAR(fld, delay) FIELD_SCALAR(fld, dmgtime) FIELD_SCALAR(fld, dmg) FIELD_SCALAR(fld, dmg_edge) FIELD_SCALAR(fld, dmg_force) FIELD_SCALAR(fld, dmg_radius) FIELD_SCALAR(fld, effects) FIELD_SCALAR(fld, falloff) FIELD_SCALAR(fld, flags) FIELD_SCALAR(fld, fog) FIELD_SCALAR(fld, frags) FIELD_SCALAR(fld, frame) FIELD_SCALAR(fld, gametype) FIELD_SCALAR(fld, gametypefilter) FIELD_SCALAR(fld, geomtype) FIELD_SCALAR(fld, gravity) FIELD_SCALAR(fld, health) FIELD_SCALAR(fld, height) FIELD_SCALAR(fld, impulse) FIELD_SCALAR(fld, killtarget) FIELD_SCALAR(fld, lerpfrac) FIELD_SCALAR(fld, light_lev) FIELD_SCALAR(fld, lip) FIELD_SCALAR(fld, loddistance1) FIELD_SCALAR(fld, lodmodel1) FIELD_SCALAR(fld, ltime) FIELD_SCALAR(fld, map) FIELD_SCALAR(fld, max_health) FIELD_SCALAR(fld, mdl) FIELD_SCALAR(fld, message2) FIELD_SCALAR(fld, message) FIELD_SCALAR(fld, modelindex) FIELD_SCALAR(fld, modelscale) FIELD_SCALAR(fld, model) FIELD_SCALAR(fld, monsterid) FIELD_SCALAR(fld, monster_moveflags) FIELD_SCALAR(fld, monster_name) FIELD_SCALAR(fld, movetype) FIELD_SCALAR(fld, move_movetype) FIELD_SCALAR(fld, netname) FIELD_SCALAR(fld, nextthink) FIELD_SCALAR(fld, noalign) FIELD_SCALAR(fld, noise1) FIELD_SCALAR(fld, noise2) FIELD_SCALAR(fld, noise3) FIELD_SCALAR(fld, noise) FIELD_SCALAR(fld, phase) FIELD_SCALAR(fld, platmovetype) FIELD_SCALAR(fld, race_place) FIELD_SCALAR(fld, radius) FIELD_SCALAR(fld, respawntimestart) FIELD_SCALAR(fld, respawntimejitter) FIELD_SCALAR(fld, respawntime) FIELD_SCALAR(fld, restriction) FIELD_SCALAR(fld, scale) FIELD_SCALAR(fld, skin) FIELD_SCALAR(fld, solid) FIELD_SCALAR(fld, sound1) FIELD_SCALAR(fld, sounds) FIELD_SCALAR(fld, spawnflags) FIELD_SCALAR(fld, spawnmob) FIELD_SCALAR(fld, speed) FIELD_SCALAR(fld, strength) FIELD_SCALAR(fld, style) FIELD_SCALAR(fld, target2) FIELD_SCALAR(fld, target3) FIELD_SCALAR(fld, target4) FIELD_SCALAR(fld, targetname) FIELD_SCALAR(fld, target) FIELD_SCALAR(fld, target_random) FIELD_SCALAR(fld, target_range) FIELD_SCALAR(fld, team) FIELD_SCALAR(fld, trigger_reverse) FIELD_SCALAR(fld, turret_scale_health) FIELD_SCALAR(fld, turret_scale_range) FIELD_SCALAR(fld, turret_scale_respawn) FIELD_SCALAR(fld, volume) FIELD_SCALAR(fld, wait) FIELD_SCALAR(fld, warpzone_fadeend) FIELD_SCALAR(fld, warpzone_fadestart) FIELD_SCALAR(fld, weapon) FIELD_SCALAR(fld, worldtype) FIELD_VEC(fld, absmax) FIELD_VEC(fld, absmin) FIELD_VEC(fld, angles) FIELD_VEC(fld, avelocity) FIELD_VEC(fld, beam_color) FIELD_VEC(fld, debrisavelocityjitter) FIELD_VEC(fld, debrisvelocity) FIELD_VEC(fld, debrisvelocityjitter) FIELD_VEC(fld, color) FIELD_VEC(fld, mangle) FIELD_VEC(fld, maxs) FIELD_VEC(fld, mins) FIELD_VEC(fld, modelscale_vec) FIELD_VEC(fld, velocity) /**/
ERASEABLE
void _checkWhitelisted(entity this, string id)
noref bool __spawnfunc_first;
-#define spawnfunc(id) \
- void __spawnfunc_##id(entity this); \
- ACCUMULATE void spawnfunc_##id(entity this) \
- { \
- if (!__spawnfunc_first) { \
- __spawnfunc_first = true; \
- static_init_early(); \
- } \
- bool dospawn = true; \
- if (__spawnfunc_expecting > 1) { __spawnfunc_expecting = 0; } \
- else if (__spawnfunc_expecting) { \
- /* engine call */ \
- if (!g_spawn_queue) { g_spawn_queue = IL_NEW(); } \
- __spawnfunc_expecting = 0; \
- this = __spawnfunc_expect; \
- __spawnfunc_expect = NULL; \
- dospawn = false; \
- } else { \
- /* userland call */ \
- assert(this); \
- } \
- if (!this.sourceLoc) { \
- this.sourceLoc = __FILE__":"STR(__LINE__); \
- } \
- if (!this.spawnfunc_checked) { \
- _checkWhitelisted(this, #id); \
- this.spawnfunc_checked = true; \
- if (this) { \
- /* not worldspawn, delay spawn */ \
- __spawnfunc_defer(this, __spawnfunc_##id); \
- } else { \
- /* world might not be "worldspawn" */ \
- this.__spawnfunc_constructor = __spawnfunc_##id; \
- } \
- } \
- if (dospawn) { __spawnfunc_##id(this); } \
- if (__spawnfunc_unreachable_workaround) return; \
- } \
- void __spawnfunc_##id(entity this)
+#define spawnfunc(id) void __spawnfunc_##id(entity this); ACCUMULATE void spawnfunc_##id(entity this) { if (!__spawnfunc_first) { __spawnfunc_first = true; static_init_early(); } bool dospawn = true; if (__spawnfunc_expecting > 1) { __spawnfunc_expecting = 0; } else if (__spawnfunc_expecting) { /* engine call */ if (!g_spawn_queue) { g_spawn_queue = IL_NEW(); } __spawnfunc_expecting = 0; this = __spawnfunc_expect; __spawnfunc_expect = NULL; dospawn = false; } else { /* userland call */ assert(this); } if (!this.sourceLoc) { this.sourceLoc = __FILE__":"STR(__LINE__); } if (!this.spawnfunc_checked) { _checkWhitelisted(this, #id); this.spawnfunc_checked = true; if (this) { /* not worldspawn, delay spawn */ __spawnfunc_defer(this, __spawnfunc_##id); } else { /* world might not be "worldspawn" */ this.__spawnfunc_constructor = __spawnfunc_##id; } } if (dospawn) { __spawnfunc_##id(this); } if (__spawnfunc_unreachable_workaround) return; } void __spawnfunc_##id(entity this)
#endif
LOG_TRACEF("[%f] %s", rt - g_starttime, s);
}
-#define _STATIC_INIT(func, where) \
- ACCUMULATE void _static_##func##profile() { profile(#func); } \
- ACCUMULATE_FUNCTION(where, _static_##func##profile) \
- ACCUMULATE void _static_##func(); \
- ACCUMULATE_FUNCTION(where, _static_##func) \
- void _static_##func()
+#define _STATIC_INIT(func, where) ACCUMULATE void _static_##func##profile() { profile(#func); } ACCUMULATE_FUNCTION(where, _static_##func##profile) ACCUMULATE void _static_##func(); ACCUMULATE_FUNCTION(where, _static_##func) void _static_##func()
/** before worldspawn */
#define STATIC_INIT_EARLY(func) _STATIC_INIT(func##_0, __static_init_0)
const int STATS_ENGINE_RESERVE = 32;
// must be listed in ascending order
-#define MAGIC_STATS(_, x) \
- _(x, MOVEVARS_TIMESCALE, 241) \
- /**/
+#define MAGIC_STATS(_, x) _(x, MOVEVARS_TIMESCALE, 241) /**/
int g_magic_stats_hole = 0;
-#define MAGIC_STATS_FIX_MANUAL(it, var, id) \
- if (it.registered_id == "STAT_" #var) { --g_magic_stats_hole; it.m_id = id; } else
+#define MAGIC_STATS_FIX_MANUAL(it, var, id) if (it.registered_id == "STAT_" #var) { --g_magic_stats_hole; it.m_id = id; } else
-#define MAGIC_STATS_FIX_AUTO(it, var, id) \
- if (it.m_id == id) { ++g_magic_stats_hole; ++it.m_id; }
+#define MAGIC_STATS_FIX_AUTO(it, var, id) if (it.m_id == id) { ++g_magic_stats_hole; ++it.m_id; }
-#define MAGIC_STATS_FIX(it) \
- it.m_id += g_magic_stats_hole; \
- MAGIC_STATS(MAGIC_STATS_FIX_MANUAL, it) { MAGIC_STATS(MAGIC_STATS_FIX_AUTO, it) }
+#define MAGIC_STATS_FIX(it) it.m_id += g_magic_stats_hole; MAGIC_STATS(MAGIC_STATS_FIX_MANUAL, it) { MAGIC_STATS(MAGIC_STATS_FIX_AUTO, it) }
#define REGISTER_STAT(...) EVAL_REGISTER_STAT(OVERLOAD(REGISTER_STAT, __VA_ARGS__))
#define EVAL_REGISTER_STAT(...) __VA_ARGS__
#define getstat_vectori(id) vec3(getstat_int(id + 0), getstat_int(id + 1), getstat_int(id + 2))
#define _STAT(id) g_stat_##id
- #define REGISTER_STAT_2(id, T) \
- T _STAT(id); \
- /* T CAT(_STAT(id), _prev); */ \
- REGISTER(Stats, STAT_##id, m_id, new_pure(stat)) \
- { \
- if (#T == "vector" || #T == "vectori") { \
- REGISTRY_RESERVE(Stats, m_id, STAT_##id, y); \
- REGISTRY_RESERVE(Stats, m_id, STAT_##id, z); \
- } \
- } \
- ACCUMULATE void stats_get() \
- { \
- T it = getstat_##T(STAT_##id.m_id); \
- /* if (it != CAT(_STAT(id), _prev)) \
- CAT(_STAT(id), _prev) = */ _STAT(id) = it; \
- }
+ #define REGISTER_STAT_2(id, T) T _STAT(id); /* T CAT(_STAT(id), _prev); */ REGISTER(Stats, STAT_##id, m_id, new_pure(stat)) { if (#T == "vector" || #T == "vectori") { REGISTRY_RESERVE(Stats, m_id, STAT_##id, y); REGISTRY_RESERVE(Stats, m_id, STAT_##id, z); } } ACCUMULATE void stats_get() { T it = getstat_##T(STAT_##id.m_id); /* if (it != CAT(_STAT(id), _prev)) CAT(_STAT(id), _prev) = */ _STAT(id) = it; }
#define REGISTER_STAT_3(x, T, expr) REGISTER_STAT_2(x, T)
#elif defined(SVQC)
/** Internal use only */
#define addstat_int(id, fld) addstat(id, AS_INT, fld)
#define addstat_bool(id, fld) addstat(id, AS_INT, fld)
#define addstat_float(id, fld) addstat(id, AS_FLOAT, fld)
- #define addstat_vector(id, fld) MACRO_BEGIN \
- addstat_float(id + 0, fld##_x); \
- addstat_float(id + 1, fld##_y); \
- addstat_float(id + 2, fld##_z); \
- MACRO_END
- #define addstat_vectori(id, fld) MACRO_BEGIN \
- addstat_int(id + 0, fld##_x); \
- addstat_int(id + 1, fld##_y); \
- addstat_int(id + 2, fld##_z); \
- MACRO_END
+ #define addstat_vector(id, fld) MACRO_BEGIN addstat_float(id + 0, fld##_x); addstat_float(id + 1, fld##_y); addstat_float(id + 2, fld##_z); MACRO_END
+ #define addstat_vectori(id, fld) MACRO_BEGIN addstat_int(id + 0, fld##_x); addstat_int(id + 1, fld##_y); addstat_int(id + 2, fld##_z); MACRO_END
const int AS_STRING = 1;
const int AS_INT = 2;
const int AS_FLOAT = 8;
}
#define _STAT(id) stat_##id
- #define REGISTER_STAT_2(id, T) \
- .T _STAT(id); \
- REGISTER(Stats, STAT_##id, m_id, new_pure(stat)) \
- { \
- if (#T == "vector" || #T == "vectori") { \
- REGISTRY_RESERVE(Stats, m_id, STAT_##id, y); \
- REGISTRY_RESERVE(Stats, m_id, STAT_##id, z); \
- } \
- } \
- ACCUMULATE void stats_add() \
- { \
- .T fld = _STAT(id); \
- addstat_##T(STAT_##id.m_id, fld); \
- }
+ #define REGISTER_STAT_2(id, T) .T _STAT(id); REGISTER(Stats, STAT_##id, m_id, new_pure(stat)) { if (#T == "vector" || #T == "vectori") { REGISTRY_RESERVE(Stats, m_id, STAT_##id, y); REGISTRY_RESERVE(Stats, m_id, STAT_##id, z); } } ACCUMULATE void stats_add() { .T fld = _STAT(id); addstat_##T(STAT_##id.m_id, fld); }
void GlobalStats_update(entity this) {}
/** TODO: do we want the global copy to update? */
- #define REGISTER_STAT_3(id, T, expr) \
- REGISTER_STAT_2(id, T); \
- ACCUMULATE void GlobalStats_update(entity this) { STAT(id, this) = (expr); } \
- STATIC_INIT(worldstat_##id) { entity this = STATS; STAT(id, this) = (expr); }
+ #define REGISTER_STAT_3(id, T, expr) REGISTER_STAT_2(id, T); ACCUMULATE void GlobalStats_update(entity this) { STAT(id, this) = (expr); } STATIC_INIT(worldstat_##id) { entity this = STATS; STAT(id, this) = (expr); }
#else
#define REGISTER_STAT_2(id, type)
#define REGISTER_STAT_3(id, T, expr)
}
#endif
-#define strcpy(this, s) MACRO_BEGIN \
- if (this) { \
- strunzone(this); \
- } \
- this = strzone(s); \
-MACRO_END
-
-#define strfree(this) MACRO_BEGIN \
- if (this) { \
- strunzone(this); \
- } \
- this = string_null; \
-MACRO_END
+#define strcpy(this, s) MACRO_BEGIN if (this) { strunzone(this); } this = strzone(s); MACRO_END
+
+#define strfree(this) MACRO_BEGIN if (this) { strunzone(this); } this = string_null; MACRO_END
ERASEABLE
string seconds_tostring(float sec)
// public:
/** Use UpperCamelCase for suite and test only */
-#define TEST(suite, test) \
- void _TEST_##suite##_##test(); \
- ACCUMULATE int TEST_RunAll_accumulated(int f) { \
- if (!TEST_Run(#suite "_" #test)) ++f; \
- return = f; \
- } \
- void _TEST_##suite##_##test()
+#define TEST(suite, test) void _TEST_##suite##_##test(); ACCUMULATE int TEST_RunAll_accumulated(int f) { if (!TEST_Run(#suite "_" #test)) ++f; return = f; } void _TEST_##suite##_##test()
/** Must be present at the end of a test */
#define SUCCEED() (TEST_ok = true)
/** Add a failure, but continue */
-#define ADD_FAILURE(msg) MACRO_BEGIN \
- ++TEST_failed; \
- LOG_WARN(msg); \
-MACRO_END
+#define ADD_FAILURE(msg) MACRO_BEGIN ++TEST_failed; LOG_WARN(msg); MACRO_END
/** Add a failure and return */
#define FAIL(msg) _TEST_ASSERT(ADD_FAILURE(msg))
// difference between expect/assert: assert returns early
-#define EXPECT_EQ(expected_, actual_) MACRO_BEGIN \
- int expected = expected_; \
- int actual = actual_; \
- if ((expected) != (actual)) { \
- ADD_FAILURE(sprintf( \
- "Value of: " #actual_ "\n" \
- " Actual: %d\n" \
- "Expected: %d\n", \
- actual, expected \
- )); \
- } \
-MACRO_END
+#define EXPECT_EQ(expected_, actual_) MACRO_BEGIN int expected = expected_; int actual = actual_; if ((expected) != (actual)) { ADD_FAILURE(sprintf( "Value of: " #actual_ "\n" " Actual: %d\n" "Expected: %d\n", actual, expected )); } MACRO_END
#define ASSERT_EQ(expected, actual) _TEST_ASSERT(EXPECT_EQ(expected, actual))
#define EXPECT_TRUE(condition) EXPECT_EQ(true, condition)
bool TEST_ok;
int TEST_failed;
-#define _TEST_ASSERT(statement) \
- MACRO_BEGIN \
- LAMBDA(statement); \
- ++TEST_fatal; return; \
- MACRO_END
-
-#define EXPECT_NO_FATAL_FAILURE__(statement, then) \
- MACRO_BEGIN \
- int TEST_prevfatal = TEST_fatal; \
- LAMBDA(statement); \
- if (TEST_fatal != TEST_prevfatal) \
- LAMBDA(then); \
- MACRO_END
-
-#define EXPECT_NO_FATAL_FAILURE_(statement, then) \
- EXPECT_NO_FATAL_FAILURE__(statement, { \
- LOG_WARNF( \
- " Actual: %d fatal failures\n" \
- "Expected: no fatal failures\n", \
- TEST_fatal - TEST_prevfatal \
- ); \
- LAMBDA(then); \
- })
+#define _TEST_ASSERT(statement) MACRO_BEGIN LAMBDA(statement); ++TEST_fatal; return; MACRO_END
+
+#define EXPECT_NO_FATAL_FAILURE__(statement, then) MACRO_BEGIN int TEST_prevfatal = TEST_fatal; LAMBDA(statement); if (TEST_fatal != TEST_prevfatal) LAMBDA(then); MACRO_END
+
+#define EXPECT_NO_FATAL_FAILURE_(statement, then) EXPECT_NO_FATAL_FAILURE__(statement, { LOG_WARNF( " Actual: %d fatal failures\n" "Expected: no fatal failures\n", TEST_fatal - TEST_prevfatal ); LAMBDA(then); })
#pragma once
#define reinterpret_cast(T, it) _unsafe_cast_##T(0, it)
-#define X(T) \
- T _unsafe_cast_##T(int dummy, ...) { return ...(0, T); } \
- USING(T##_fld, .T); T##_fld _unsafe_cast_##T##_fld(int dummy, ...) { return ...(0, T##_fld); }
+#define X(T) T _unsafe_cast_##T(int dummy, ...) { return ...(0, T); } USING(T##_fld, .T); T##_fld _unsafe_cast_##T##_fld(int dummy, ...) { return ...(0, T##_fld); }
X(bool)
X(int)
X(float)
#define dotproduct(a, b) ((a) * (b))
#else
noref vector _dotproduct_a, _dotproduct_b;
-#define dotproduct(a, b) \
- (_dotproduct_a = (a), _dotproduct_b = (b), \
- _dotproduct_a.x * _dotproduct_b.x \
- + _dotproduct_a.y * _dotproduct_b.y \
- + _dotproduct_a.z * _dotproduct_b.z)
+#define dotproduct(a, b) (_dotproduct_a = (a), _dotproduct_b = (b), _dotproduct_a.x * _dotproduct_b.x + _dotproduct_a.y * _dotproduct_b.y + _dotproduct_a.z * _dotproduct_b.z)
#endif
#if 1
#endif
noref vector _vmul_a, _vmul_b;
-#define vmul(a, b) \
- (_vmul_a = (a), _vmul_b = (b), \
- '1 0 0' * (_vmul_a.x * _vmul_b.x) \
- + '0 1 0' * (_vmul_a.y * _vmul_b.y) \
- + '0 0 1' * (_vmul_a.z * _vmul_b.z))
+#define vmul(a, b) (_vmul_a = (a), _vmul_b = (b), '1 0 0' * (_vmul_a.x * _vmul_b.x) + '0 1 0' * (_vmul_a.y * _vmul_b.y) + '0 0 1' * (_vmul_a.z * _vmul_b.z))
const vector eX = '1 0 0';
const vector eY = '0 1 0';
#define YAW(v) ((v).y)
#define ROLL(v) ((v).z)
-#define MAKEVECTORS(f, angles, forward, right, up) MACRO_BEGIN \
- f(angles); \
- forward = v_forward; \
- right = v_right; \
- up = v_up; \
-MACRO_END
+#define MAKEVECTORS(f, angles, forward, right, up) MACRO_BEGIN f(angles); forward = v_forward; right = v_right; up = v_up; MACRO_END
//pseudo prototypes:
// vector vec2(vector v); // returns a vector with just the x and y components of the given vector
return this;
}
-#define ClipVelocity(in, normal, out, overbounce) \
- (out = vec_epsilon(vec_reflect(in, normal, (overbounce) - 1), 0.1))
+#define ClipVelocity(in, normal, out, overbounce) (out = vec_epsilon(vec_reflect(in, normal, (overbounce) - 1), 0.1))
#ifdef GAMEQC
ERASEABLE
.float warpzone_teleport_finishtime;
.entity warpzone_teleport_zone;
-#define WarpZone_StoreProjectileData(e_) MACRO_BEGIN \
- entity e = e_; \
- e.warpzone_oldorigin = e.origin; \
- e.warpzone_oldvelocity = e.velocity; \
- e.warpzone_oldangles = e.angles; \
- MACRO_END
+#define WarpZone_StoreProjectileData(e_) MACRO_BEGIN entity e = e_; e.warpzone_oldorigin = e.origin; e.warpzone_oldvelocity = e.velocity; e.warpzone_oldangles = e.angles; MACRO_END
void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity)
{
#include "test.qh"
-#define yenc_single(c, ret) \
- MACRO_BEGIN \
- int conv = c; \
- conv += 42; \
- if (conv >= 256) conv -= 256; \
- switch (conv) \
- { \
- default: \
- { \
- string yenc_it = chr2str(conv); \
- ret = yenc_it; \
- break; \
- } \
- case 0: \
- case '\n': \
- case '\r': \
- case '=': \
- { \
- conv += 64; \
- string yenc_it = chr2str('=', conv); \
- ret = yenc_it; \
- break; \
- } \
- } \
- MACRO_END
+#define yenc_single(c, ret) MACRO_BEGIN int conv = c; conv += 42; if (conv >= 256) conv -= 256; switch (conv) { default: { string yenc_it = chr2str(conv); ret = yenc_it; break; } case 0: case '\n': case '\r': case '=': { conv += 64; string yenc_it = chr2str('=', conv); ret = yenc_it; break; } } MACRO_END
-#define ydec_single(stringiter, ret) \
- MACRO_BEGIN \
- int conv = STRING_ITERATOR_GET(stringiter); \
- if (conv <= 0) { \
- ret = -1; \
- } else { \
- if (conv == '=') { \
- conv = STRING_ITERATOR_GET(stringiter); \
- conv -= 64; \
- } \
- if (conv < 42) conv += 256; \
- conv -= 42; \
- ret = conv; \
- } \
- MACRO_END
+#define ydec_single(stringiter, ret) MACRO_BEGIN int conv = STRING_ITERATOR_GET(stringiter); if (conv <= 0) { ret = -1; } else { if (conv == '=') { conv = STRING_ITERATOR_GET(stringiter); conv -= 64; } if (conv < 42) conv += 256; conv -= 42; ret = conv; } MACRO_END
TEST(yEnc, EncodeDecode)
{
else
{
square = eX * theSize.y;
- drawsubpic(theOrigin, height + square, pic, '0 0 0', '0.25 1 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0.25 0 0', '0.5 1 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, height + square, pic, '0 0 0', '0.25 1 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0.25 0 0', '0.5 1 0', theColor, theAlpha, 0);
drawsubpic(theOrigin + width - square, height + square, pic, '0.75 0 0', '0.25 1 0', theColor, theAlpha, 0);
}
}
else
{
square = eY * theSize.x;
- drawsubpic(theOrigin, width + square, pic, '0 0 0', '1 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0 0.25 0', '1 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width + square, pic, '0 0 0', '1 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + square, theSize - 2 * square, pic, '0 0.25 0', '1 0.5 0', theColor, theAlpha, 0);
drawsubpic(theOrigin + height - square, width + square, pic, '0 0.75 0', '1 0.25 0', theColor, theAlpha, 0);
}
}
{
if(theBorderSize.y <= 0)
{
- drawsubpic(theOrigin, width + height, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width + height, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
}
else if(theSize.y <= theBorderSize.y * 2)
{
// not high enough... draw just top and bottom then
bH = eY * (0.25 * theSize.y / (theBorderSize.y * 2));
- drawsubpic(theOrigin, width + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + height * 0.5, width + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height * 0.5, width + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
}
else
{
dY = theBorderSize.y * eY;
- drawsubpic(theOrigin, width + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY, width + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + height - dY, width + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY, width + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height - dY, width + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
}
}
else if(theSize.x <= theBorderSize.x * 2)
bW = eX * (0.25 * theSize.x / (theBorderSize.x * 2));
if(theBorderSize.y <= 0)
{
- drawsubpic(theOrigin, width * 0.5 + height, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + width * 0.5, width * 0.5 + height, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width * 0.5 + height, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width * 0.5, width * 0.5 + height, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
}
else if(theSize.y <= theBorderSize.y * 2)
{
else
{
dY = theBorderSize.y * eY;
- drawsubpic(theOrigin, width * 0.5 + dY, pic, '0 0 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic, '0 0 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
- drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, width * 0.5 + dY, pic, '0 0 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic, '0 0 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0', '0 0.5 0' + bW, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0' + eX - bW, '0 0.5 0' + bW, theColor, theAlpha, 0);
drawsubpic(theOrigin + height - dY, width * 0.5 + dY, pic, '0 0.75 0', '0 0.25 0' + bW, theColor, theAlpha, 0);
drawsubpic(theOrigin + width * 0.5 + height - dY, width * 0.5 + dY, pic, '0 0.75 0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
}
if(theBorderSize.y <= 0)
{
dX = theBorderSize.x * eX;
- drawsubpic(theOrigin, dX + height, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX, width - 2 * dX + height, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + width - dX, dX + height, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, dX + height, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX, width - 2 * dX + height, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width - dX, dX + height, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
}
else if(theSize.y <= theBorderSize.y * 2)
{
// not high enough... draw just top and bottom then
bH = eY * (0.25 * theSize.y / (theBorderSize.y * 2));
dX = theBorderSize.x * eX;
- drawsubpic(theOrigin, dX + height * 0.5, pic, '0 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin, dX + height * 0.5, pic, '0 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic, '0.25 0 0', '0.5 0 0' + bH, theColor, theAlpha, 0);
drawsubpic(theOrigin + width - dX, dX + height * 0.5, pic, '0.75 0 0', '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic, '0 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic, '0 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5 0 0' + bH, theColor, theAlpha, 0);
drawsubpic(theOrigin + width - dX + height * 0.5, dX + height * 0.5, pic, '0.75 0 0' + eY - bH, '0.25 0 0' + bH, theColor, theAlpha, 0);
}
else
{
dX = theBorderSize.x * eX;
dY = theBorderSize.y * eY;
- drawsubpic(theOrigin, dX + dY, pic, '0 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + width - dX, dX + dY, pic, '0.75 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + height - dY, dX + dY, pic, '0 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
- drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin, dX + dY, pic, '0 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic, '0.25 0 0', '0.5 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + width - dX, dX + dY, pic, '0.75 0 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic, '0 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic, '0.75 0.25 0', '0.25 0.5 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height - dY, dX + dY, pic, '0 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
+ drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic, '0.25 0.75 0', '0.5 0.25 0', theColor, theAlpha, 0);
drawsubpic(theOrigin + height - dY + width - dX, dX + dY, pic, '0.75 0.75 0', '0.25 0.25 0', theColor, theAlpha, 0);
}
}
REGISTRY(Settings, BITS(3))
#define Settings_from(i) _Settings_from(i, NULL)
REGISTER_REGISTRY(Settings)
-#define REGISTER_SETTINGS(id, impl) \
- LAZY_NEW(id, impl) \
- REGISTER(Settings, MENU, id, m_id, NEW(Lazy, LAZY(id)))
+#define REGISTER_SETTINGS(id, impl) LAZY_NEW(id, impl) REGISTER(Settings, MENU, id, m_id, NEW(Lazy, LAZY(id)))
#endif
* return false;
* }
*/
-#define EV_Menu_ConsoleCommand(i, o) \
- /** command name */ i(string, cmd_name) \
- /** also, argv() can be used */ i(int, cmd_argc) \
- /** whole command, use only if you really have to */ i(string, cmd_string) \
- /**/
+#define EV_Menu_ConsoleCommand(i, o) /** command name */ i(string, cmd_name) /** also, argv() can be used */ i(int, cmd_argc) /** whole command, use only if you really have to */ i(string, cmd_string) /**/
MUTATOR_HOOKABLE(Menu_ConsoleCommand, EV_Menu_ConsoleCommand);
-#define EV_ConfigureDialogs(i, o) \
- /** main window entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ConfigureDialogs(i, o) /** main window entity */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ConfigureDialogs, EV_ConfigureDialogs);
#include "credits.qh"
-#define CREDITS(TITLE, FUNCTION, PERSON, PERSON_, NL) \
- TITLE(_("Core Team")) \
- PERSON(Rudolf "divVerent" Polzer) \
- PERSON(Ant "Antibody" Zucaro) \
- PERSON(Marvin "Mirio" Beck) \
- PERSON(Merlijn Hofstra) \
- PERSON(Peter "Morphed" Pielak) \
- PERSON(Ruszkai "CuBe0wL" Ákos) \
- PERSON(Samual "Ares" Lenks) \
- PERSON(TimePath) \
- PERSON(Tyler "-z-" Mulligan) \
- PERSON(Zac "Mario" Jardine) \
- NL() \
- TITLE(_("Extended Team")) \
- PERSON(AllieWay) \
- PERSON(Antonio "terencehill" Piu) \
- PERSON(Archer) \
- PERSON(BuddyFriendGuy) \
- PERSON(Debugger) \
- PERSON(Diomedes) \
- PERSON(Freddy) \
- PERSON(GATTS) \
- PERSON(Halogene) \
- PERSON(IDWMaster) \
- PERSON(Jan "zykure" Behrens) \
- PERSON(JH0nny) \
- PERSON(Jubilant) \
- PERSON(Łukasz "kuniu the frogg" Polek) \
- PERSON(martin-t) \
- PERSON(Matthias "matthiaskrgr" Krüger) \
- PERSON(Mattia "Melanosuchus" Basaglia) \
- PERSON(MrBougo) \
- PERSON(Nick "bitbomb" Lucca) \
- PERSON(nilyt/nyov) \
- PERSON(Nitroxis) \
- PERSON(packer) \
- PERSON(Pearce "theShadow" Michal) \
- PERSON(Rasmus "FruitieX" Eskola) \
- PERSON(s1lence) \
- PERSON(Severin "sev" Meyer) \
- PERSON(Soelen) \
- PERSON(Sydes) \
- PERSON(unfa) \
- NL() \
- NL() \
- FUNCTION(_("Website")) \
- PERSON(Ant "Antibody" Zucaro (web)) \
- PERSON(Merlijn Hofstra) \
- PERSON(Tyler "-z-" Mulligan (web / game)) \
- NL() \
- FUNCTION(_("Stats")) \
- PERSON(Ant "Antibody" Zucaro) \
- PERSON(Jan "zykure" Behrens) \
- NL() \
- FUNCTION(_("Art")) \
- PERSON(Severin "sev" Meyer) \
- PERSON(Sahil "DiaboliK" Singhal) \
- PERSON(Peter "Morphed" Pielak) \
- PERSON(Sam "LJFHutch" Hutchinson) \
- PERSON(Pearce "theShadow" Michal) \
- PERSON(KingPimpCommander) \
- NL() \
- FUNCTION(_("Animation")) \
- PERSON(Sahil "DiaboliK" Singhal) \
- PERSON(nifrek) \
- NL() \
- FUNCTION(_("Level Design")) \
- PERSON(Amadeusz "amade/proraide" Sławiński) \
- PERSON(Ben "MooKow" Banker) \
- PERSON(Cortez) \
- PERSON(Cuinn "Cuinnton" Herrick) \
- PERSON(Debugger) \
- PERSON(Hugo "Calinou" Locurcio) \
- PERSON(Jakob "tZork" Markström Gröhn) \
- PERSON(Konrad "Justin" Slawinski) \
- PERSON(Maddin) \
- PERSON(L0) \
- PERSON(Łukasz "kuniu the frogg" Polek) \
- PERSON(Maik "SavageX" Merten) \
- PERSON(Marvin "Mirio" Beck) \
- PERSON(MintOX) \
- PERSON(packer) \
- PERSON(Pearce "theShadow" Michal) \
- PERSON(Rasmus "FruitieX" Eskola) \
- PERSON(Ruszkai "CuBe0wL" Ákos) \
- PERSON(Severin "sev" Meyer) \
- PERSON(ShadoW) \
- PERSON(t0uYK8Ne) \
- NL() \
- FUNCTION(_("Music / Sound FX")) \
- PERSON(AquaNova (Archer)) \
- PERSON(blkrbt) \
- PERSON(chooksta) \
- PERSON(Independent.nu) \
- PERSON(Lea "TheAudioMonkey" Edwards) \
- PERSON([master]mind) \
- PERSON(Merlijn Hofstra) \
- PERSON(Mick Rippon) \
- PERSON(Nick "bitbomb" Lucca) \
- PERSON(remaxim) \
- PERSON(Saulo "mand1nga" Gil) \
- PERSON({SC0RP} - Ian "ID" Dorrell) \
- PERSON(Stephan) \
- PERSON(unfa) \
- NL() \
- FUNCTION(_("Game Code")) \
- PERSON(Samual "Ares" Lenks) \
- PERSON(Rudolf "divVerent" Polzer) \
- PERSON(Jakob "tZork" Markström Gröhn) \
- PERSON(Rasmus "FruitieX" Eskola) \
- PERSON(TimePath) \
- PERSON(Zac "Mario" Jardine) \
- NL() \
- FUNCTION(_("Marketing / PR")) \
- PERSON(Tyler "-z-" Mulligan) \
- PERSON(Ruszkai "CuBe0wL" Ákos) \
- PERSON(Samual "Ares" Lenks) \
- PERSON(Saulo "mand1nga" Gil) \
- NL() \
- FUNCTION(_("Legal")) \
- PERSON(Rudolf "divVerent" Polzer) \
- PERSON(Merlijn Hofstra) \
- NL() \
- NL() \
- TITLE(_("Game Engine")) \
- FUNCTION("DarkPlaces") \
- PERSON(Forest "LordHavoc" Hale) \
- NL() \
- FUNCTION(_("Engine Additions")) \
- PERSON(Rudolf "divVerent" Polzer) \
- PERSON(Samual "Ares" Lenks) \
- NL() \
- NL() \
- TITLE(_("Compiler")) \
- FUNCTION("GMQCC") \
- PERSON(Wolfgang "Blub\0" Bumiller) \
- PERSON(Dale "graphitemaster" Weiler) \
- NL() \
- NL() \
- TITLE(_("Other Active Contributors")) \
- PERSON(Jeff) \
- PERSON(Lyberta) \
- PERSON(Mircea "Taoki" Kitsune) \
- PERSON(Penguinum) \
- NL() \
- NL() \
- TITLE(_("Translators")) \
- NL() \
- FUNCTION(_("Asturian")) \
- PERSON(Llumex03) \
- PERSON(Tornes "Tornes.Llume" Ḷḷume) \
- PERSON(Ximielga) \
- NL() \
- FUNCTION(_("Belarusian")) \
- PERSON(Mihail "meequz" Varantsou) \
- NL() \
- FUNCTION(_("Bulgarian")) \
- PERSON(Alexander "alex4o" Bonin) \
- PERSON(ifohancroft) \
- PERSON(lokster) \
- PERSON(set_killer) \
- PERSON(ubone) \
- NL() \
- FUNCTION(_("Chinese (China)")) \
- PERSON(Antonidas) \
- PERSON(Armcoon) \
- PERSON(kalawore) \
- PERSON(sapphireliu) \
- NL() \
- FUNCTION(_("Chinese (Taiwan)")) \
- PERSON(Alisha) \
- PERSON(Armcoon) \
- PERSON(Jeff "s8321414" Huang) \
- NL() \
- FUNCTION(_("Cornish")) \
- PERSON(Nicky "nrowe" Rowe) \
- NL() \
- FUNCTION(_("Czech")) \
- PERSON(shogun assassin/woky) \
- PERSON(Superovoce) \
- PERSON(Tomáš "CZHeron" Volavka) \
- NL() \
- FUNCTION(_("Dutch")) \
- PERSON(Alexander "freefang" van Dam) \
- PERSON(Joeke "Mappack" de Graaf) \
- PERSON(Jonathan "Jonakeys" van der Steege) \
- PERSON(PinkRobot) \
- PERSON(vegiburger) \
- NL() \
- FUNCTION(_("English (Australia)")) \
- PERSON(Laurene "sunflowers" Albrand) \
- PERSON(Stuart "Cefiar" Young) \
- PERSON(Zac "Mario" Jardine) \
- NL() \
- FUNCTION(_("Finnish")) \
- PERSON(Jonas "PowaTree" Sahlberg) \
- PERSON(Henry "Exitium" Sanmark) \
- PERSON(Rasmus "FruitieX" Eskola) \
- NL() \
- FUNCTION(_("French")) \
- PERSON(Hugo "Calinou" Locurcio) \
- PERSON(Kim "coughingmouse" Lee) \
- PERSON(Maxime "Taximus" Paradis) \
- PERSON(RedGuff) \
- PERSON(Thomas "illwieckz" Debesse) \
- PERSON(Yannick "SpiKe" Le Guen) \
- NL() \
- FUNCTION(_("German")) \
- PERSON(Brot) \
- PERSON(cvcxc) \
- PERSON(Erik "Ablu" Schilling) \
- PERSON(Jope "Sless" Withers) \
- PERSON(Marvin "Mirio" Beck) \
- PERSON(Paul "Snapper") \
- PERSON(Rudolf "divVerent" Polzer) \
- PERSON(Wuzzy) \
- PERSON(Yepoleb) \
- NL() \
- FUNCTION(_("Greek")) \
- PERSON_("Γιάννης \"Evropi\" Ανθυμίδης") \
- PERSON(Konstantinos "LDinos" Mihalenas) \
- PERSON(Savoritias) \
- PERSON(Vindex) \
- NL() \
- FUNCTION(_("Hungarian")) \
- PERSON(Ruszkai "CuBe0wL" Ákos) \
- PERSON(xaN1C4n3) \
- NL() \
- FUNCTION(_("Irish")) \
- PERSON(Kevin "kscanne" Scannell) \
- NL() \
- FUNCTION(_("Italian")) \
- PERSON(Antonio "terencehill" Piu) \
- PERSON(Felice "MaidenBeast" Sallustio) \
- PERSON(stdi) \
- PERSON(XCostaX) \
- NL() \
- FUNCTION(_("Kazakh")) \
- PERSON("Артем "bystrov.arterm" Быстров") \
- NL() \
- FUNCTION(_("Korean")) \
- PERSON(Jisoo "s6e9x" Lim) \
- PERSON(Kim "coughingmouse" Lee) \
- NL() \
- FUNCTION(_("Polish")) \
- PERSON(4m) \
- PERSON(Alex "tiprogrammierer.alex" Progger) \
- PERSON(Amadeusz "amade/proraide" Sławiński) \
- PERSON(Artur "artur9010" Motyka) \
- PERSON(Jakub "KubeQ11" Pędziszewski) \
- PERSON(Kriss7475) \
- NL() \
- FUNCTION(_("Portuguese")) \
- PERSON(Ivan Paulos "greylica" Tomé) \
- PERSON(Jean Trindade "Muleke_Trairao" Pereira) \
- PERSON(Ricardo Manuel "Hellgardia" da Cruz Coelho da Silva) \
- PERSON(xXxCHAOTICxXx) \
- NL() \
- FUNCTION(_("Romanian")) \
- PERSON(Adrian-Ciprian "adrian.tinjala" Tînjală) \
- PERSON(BusterDBK) \
- PERSON(Mircea "Taoki" Kitsune) \
- PERSON(Sorin "unic_sorin" Botirla) \
- PERSON(Tudor "TropiKo" Ionel) \
- NL() \
- FUNCTION(_("Russian")) \
- PERSON(Alex "alextalker7" Talker) \
- PERSON(Alexandr "zrg") \
- PERSON(Andrei "adem4ik" Stepanov) \
- PERSON(Andrey "dekrY" P.) \
- PERSON(gravicappa) \
- PERSON(Hot Dog) \
- PERSON(Lord Canistra) \
- PERSON(Nikoli) \
- PERSON(Sergej "Clearness High" Lutsyk) \
- NL() \
- FUNCTION(_("Scottish Gaelic")) \
- PERSON_("GunChleoc") \
- NL() \
- FUNCTION(_("Serbian")) \
- PERSON_("Саша \"salepetronije\" Петровић") \
- PERSON(Marko M. Kostić) \
- PERSON(Pendulla) \
- PERSON(Rafael "Ristovski") \
- NL() \
- FUNCTION(_("Spanish")) \
- PERSON_("0000simon") \
- PERSON(Alan "aagp" Garcia) \
- PERSON(Ari_tent) \
- PERSON(brunodeleo) \
- PERSON(Kammy) \
- PERSON(roader_gentoo) \
- PERSON(Rodrigo Mouton Laudin) \
- PERSON(SouL) \
- PERSON(Starfire24680) \
- NL() \
- FUNCTION(_("Swedish")) \
- PERSON(Karl-Oskar "machine" Rikås) \
- PERSON(marcus256) \
- NL() \
- FUNCTION(_("Ukrainian")) \
- PERSON(Dmitro "Gamebot" Sokhin) \
- PERSON(Oleh "BlaXpirit" Prypin) \
- PERSON(Vasyl "Harmata" Melnyk) \
- PERSON(Yuriy "herrniemand" Ackermann) \
- NL() \
- NL() \
- TITLE(_("Past Contributors")) \
- PERSON(Akari) \
- PERSON(Alexander "naryl" Suhoverhov) \
- PERSON(Alexander "motorsep" Zubov) \
- PERSON(Amos "torus" Dudley) \
- PERSON(Andreas "Black" Kirsch) \
- PERSON(Attila "WW3" Houtkooper) \
- PERSON(BigMac) \
- PERSON(Braden "meoblast001" Walters) \
- PERSON(Brain Younds) \
- PERSON(Chris "amethyst7" Matz) \
- PERSON(Christian Ice) \
- PERSON(Clinton "Kaziganthe" Freeman) \
- PERSON(Dan "Digger" Korostelev) \
- PERSON(Dan "Wazat" Hale) \
- PERSON(Dokujisan) \
- PERSON(Donkey) \
- PERSON(dstrek) \
- PERSON(Dustin Geeraert) \
- PERSON(Edgenetwork) \
- PERSON(Edward "Ed" Holness) \
- PERSON(Eric "Munyul Verminard" Sambach) \
- PERSON(Erik "Ablu" Schilling) \
- PERSON(Fabien "H. Reaper" Tschirhart) \
- PERSON(Florian Paul "lda17h" Schmidt) \
- PERSON(FrikaC) \
- PERSON(Garth "Zombie" Hendy) \
- PERSON(Gerd "Elysis" Raudenbusch) \
- PERSON(Gottfried "Toddd" Hofmann) \
- PERSON(Henning "Tymo" Janssen) \
- PERSON(Innovati) \
- PERSON(Jitspoe) \
- PERSON(Jody Gallagher) \
- PERSON(Jope "Sless" Withers) \
- PERSON(Juergen "LowDragon" Timm) \
- PERSON(KadaverJack) \
- PERSON(Kevin "Tyrann" Shanahan) \
- PERSON(Kristian "morfar" Johansson) \
- PERSON(Kurt Dereli) \
- PERSON(lcatlnx) \
- PERSON(Lee David Ash) \
- PERSON(Lee Vermeulen) \
- PERSON(leileilol) \
- PERSON(magorian) \
- PERSON(Marius "GreEn`mArine" Shekow) \
- PERSON(Marko "Urre" Permanto) \
- PERSON(Mathieu "Elric" Olivier) \
- PERSON(Mattrew "Tronyn" Rye) \
- PERSON(MauveBib) \
- PERSON(Mephisto) \
- PERSON(michaelb) \
- PERSON(Michael "Tenshihan" Quinn) \
- PERSON(Mepper) \
- PERSON(Munyul) \
- PERSON(Netzwerg) \
- PERSON(NoelCower) \
- PERSON(Parapraxis) \
- PERSON(parasti) \
- PERSON(Paul "Strahlemann" Evers) \
- PERSON(Paul Scott) \
- PERSON(Petithomme) \
- PERSON(PlasmaSheep) \
- PERSON(Przemysław "atheros" Grzywacz) \
- PERSON(Q1 Retexturing Project) \
- PERSON(Qantourisc) \
- PERSON(Oleh "BlaXpirit" Prypin) \
- PERSON(Rick "Rat" Kelley) \
- PERSON(Robert "ai" Kuroto) \
- PERSON(Ronan) \
- PERSON(Sajt) \
- PERSON(Saulo "mand1nga" Gil) \
- PERSON(Shaggy) \
- PERSON(Shank) \
- PERSON(Simon O’Callaghan) \
- PERSON(SomeGuy) \
- PERSON(SoulKeeper_p) \
- PERSON(Spike) \
- PERSON(Spirit) \
- PERSON(Stephan "esteel" Stahl) \
- PERSON(Steve Vermeulen) \
- PERSON(Supajoe) \
- PERSON(Tei) \
- PERSON(The player with the unnecessarily long name) \
- PERSON(Tomaz) \
- PERSON(Ulrich Galbraith) \
- PERSON(Vortex) \
- PERSON(William Libert) \
- PERSON(William "Willis" Weilep) \
- PERSON(Yves "EviLair" Allaire) \
- PERSON(Zenex) \
- /**/
+#define CREDITS(TITLE, FUNCTION, PERSON, PERSON_, NL) TITLE(_("Core Team")) PERSON(Rudolf "divVerent" Polzer) PERSON(Ant "Antibody" Zucaro) PERSON(Marvin "Mirio" Beck) PERSON(Merlijn Hofstra) PERSON(Peter "Morphed" Pielak) PERSON(Ruszkai "CuBe0wL" Ákos) PERSON(Samual "Ares" Lenks) PERSON(TimePath) PERSON(Tyler "-z-" Mulligan) PERSON(Zac "Mario" Jardine) NL() TITLE(_("Extended Team")) PERSON(AllieWay) PERSON(Antonio "terencehill" Piu) PERSON(Archer) PERSON(BuddyFriendGuy) PERSON(Debugger) PERSON(Diomedes) PERSON(Freddy) PERSON(GATTS) PERSON(Halogene) PERSON(IDWMaster) PERSON(Jan "zykure" Behrens) PERSON(JH0nny) PERSON(Jubilant) PERSON(Łukasz "kuniu the frogg" Polek) PERSON(martin-t) PERSON(Matthias "matthiaskrgr" Krüger) PERSON(Mattia "Melanosuchus" Basaglia) PERSON(MrBougo) PERSON(Nick "bitbomb" Lucca) PERSON(nilyt/nyov) PERSON(Nitroxis) PERSON(packer) PERSON(Pearce "theShadow" Michal) PERSON(Rasmus "FruitieX" Eskola) PERSON(s1lence) PERSON(Severin "sev" Meyer) PERSON(Soelen) PERSON(Sydes) PERSON(unfa) NL() NL() FUNCTION(_("Website")) PERSON(Ant "Antibody" Zucaro (web)) PERSON(Merlijn Hofstra) PERSON(Tyler "-z-" Mulligan (web / game)) NL() FUNCTION(_("Stats")) PERSON(Ant "Antibody" Zucaro) PERSON(Jan "zykure" Behrens) NL() FUNCTION(_("Art")) PERSON(Severin "sev" Meyer) PERSON(Sahil "DiaboliK" Singhal) PERSON(Peter "Morphed" Pielak) PERSON(Sam "LJFHutch" Hutchinson) PERSON(Pearce "theShadow" Michal) PERSON(KingPimpCommander) NL() FUNCTION(_("Animation")) PERSON(Sahil "DiaboliK" Singhal) PERSON(nifrek) NL() FUNCTION(_("Level Design")) PERSON(Amadeusz "amade/proraide" Sławiński) PERSON(Ben "MooKow" Banker) PERSON(Cortez) PERSON(Cuinn "Cuinnton" Herrick) PERSON(Debugger) PERSON(Hugo "Calinou" Locurcio) PERSON(Jakob "tZork" Markström Gröhn) PERSON(Konrad "Justin" Slawinski) PERSON(Maddin) PERSON(L0) PERSON(Łukasz "kuniu the frogg" Polek) PERSON(Maik "SavageX" Merten) PERSON(Marvin "Mirio" Beck) PERSON(MintOX) PERSON(packer) PERSON(Pearce "theShadow" Michal) PERSON(Rasmus "FruitieX" Eskola) PERSON(Ruszkai "CuBe0wL" Ákos) PERSON(Severin "sev" Meyer) PERSON(ShadoW) PERSON(t0uYK8Ne) NL() FUNCTION(_("Music / Sound FX")) PERSON(AquaNova (Archer)) PERSON(blkrbt) PERSON(chooksta) PERSON(Independent.nu) PERSON(Lea "TheAudioMonkey" Edwards) PERSON([master]mind) PERSON(Merlijn Hofstra) PERSON(Mick Rippon) PERSON(Nick "bitbomb" Lucca) PERSON(remaxim) PERSON(Saulo "mand1nga" Gil) PERSON({SC0RP} - Ian "ID" Dorrell) PERSON(Stephan) PERSON(unfa) NL() FUNCTION(_("Game Code")) PERSON(Samual "Ares" Lenks) PERSON(Rudolf "divVerent" Polzer) PERSON(Jakob "tZork" Markström Gröhn) PERSON(Rasmus "FruitieX" Eskola) PERSON(TimePath) PERSON(Zac "Mario" Jardine) NL() FUNCTION(_("Marketing / PR")) PERSON(Tyler "-z-" Mulligan) PERSON(Ruszkai "CuBe0wL" Ákos) PERSON(Samual "Ares" Lenks) PERSON(Saulo "mand1nga" Gil) NL() FUNCTION(_("Legal")) PERSON(Rudolf "divVerent" Polzer) PERSON(Merlijn Hofstra) NL() NL() TITLE(_("Game Engine")) FUNCTION("DarkPlaces") PERSON(Forest "LordHavoc" Hale) NL() FUNCTION(_("Engine Additions")) PERSON(Rudolf "divVerent" Polzer) PERSON(Samual "Ares" Lenks) NL() NL() TITLE(_("Compiler")) FUNCTION("GMQCC") PERSON(Wolfgang "Blub\0" Bumiller) PERSON(Dale "graphitemaster" Weiler) NL() NL() TITLE(_("Other Active Contributors")) PERSON(Jeff) PERSON(Lyberta) PERSON(Mircea "Taoki" Kitsune) PERSON(Penguinum) NL() NL() TITLE(_("Translators")) NL() FUNCTION(_("Asturian")) PERSON(Llumex03) PERSON(Tornes "Tornes.Llume" Ḷḷume) PERSON(Ximielga) NL() FUNCTION(_("Belarusian")) PERSON(Mihail "meequz" Varantsou) NL() FUNCTION(_("Bulgarian")) PERSON(Alexander "alex4o" Bonin) PERSON(ifohancroft) PERSON(lokster) PERSON(set_killer) PERSON(ubone) NL() FUNCTION(_("Chinese (China)")) PERSON(Antonidas) PERSON(Armcoon) PERSON(kalawore) PERSON(sapphireliu) NL() FUNCTION(_("Chinese (Taiwan)")) PERSON(Alisha) PERSON(Armcoon) PERSON(Jeff "s8321414" Huang) NL() FUNCTION(_("Cornish")) PERSON(Nicky "nrowe" Rowe) NL() FUNCTION(_("Czech")) PERSON(shogun assassin/woky) PERSON(Superovoce) PERSON(Tomáš "CZHeron" Volavka) NL() FUNCTION(_("Dutch")) PERSON(Alexander "freefang" van Dam) PERSON(Joeke "Mappack" de Graaf) PERSON(Jonathan "Jonakeys" van der Steege) PERSON(PinkRobot) PERSON(vegiburger) NL() FUNCTION(_("English (Australia)")) PERSON(Laurene "sunflowers" Albrand) PERSON(Stuart "Cefiar" Young) PERSON(Zac "Mario" Jardine) NL() FUNCTION(_("Finnish")) PERSON(Jonas "PowaTree" Sahlberg) PERSON(Henry "Exitium" Sanmark) PERSON(Rasmus "FruitieX" Eskola) NL() FUNCTION(_("French")) PERSON(Hugo "Calinou" Locurcio) PERSON(Kim "coughingmouse" Lee) PERSON(Maxime "Taximus" Paradis) PERSON(RedGuff) PERSON(Thomas "illwieckz" Debesse) PERSON(Yannick "SpiKe" Le Guen) NL() FUNCTION(_("German")) PERSON(Brot) PERSON(cvcxc) PERSON(Erik "Ablu" Schilling) PERSON(Jope "Sless" Withers) PERSON(Marvin "Mirio" Beck) PERSON(Paul "Snapper") PERSON(Rudolf "divVerent" Polzer) PERSON(Wuzzy) PERSON(Yepoleb) NL() FUNCTION(_("Greek")) PERSON_("Γιάννης \"Evropi\" Ανθυμίδης") PERSON(Konstantinos "LDinos" Mihalenas) PERSON(Savoritias) PERSON(Vindex) NL() FUNCTION(_("Hungarian")) PERSON(Ruszkai "CuBe0wL" Ákos) PERSON(xaN1C4n3) NL() FUNCTION(_("Irish")) PERSON(Kevin "kscanne" Scannell) NL() FUNCTION(_("Italian")) PERSON(Antonio "terencehill" Piu) PERSON(Felice "MaidenBeast" Sallustio) PERSON(stdi) PERSON(XCostaX) NL() FUNCTION(_("Kazakh")) PERSON("Артем "bystrov.arterm" Быстров") NL() FUNCTION(_("Korean")) PERSON(Jisoo "s6e9x" Lim) PERSON(Kim "coughingmouse" Lee) NL() FUNCTION(_("Polish")) PERSON(4m) PERSON(Alex "tiprogrammierer.alex" Progger) PERSON(Amadeusz "amade/proraide" Sławiński) PERSON(Artur "artur9010" Motyka) PERSON(Jakub "KubeQ11" Pędziszewski) PERSON(Kriss7475) NL() FUNCTION(_("Portuguese")) PERSON(Ivan Paulos "greylica" Tomé) PERSON(Jean Trindade "Muleke_Trairao" Pereira) PERSON(Ricardo Manuel "Hellgardia" da Cruz Coelho da Silva) PERSON(xXxCHAOTICxXx) NL() FUNCTION(_("Romanian")) PERSON(Adrian-Ciprian "adrian.tinjala" Tînjală) PERSON(BusterDBK) PERSON(Mircea "Taoki" Kitsune) PERSON(Sorin "unic_sorin" Botirla) PERSON(Tudor "TropiKo" Ionel) NL() FUNCTION(_("Russian")) PERSON(Alex "alextalker7" Talker) PERSON(Alexandr "zrg") PERSON(Andrei "adem4ik" Stepanov) PERSON(Andrey "dekrY" P.) PERSON(gravicappa) PERSON(Hot Dog) PERSON(Lord Canistra) PERSON(Nikoli) PERSON(Sergej "Clearness High" Lutsyk) NL() FUNCTION(_("Scottish Gaelic")) PERSON_("GunChleoc") NL() FUNCTION(_("Serbian")) PERSON_("Саша \"salepetronije\" Петровић") PERSON(Marko M. Kostić) PERSON(Pendulla) PERSON(Rafael "Ristovski") NL() FUNCTION(_("Spanish")) PERSON_("0000simon") PERSON(Alan "aagp" Garcia) PERSON(Ari_tent) PERSON(brunodeleo) PERSON(Kammy) PERSON(roader_gentoo) PERSON(Rodrigo Mouton Laudin) PERSON(SouL) PERSON(Starfire24680) NL() FUNCTION(_("Swedish")) PERSON(Karl-Oskar "machine" Rikås) PERSON(marcus256) NL() FUNCTION(_("Ukrainian")) PERSON(Dmitro "Gamebot" Sokhin) PERSON(Oleh "BlaXpirit" Prypin) PERSON(Vasyl "Harmata" Melnyk) PERSON(Yuriy "herrniemand" Ackermann) NL() NL() TITLE(_("Past Contributors")) PERSON(Akari) PERSON(Alexander "naryl" Suhoverhov) PERSON(Alexander "motorsep" Zubov) PERSON(Amos "torus" Dudley) PERSON(Andreas "Black" Kirsch) PERSON(Attila "WW3" Houtkooper) PERSON(BigMac) PERSON(Braden "meoblast001" Walters) PERSON(Brain Younds) PERSON(Chris "amethyst7" Matz) PERSON(Christian Ice) PERSON(Clinton "Kaziganthe" Freeman) PERSON(Dan "Digger" Korostelev) PERSON(Dan "Wazat" Hale) PERSON(Dokujisan) PERSON(Donkey) PERSON(dstrek) PERSON(Dustin Geeraert) PERSON(Edgenetwork) PERSON(Edward "Ed" Holness) PERSON(Eric "Munyul Verminard" Sambach) PERSON(Erik "Ablu" Schilling) PERSON(Fabien "H. Reaper" Tschirhart) PERSON(Florian Paul "lda17h" Schmidt) PERSON(FrikaC) PERSON(Garth "Zombie" Hendy) PERSON(Gerd "Elysis" Raudenbusch) PERSON(Gottfried "Toddd" Hofmann) PERSON(Henning "Tymo" Janssen) PERSON(Innovati) PERSON(Jitspoe) PERSON(Jody Gallagher) PERSON(Jope "Sless" Withers) PERSON(Juergen "LowDragon" Timm) PERSON(KadaverJack) PERSON(Kevin "Tyrann" Shanahan) PERSON(Kristian "morfar" Johansson) PERSON(Kurt Dereli) PERSON(lcatlnx) PERSON(Lee David Ash) PERSON(Lee Vermeulen) PERSON(leileilol) PERSON(magorian) PERSON(Marius "GreEn`mArine" Shekow) PERSON(Marko "Urre" Permanto) PERSON(Mathieu "Elric" Olivier) PERSON(Mattrew "Tronyn" Rye) PERSON(MauveBib) PERSON(Mephisto) PERSON(michaelb) PERSON(Michael "Tenshihan" Quinn) PERSON(Mepper) PERSON(Munyul) PERSON(Netzwerg) PERSON(NoelCower) PERSON(Parapraxis) PERSON(parasti) PERSON(Paul "Strahlemann" Evers) PERSON(Paul Scott) PERSON(Petithomme) PERSON(PlasmaSheep) PERSON(Przemysław "atheros" Grzywacz) PERSON(Q1 Retexturing Project) PERSON(Qantourisc) PERSON(Oleh "BlaXpirit" Prypin) PERSON(Rick "Rat" Kelley) PERSON(Robert "ai" Kuroto) PERSON(Ronan) PERSON(Sajt) PERSON(Saulo "mand1nga" Gil) PERSON(Shaggy) PERSON(Shank) PERSON(Simon O’Callaghan) PERSON(SomeGuy) PERSON(SoulKeeper_p) PERSON(Spike) PERSON(Spirit) PERSON(Stephan "esteel" Stahl) PERSON(Steve Vermeulen) PERSON(Supajoe) PERSON(Tei) PERSON(The player with the unnecessarily long name) PERSON(Tomaz) PERSON(Ulrich Galbraith) PERSON(Vortex) PERSON(William Libert) PERSON(William "Willis" Weilep) PERSON(Yves "EviLair" Allaire) PERSON(Zenex) /**/
int credits_get()
{
{
KeyBinds_Count = 0;
- #define KEYBIND_DEF(func, desc) MACRO_BEGIN \
- if((KeyBinds_Count < MAX_KEYBINDS)) { \
- KeyBinds_Functions[KeyBinds_Count] = strzone(func); \
- KeyBinds_Descriptions[KeyBinds_Count] = strzone(desc); \
- ++KeyBinds_Count; \
- } \
- MACRO_END
+ #define KEYBIND_DEF(func, desc) MACRO_BEGIN if((KeyBinds_Count < MAX_KEYBINDS)) { KeyBinds_Functions[KeyBinds_Count] = strzone(func); KeyBinds_Descriptions[KeyBinds_Count] = strzone(desc); ++KeyBinds_Count; } MACRO_END
KEYBIND_DEF("" , _("Moving"));
KEYBIND_DEF("+forward" , _("forward"));
int i;
- #define ADD_TO_W_LIST(pred) \
- FOREACH(Weapons, it != WEP_Null, { \
- if (it.impulse != imp) continue; \
- if (!(pred)) continue; \
- w_list = strcat(w_list, it.m_name, " / "); \
- })
+ #define ADD_TO_W_LIST(pred) FOREACH(Weapons, it != WEP_Null, { if (it.impulse != imp) continue; if (!(pred)) continue; w_list = strcat(w_list, it.m_name, " / "); })
for(int imp = 1; imp <= 9; ++imp)
{
p.resizeNotify(p, relOrigin, relSize, absOrigin, absSize);
}
-#define X(mouseFunc) \
-METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) \
-{ \
- SUPER(XonoticScrollPanel).mouseFunc(this, pos); \
- XonoticTab p = this.currentPanel; \
- this.setFocus(this, p); \
- \
- vector o = -eY * this.scrollPos; \
- vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
- return p.mouseFunc(p, globalToBox(pos, o, s)); \
-}
+#define X(mouseFunc) METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) { SUPER(XonoticScrollPanel).mouseFunc(this, pos); XonoticTab p = this.currentPanel; this.setFocus(this, p); vector o = -eY * this.scrollPos; vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; return p.mouseFunc(p, globalToBox(pos, o, s)); }
X(mouseMove)
X(mousePress)
X(mouseDrag)
X(mouseRelease)
#undef X
-#define X(keyFunc) \
-METHOD(XonoticScrollPanel, keyFunc, bool(XonoticScrollPanel this, int key, int ascii, bool shift)) \
-{ \
- XonoticTab p = this.currentPanel; \
- return p.keyFunc(p, key, ascii, shift) || SUPER(XonoticScrollPanel).keyFunc(this, key, ascii, shift); \
-}
+#define X(keyFunc) METHOD(XonoticScrollPanel, keyFunc, bool(XonoticScrollPanel this, int key, int ascii, bool shift)) { XonoticTab p = this.currentPanel; return p.keyFunc(p, key, ascii, shift) || SUPER(XonoticScrollPanel).keyFunc(this, key, ascii, shift); }
X(keyDown)
X(keyUp)
#undef X
void RegisterSLCategories()
{
entity cat;
- #define SLIST_CATEGORY(name,enoverride,dioverride,str) \
- SET_FIELD_COUNT(name, CATEGORY_FIRST, category_ent_count) \
- CHECK_MAX_COUNT(name, MAX_CATEGORIES, category_ent_count, "SLIST_CATEGORY") \
- cat = categories[name - 1] = new(slist_category); \
- cat.cat_name = #name; \
- cat.cat_enoverride_string = strzone(SLIST_CATEGORY_AUTOCVAR(name)); \
- cat.cat_dioverride_string = strzone(dioverride); \
- cat.cat_string = strzone(str);
+ #define SLIST_CATEGORY(name,enoverride,dioverride,str) SET_FIELD_COUNT(name, CATEGORY_FIRST, category_ent_count) CHECK_MAX_COUNT(name, MAX_CATEGORIES, category_ent_count, "SLIST_CATEGORY") cat = categories[name - 1] = new(slist_category); cat.cat_name = #name; cat.cat_enoverride_string = strzone(SLIST_CATEGORY_AUTOCVAR(name)); cat.cat_dioverride_string = strzone(dioverride); cat.cat_string = strzone(str);
SLIST_CATEGORIES
#undef SLIST_CATEGORY
vector oldscale = draw_scale;
vector oldshift = draw_shift;
-#define SET_YRANGE(start,end) \
- draw_scale = boxToGlobalSize(eX + eY * (end - start), oldscale); \
- draw_shift = boxToGlobal(eY * start, oldshift, oldscale);
+#define SET_YRANGE(start,end) draw_scale = boxToGlobalSize(eX + eY * (end - start), oldscale); draw_shift = boxToGlobal(eY * start, oldshift, oldscale);
for (j = 0; j < category_draw_count; ++j) {
// Matches exactly the headings with increased height.
void ServerList_Info_Click(entity btn, entity me);
// server cache fields
-#define SLIST_FIELDS \
- SLIST_FIELD(CNAME, "cname") \
- SLIST_FIELD(PING, "ping") \
- SLIST_FIELD(GAME, "game") \
- SLIST_FIELD(MOD, "mod") \
- SLIST_FIELD(MAP, "map") \
- SLIST_FIELD(NAME, "name") \
- SLIST_FIELD(MAXPLAYERS, "maxplayers") \
- SLIST_FIELD(NUMPLAYERS, "numplayers") \
- SLIST_FIELD(NUMHUMANS, "numhumans") \
- SLIST_FIELD(NUMBOTS, "numbots") \
- SLIST_FIELD(PROTOCOL, "protocol") \
- SLIST_FIELD(FREESLOTS, "freeslots") \
- SLIST_FIELD(PLAYERS, "players") \
- SLIST_FIELD(QCSTATUS, "qcstatus") \
- SLIST_FIELD(CATEGORY, "category") \
- SLIST_FIELD(ISFAVORITE, "isfavorite")
+#define SLIST_FIELDS SLIST_FIELD(CNAME, "cname") SLIST_FIELD(PING, "ping") SLIST_FIELD(GAME, "game") SLIST_FIELD(MOD, "mod") SLIST_FIELD(MAP, "map") SLIST_FIELD(NAME, "name") SLIST_FIELD(MAXPLAYERS, "maxplayers") SLIST_FIELD(NUMPLAYERS, "numplayers") SLIST_FIELD(NUMHUMANS, "numhumans") SLIST_FIELD(NUMBOTS, "numbots") SLIST_FIELD(PROTOCOL, "protocol") SLIST_FIELD(FREESLOTS, "freeslots") SLIST_FIELD(PLAYERS, "players") SLIST_FIELD(QCSTATUS, "qcstatus") SLIST_FIELD(CATEGORY, "category") SLIST_FIELD(ISFAVORITE, "isfavorite")
#define SLIST_FIELD(suffix,name) float SLIST_FIELD_##suffix;
SLIST_FIELDS
int category_item[MAX_CATEGORIES];
int category_draw_count;
-#define SLIST_CATEGORIES \
- SLIST_CATEGORY(CAT_FAVORITED, "", "", CTX(_("SLCAT^Favorites"))) \
- SLIST_CATEGORY(CAT_RECOMMENDED, "", "", CTX(_("SLCAT^Recommended"))) \
- SLIST_CATEGORY(CAT_NORMAL, "", "CAT_SERVERS", CTX(_("SLCAT^Normal Servers"))) \
- SLIST_CATEGORY(CAT_SERVERS, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Servers"))) \
- SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Competitive Mode"))) \
- SLIST_CATEGORY(CAT_MODIFIED, "", "CAT_SERVERS", CTX(_("SLCAT^Modified Servers"))) \
- SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", CTX(_("SLCAT^Overkill"))) \
- SLIST_CATEGORY(CAT_INSTAGIB, "", "CAT_SERVERS", CTX(_("SLCAT^InstaGib"))) \
- SLIST_CATEGORY(CAT_DEFRAG, "", "CAT_SERVERS", CTX(_("SLCAT^Defrag Mode")))
+#define SLIST_CATEGORIES SLIST_CATEGORY(CAT_FAVORITED, "", "", CTX(_("SLCAT^Favorites"))) SLIST_CATEGORY(CAT_RECOMMENDED, "", "", CTX(_("SLCAT^Recommended"))) SLIST_CATEGORY(CAT_NORMAL, "", "CAT_SERVERS", CTX(_("SLCAT^Normal Servers"))) SLIST_CATEGORY(CAT_SERVERS, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Servers"))) SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Competitive Mode"))) SLIST_CATEGORY(CAT_MODIFIED, "", "CAT_SERVERS", CTX(_("SLCAT^Modified Servers"))) SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", CTX(_("SLCAT^Overkill"))) SLIST_CATEGORY(CAT_INSTAGIB, "", "CAT_SERVERS", CTX(_("SLCAT^InstaGib"))) SLIST_CATEGORY(CAT_DEFRAG, "", "CAT_SERVERS", CTX(_("SLCAT^Defrag Mode")))
#define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override
-#define SLIST_CATEGORY(name,enoverride,dioverride,str) \
- int name; \
- string SLIST_CATEGORY_AUTOCVAR(name) = enoverride;
+#define SLIST_CATEGORY(name,enoverride,dioverride,str) int name; string SLIST_CATEGORY_AUTOCVAR(name) = enoverride;
SLIST_CATEGORIES
#undef SLIST_CATEGORY
}
// note: include only those that should be in the menu!
-#define GAMETYPES \
- GAMETYPE(MAPINFO_TYPE_DEATHMATCH) \
- GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH) \
- GAMETYPE(MAPINFO_TYPE_CTF) \
- GAMETYPE(MAPINFO_TYPE_CA) \
- GAMETYPE(MAPINFO_TYPE_FREEZETAG) \
- GAMETYPE(MAPINFO_TYPE_KEEPAWAY) \
- GAMETYPE(MAPINFO_TYPE_KEYHUNT) \
- GAMETYPE(MAPINFO_TYPE_LMS) \
- GAMETYPE(MAPINFO_TYPE_DOMINATION) \
- GAMETYPE(MAPINFO_TYPE_NEXBALL) \
- GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
- GAMETYPE(MAPINFO_TYPE_ASSAULT) \
- /* GAMETYPE(MAPINFO_TYPE_DUEL) */ \
- /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
- /**/
+#define GAMETYPES GAMETYPE(MAPINFO_TYPE_DEATHMATCH) GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH) GAMETYPE(MAPINFO_TYPE_CTF) GAMETYPE(MAPINFO_TYPE_CA) GAMETYPE(MAPINFO_TYPE_FREEZETAG) GAMETYPE(MAPINFO_TYPE_KEEPAWAY) GAMETYPE(MAPINFO_TYPE_KEYHUNT) GAMETYPE(MAPINFO_TYPE_LMS) GAMETYPE(MAPINFO_TYPE_DOMINATION) GAMETYPE(MAPINFO_TYPE_NEXBALL) GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) GAMETYPE(MAPINFO_TYPE_ASSAULT) /* GAMETYPE(MAPINFO_TYPE_DUEL) */ /* GAMETYPE(MAPINFO_TYPE_INVASION) */ /**/
// hidden gametypes come last so indexing always works correctly
-#define HIDDEN_GAMETYPES \
- GAMETYPE(MAPINFO_TYPE_RACE) \
- GAMETYPE(MAPINFO_TYPE_CTS) \
- /**/
+#define HIDDEN_GAMETYPES GAMETYPE(MAPINFO_TYPE_RACE) GAMETYPE(MAPINFO_TYPE_CTS) /**/
Gametype GameType_GetID(int cnt)
{
return strcat(s, ":-");
}
-#define ANTICHEATS(ANTICHEAT) \
- ANTICHEAT("speedhack", MEAN_EVALUATE(CS(this), anticheat_speedhack), 240, 0, 9999); /* Actually this one seems broken. */ \
- ANTICHEAT("speedhack_m1", MEAN_EVALUATE(CS(this), anticheat_speedhack_m1), 240, 1.01, 1.25); \
- ANTICHEAT("speedhack_m2", MEAN_EVALUATE(CS(this), anticheat_speedhack_m2), 240, 1.01, 1.25); \
- ANTICHEAT("speedhack_m3", MEAN_EVALUATE(CS(this), anticheat_speedhack_m3), 240, 1.01, 1.25); \
- ANTICHEAT("speedhack_m4", MEAN_EVALUATE(CS(this), anticheat_speedhack_m4), 240, 1.01, 1.25); \
- ANTICHEAT("speedhack_m5", MEAN_EVALUATE(CS(this), anticheat_speedhack_m5), 240, 1.01, 1.25); \
- ANTICHEAT("div0_strafebot_old", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_old), 120, 0.15, 0.4); \
- ANTICHEAT("div0_strafebot_new", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_new), 120, 0.25, 0.8); \
- ANTICHEAT("div0_evade", MEAN_EVALUATE(CS(this), anticheat_div0_evade), 120, 0.2, 0.5); \
- ANTICHEAT("idle_snapaim", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal) - MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_signal", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_noise", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_m2", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m2), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_m3", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m3), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_m4", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m4), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_m7", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m7), 120, 0, 9999); \
- ANTICHEAT("idle_snapaim_m10", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m10), 120, 0, 9999)
+#define ANTICHEATS(ANTICHEAT) ANTICHEAT("speedhack", MEAN_EVALUATE(CS(this), anticheat_speedhack), 240, 0, 9999); /* Actually this one seems broken. */ ANTICHEAT("speedhack_m1", MEAN_EVALUATE(CS(this), anticheat_speedhack_m1), 240, 1.01, 1.25); ANTICHEAT("speedhack_m2", MEAN_EVALUATE(CS(this), anticheat_speedhack_m2), 240, 1.01, 1.25); ANTICHEAT("speedhack_m3", MEAN_EVALUATE(CS(this), anticheat_speedhack_m3), 240, 1.01, 1.25); ANTICHEAT("speedhack_m4", MEAN_EVALUATE(CS(this), anticheat_speedhack_m4), 240, 1.01, 1.25); ANTICHEAT("speedhack_m5", MEAN_EVALUATE(CS(this), anticheat_speedhack_m5), 240, 1.01, 1.25); ANTICHEAT("div0_strafebot_old", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_old), 120, 0.15, 0.4); ANTICHEAT("div0_strafebot_new", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_new), 120, 0.25, 0.8); ANTICHEAT("div0_evade", MEAN_EVALUATE(CS(this), anticheat_div0_evade), 120, 0.2, 0.5); ANTICHEAT("idle_snapaim", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal) - MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); ANTICHEAT("idle_snapaim_signal", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal), 120, 0, 9999); ANTICHEAT("idle_snapaim_noise", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); ANTICHEAT("idle_snapaim_m2", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m2), 120, 0, 9999); ANTICHEAT("idle_snapaim_m3", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m3), 120, 0, 9999); ANTICHEAT("idle_snapaim_m4", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m4), 120, 0, 9999); ANTICHEAT("idle_snapaim_m7", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m7), 120, 0, 9999); ANTICHEAT("idle_snapaim_m10", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m10), 120, 0, 9999)
void anticheat_report_to_eventlog(entity this) {
if(!autocvar_sv_eventlog)
return;
GameLogEcho(strcat(":anticheat:_time:", ftos(this.playerid), ":", ftos(servertime - CS(this).anticheat_jointime)));
-#define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) \
- GameLogEcho(strcat(":anticheat:", name, ":", anticheat_display(f, servertime - CS(this).anticheat_jointime, tmin, mi, ma)))
+#define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) GameLogEcho(strcat(":anticheat:", name, ":", anticheat_display(f, servertime - CS(this).anticheat_jointime, tmin, mi, ma)))
ANTICHEATS(ANTICHEAT_REPORT_ONE);
#undef ANTICHEAT_REPORT_ONE
}
void anticheat_report_to_playerstats(entity this) {
PlayerStats_GameReport_Event_Player(this,
strcat(PLAYERSTATS_ANTICHEAT, "_time"), servertime - CS(this).anticheat_jointime);
-#define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) \
- PlayerStats_GameReport_Event_Player(this, strcat(PLAYERSTATS_ANTICHEAT, name), f)
+#define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) PlayerStats_GameReport_Event_Player(this, strcat(PLAYERSTATS_ANTICHEAT, name), f)
ANTICHEATS(ANTICHEAT_REPORT_ONE);
#undef ANTICHEAT_REPORT_ONE
}
void anticheat_register_to_playerstats() {
PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_ANTICHEAT, "_time"));
-#define ANTICHEAT_REGISTER_ONE(name, unused_f, unused_tmin, unused_mi, unused_ma) \
- PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_ANTICHEAT, name))
+#define ANTICHEAT_REGISTER_ONE(name, unused_f, unused_tmin, unused_mi, unused_ma) PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_ANTICHEAT, name))
ANTICHEATS(ANTICHEAT_REGISTER_ONE);
#undef ANTICHEAT_REGISTER_ONE
}
prio = 6;
- #define READSKILL(f, w, r) MACRO_BEGIN \
- if(argv(prio) != "") \
- this.f = stof(argv(prio)) * w; \
- else \
- this.f = (!autocvar_g_campaign) * (2 * random() - 1) * r * w; \
- prio++; \
- MACRO_END
+ #define READSKILL(f, w, r) MACRO_BEGIN if(argv(prio) != "") this.f = stof(argv(prio)) * w; else this.f = (!autocvar_g_campaign) * (2 * random() - 1) * r * w; prio++; MACRO_END
//print(bot_name, ": ping=", argv(9), "\n");
READSKILL(havocbot_keyboardskill, 0.5, 0.5); // keyboard skill
// If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
if (skill > 6 && !(IS_ONGROUND(this)))
{
- #define ROCKETJUMP_DAMAGE() WEP_CVAR(devastator, damage) * 0.8 \
- * ((this.strength_finished > time) ? autocvar_g_balance_powerup_strength_selfdamage : 1) \
- * ((this.invincible_finished > time) ? autocvar_g_balance_powerup_invincible_takedamage : 1)
+ #define ROCKETJUMP_DAMAGE() WEP_CVAR(devastator, damage) * 0.8 * ((this.strength_finished > time) ? autocvar_g_balance_powerup_strength_selfdamage : 1) * ((this.invincible_finished > time) ? autocvar_g_balance_powerup_invincible_takedamage : 1)
tracebox(this.origin, this.mins, this.maxs, this.origin + '0 0 -65536', MOVE_NOMONSTERS, this);
if(tracebox_hits_trigger_hurt(this.origin, this.mins, this.maxs, trace_endpos ))
*/
#define navigation_item_islinked(from_wp, to_item) waypoint_islinked(to_item, from_wp)
-#define navigation_item_addlink(from_wp, to_item) \
- waypoint_addlink_customcost(to_item, from_wp, waypoint_getlinkcost(from_wp, to_item))
+#define navigation_item_addlink(from_wp, to_item) waypoint_addlink_customcost(to_item, from_wp, waypoint_getlinkcost(from_wp, to_item))
-#define TELEPORT_USED(pl, tele_wp) \
- boxesoverlap(tele_wp.absmin, tele_wp.absmax, pl.lastteleport_origin + STAT(PL_MIN, pl), pl.lastteleport_origin + STAT(PL_MAX, pl))
+#define TELEPORT_USED(pl, tele_wp) boxesoverlap(tele_wp.absmin, tele_wp.absmax, pl.lastteleport_origin + STAT(PL_MIN, pl), pl.lastteleport_origin + STAT(PL_MAX, pl))
vector tracewalk_dest;
float tracewalk_dest_height;
return cwp + cwb;
}
-#define waypoint_fixorigin(position, tracetest_ent) \
- waypoint_fixorigin_down_dir(position, tracetest_ent, '0 0 -1')
+#define waypoint_fixorigin(position, tracetest_ent) waypoint_fixorigin_down_dir(position, tracetest_ent, '0 0 -1')
vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir)
{
return 0;
}
-#define BEGIN_CHEAT_FUNCTION() \
- float cheating = 0, attempting = 0
-#define DID_CHEAT() \
- ++cheating
-#define ADD_CHEATS(e,n) \
- cheatcount_total += n; \
- e.cheatcount += n
-#define END_CHEAT_FUNCTION() \
- ADD_CHEATS(this, cheating); \
- return attempting
-#define IS_CHEAT(ent,i,argc,fr) \
- if((++attempting, !CheatsAllowed(ent,i,argc,fr))) \
- break
+#define BEGIN_CHEAT_FUNCTION() float cheating = 0, attempting = 0
+#define DID_CHEAT() ++cheating
+#define ADD_CHEATS(e,n) cheatcount_total += n; e.cheatcount += n
+#define END_CHEAT_FUNCTION() ADD_CHEATS(this, cheating); return attempting
+#define IS_CHEAT(ent,i,argc,fr) if((++attempting, !CheatsAllowed(ent,i,argc,fr))) break
float num_autoscreenshot;
void info_autoscreenshot_findtarget(entity this)
// ==================================
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-#define BAN_COMMANDS(request, arguments, command) \
- BAN_COMMAND("ban", BanCommand_ban(request, arguments, command), "Ban an IP address or a range of addresses (like 1.2.3)") \
- BAN_COMMAND("banlist", BanCommand_banlist(request), "List all existing bans") \
- BAN_COMMAND("kickban", BanCommand_kickban(request, arguments, command), "Disconnect a client and ban it at the same time") \
- BAN_COMMAND("mute", BanCommand_mute(request, arguments, command), "Disallow a client from talking by muting them") \
- BAN_COMMAND("unban", BanCommand_unban(request, arguments), "Remove an existing ban") \
- BAN_COMMAND("unmute", BanCommand_unmute(request, arguments), "Unmute a client") \
- /* nothing */
+#define BAN_COMMANDS(request, arguments, command) BAN_COMMAND("ban", BanCommand_ban(request, arguments, command), "Ban an IP address or a range of addresses (like 1.2.3)") BAN_COMMAND("banlist", BanCommand_banlist(request), "List all existing bans") BAN_COMMAND("kickban", BanCommand_kickban(request, arguments, command), "Disconnect a client and ban it at the same time") BAN_COMMAND("mute", BanCommand_mute(request, arguments, command), "Disallow a client from talking by muting them") BAN_COMMAND("unban", BanCommand_unban(request, arguments), "Remove an existing ban") BAN_COMMAND("unmute", BanCommand_unmute(request, arguments), "Unmute a client") /* nothing */
void BanCommand_macro_help()
{
- #define BAN_COMMAND(name, function, description) \
- { if (strtolower(description) != "") { LOG_INFO(" ^2", name, "^7: ", description); } }
+ #define BAN_COMMAND(name, function, description) { if (strtolower(description) != "") { LOG_INFO(" ^2", name, "^7: ", description); } }
BAN_COMMANDS(0, 0, "");
#undef BAN_COMMAND
float BanCommand_macro_command(int argc, string command)
{
- #define BAN_COMMAND(name, function, description) \
- { if (name == strtolower(argv(0))) { function; return true; } }
+ #define BAN_COMMAND(name, function, description) { if (name == strtolower(argv(0))) { function; return true; } }
BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command);
#undef BAN_COMMAND
float BanCommand_macro_usage(int argc)
{
- #define BAN_COMMAND(name, function, description) \
- { if (name == strtolower(argv(1))) { function; return true; } }
+ #define BAN_COMMAND(name, function, description) { if (name == strtolower(argv(1))) { function; return true; } }
BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "");
#undef BAN_COMMAND
void BanCommand_macro_write_aliases(float fh)
{
- #define BAN_COMMAND(name, function, description) \
- { if (strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
+ #define BAN_COMMAND(name, function, description) { if (strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
BAN_COMMANDS(0, 0, "");
#undef BAN_COMMAND
// =====================================
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-#define CLIENT_COMMANDS(ent, request, arguments, command) \
- CLIENT_COMMAND("autoswitch", ClientCommand_autoswitch(ent, request, arguments), "Whether or not to switch automatically when getting a better weapon") \
- CLIENT_COMMAND("clientversion", ClientCommand_clientversion(ent, request, arguments), "Release version of the game") \
- CLIENT_COMMAND("join", ClientCommand_join(ent, request), "Become a player in the game") \
- CLIENT_COMMAND("kill", ClientCommand_kill(ent, request), "Become a member of the dead") \
- CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") \
- CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") \
- CLIENT_COMMAND("physics", ClientCommand_physics(ent, request, arguments), "Change physics set") \
- CLIENT_COMMAND("ready", ClientCommand_ready(ent, request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
- CLIENT_COMMAND("say", ClientCommand_say(ent, request, arguments, command), "Print a message to chat to all players") \
- CLIENT_COMMAND("say_team", ClientCommand_say_team(ent, request, arguments, command), "Print a message to chat to all team mates") \
- CLIENT_COMMAND("selectteam", ClientCommand_selectteam(ent, request, arguments), "Attempt to choose a team to join into") \
- CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") \
- CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") \
- CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") \
- CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \
- CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \
- CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \
- CLIENT_COMMAND("wpeditor", ClientCommand_wpeditor(ent, request, arguments), "Waypoint editor commands") \
- /* nothing */
+#define CLIENT_COMMANDS(ent, request, arguments, command) CLIENT_COMMAND("autoswitch", ClientCommand_autoswitch(ent, request, arguments), "Whether or not to switch automatically when getting a better weapon") CLIENT_COMMAND("clientversion", ClientCommand_clientversion(ent, request, arguments), "Release version of the game") CLIENT_COMMAND("join", ClientCommand_join(ent, request), "Become a player in the game") CLIENT_COMMAND("kill", ClientCommand_kill(ent, request), "Become a member of the dead") CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") CLIENT_COMMAND("physics", ClientCommand_physics(ent, request, arguments), "Change physics set") CLIENT_COMMAND("ready", ClientCommand_ready(ent, request), "Qualify as ready to end warmup stage (or restart server if allowed)") CLIENT_COMMAND("say", ClientCommand_say(ent, request, arguments, command), "Print a message to chat to all players") CLIENT_COMMAND("say_team", ClientCommand_say_team(ent, request, arguments, command), "Print a message to chat to all team mates") CLIENT_COMMAND("selectteam", ClientCommand_selectteam(ent, request, arguments), "Attempt to choose a team to join into") CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") CLIENT_COMMAND("wpeditor", ClientCommand_wpeditor(ent, request, arguments), "Waypoint editor commands") /* nothing */
void ClientCommand_macro_help(entity caller)
{
- #define CLIENT_COMMAND(name, function, description) \
- { sprint(caller, " ^2", name, "^7: ", description, "\n"); }
+ #define CLIENT_COMMAND(name, function, description) { sprint(caller, " ^2", name, "^7: ", description, "\n"); }
CLIENT_COMMANDS(NULL, 0, 0, "");
#undef CLIENT_COMMAND
float ClientCommand_macro_command(int argc, entity caller, string command)
{
- #define CLIENT_COMMAND(name, function, description) \
- { if (name == strtolower(argv(0))) { function; return true; } }
+ #define CLIENT_COMMAND(name, function, description) { if (name == strtolower(argv(0))) { function; return true; } }
CLIENT_COMMANDS(caller, CMD_REQUEST_COMMAND, argc, command);
#undef CLIENT_COMMAND
float ClientCommand_macro_usage(int argc, entity caller)
{
- #define CLIENT_COMMAND(name, function, description) \
- { if (name == strtolower(argv(1))) { function; return true; } }
+ #define CLIENT_COMMAND(name, function, description) { if (name == strtolower(argv(1))) { function; return true; } }
CLIENT_COMMANDS(caller, CMD_REQUEST_USAGE, argc, "");
#undef CLIENT_COMMAND
void ClientCommand_macro_write_aliases(float fh)
{
- #define CLIENT_COMMAND(name, function, description) \
- { CMD_Write_Alias("qc_cmd_cmd", name, description); }
+ #define CLIENT_COMMAND(name, function, description) { CMD_Write_Alias("qc_cmd_cmd", name, description); }
CLIENT_COMMANDS(NULL, 0, 0, "");
#undef CLIENT_COMMAND
REGISTER_REGISTRY(COMMON_COMMANDS)
REGISTRY_SORT(COMMON_COMMANDS)
-#define COMMON_COMMAND(id, description) \
- CLASS(commoncommand_##id, Command) \
- ATTRIB(commoncommand_##id, m_name, string, #id); \
- ATTRIB(commoncommand_##id, m_description, string, description); \
- ENDCLASS(commoncommand_##id) \
- REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); \
- METHOD(commoncommand_##id, m_invokecmd, void(commoncommand_##id this, int request, entity caller, int arguments, string command))
+#define COMMON_COMMAND(id, description) CLASS(commoncommand_##id, Command) ATTRIB(commoncommand_##id, m_name, string, #id); ATTRIB(commoncommand_##id, m_description, string, description); ENDCLASS(commoncommand_##id) REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); METHOD(commoncommand_##id, m_invokecmd, void(commoncommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(COMMON_COMMANDS_aliases) {
FOREACH(COMMON_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svcmd")); });
REGISTER_REGISTRY(SERVER_COMMANDS)
REGISTRY_SORT(SERVER_COMMANDS)
-#define SERVER_COMMAND(id, description) \
- CLASS(servercommand_##id, Command) \
- ATTRIB(servercommand_##id, m_name, string, #id); \
- ATTRIB(servercommand_##id, m_description, string, description); \
- ENDCLASS(servercommand_##id) \
- REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); \
- METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
+#define SERVER_COMMAND(id, description) CLASS(servercommand_##id, Command) ATTRIB(servercommand_##id, m_name, string, #id); ATTRIB(servercommand_##id, m_description, string, description); ENDCLASS(servercommand_##id) REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(SERVER_COMMANDS_aliases) {
FOREACH(SERVER_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_sv")); });
// ================================
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-#define VOTE_COMMANDS(request, caller, arguments, command) \
- VOTE_COMMAND("abstain", VoteCommand_abstain(request, caller), "Abstain your vote in current vote", VC_ASGNMNT_CLIENTONLY) \
- VOTE_COMMAND("call", VoteCommand_call(request, caller, arguments, command), "Create a new vote for players to decide on", VC_ASGNMNT_BOTH) \
- VOTE_COMMAND("help", VoteCommand_macro_help(caller, arguments), "Shows this information", VC_ASGNMNT_BOTH) \
- VOTE_COMMAND("master", VoteCommand_master(request, caller, arguments, command), "Full control over all voting and vote commands", VC_ASGNMNT_CLIENTONLY) \
- VOTE_COMMAND("no", VoteCommand_no(request, caller), "Select no in current vote", VC_ASGNMNT_CLIENTONLY) \
- VOTE_COMMAND("status", VoteCommand_status(request, caller), "Prints information about current vote", VC_ASGNMNT_BOTH) \
- VOTE_COMMAND("stop", VoteCommand_stop(request, caller), "Immediately end a vote", VC_ASGNMNT_BOTH) \
- VOTE_COMMAND("yes", VoteCommand_yes(request, caller), "Select yes in current vote", VC_ASGNMNT_CLIENTONLY) \
- /* nothing */
+#define VOTE_COMMANDS(request, caller, arguments, command) VOTE_COMMAND("abstain", VoteCommand_abstain(request, caller), "Abstain your vote in current vote", VC_ASGNMNT_CLIENTONLY) VOTE_COMMAND("call", VoteCommand_call(request, caller, arguments, command), "Create a new vote for players to decide on", VC_ASGNMNT_BOTH) VOTE_COMMAND("help", VoteCommand_macro_help(caller, arguments), "Shows this information", VC_ASGNMNT_BOTH) VOTE_COMMAND("master", VoteCommand_master(request, caller, arguments, command), "Full control over all voting and vote commands", VC_ASGNMNT_CLIENTONLY) VOTE_COMMAND("no", VoteCommand_no(request, caller), "Select no in current vote", VC_ASGNMNT_CLIENTONLY) VOTE_COMMAND("status", VoteCommand_status(request, caller), "Prints information about current vote", VC_ASGNMNT_BOTH) VOTE_COMMAND("stop", VoteCommand_stop(request, caller), "Immediately end a vote", VC_ASGNMNT_BOTH) VOTE_COMMAND("yes", VoteCommand_yes(request, caller), "Select yes in current vote", VC_ASGNMNT_CLIENTONLY) /* nothing */
void VoteCommand_macro_help(entity caller, int argc)
{
if (argc == 2 || argv(2) == "help") // help display listing all commands
{
print_to(caller, "\nVoting commands:\n");
- #define VOTE_COMMAND(name, function, description, assignment) \
- { if (Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat(" ^2", name, "^7: ", description)); } }
+ #define VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat(" ^2", name, "^7: ", description)); } }
VOTE_COMMANDS(0, caller, 0, "");
#undef VOTE_COMMAND
}
else // usage for individual command
{
- #define VOTE_COMMAND(name, function, description, assignment) \
- { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(2))) { function; return; } } }
+ #define VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(2))) { function; return; } } }
VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "");
#undef VOTE_COMMAND
float VoteCommand_macro_command(entity caller, int argc, string vote_command)
{
- #define VOTE_COMMAND(name, function, description, assignment) \
- { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } }
+ #define VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } }
VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command);
#undef VOTE_COMMAND
// TODO: improve SPREE_ITEM and KILL_SPREE_LIST
// these 2 macros are spread over multiple files
- #define SPREE_ITEM(counta,countb,center,normal,gentle) \
- case counta: \
- Send_Notification(NOTIF_ONE, attacker, MSG_ANNCE, ANNCE_KILLSTREAK_##countb); \
- if (!warmup_stage) \
- PlayerStats_GameReport_Event_Player(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_##counta, 1); \
- break;
+ #define SPREE_ITEM(counta,countb,center,normal,gentle) case counta: Send_Notification(NOTIF_ONE, attacker, MSG_ANNCE, ANNCE_KILLSTREAK_##countb); if (!warmup_stage) PlayerStats_GameReport_Event_Player(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_##counta, 1); break;
switch(CS(attacker).killcount)
{
s = cons(s, pkg);
}
// add automatically managed files to the list
- #define X(match) MACRO_BEGIN \
- int fd = search_begin(match, true, false); \
- if (fd >= 0) \
- { \
- for (int i = 0, j = search_getsize(fd); i < j; ++i) \
- { \
- s = cons(s, search_getfilename(fd, i)); \
- } \
- search_end(fd); \
- } \
- MACRO_END
+ #define X(match) MACRO_BEGIN int fd = search_begin(match, true, false); if (fd >= 0) { for (int i = 0, j = search_getsize(fd); i < j; ++i) { s = cons(s, search_getfilename(fd, i)); } search_end(fd); } MACRO_END
X("*-serverpackage.txt");
X("*.serverpackage");
#undef X
.entity vehicle;
#define IMPULSE(id) _IMPULSE(IMP_##id)
-#define _IMPULSE(id) \
- void id##_handle(entity this); \
- STATIC_INIT_LATE(id) \
- { \
- id.impulse_handle = id##_handle; \
- } \
- void id##_handle(entity this)
+#define _IMPULSE(id) void id##_handle(entity this); STATIC_INIT_LATE(id) { id.impulse_handle = id##_handle; } void id##_handle(entity this)
/**
* Impulse map:
// weapon switching impulses
-#define X(i) \
- IMPULSE(weapon_group_##i) \
- { \
- if (IS_DEAD(this)) \
- { \
- this.impulse = IMP_weapon_group_##i.impulse; \
- return; \
- } \
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) \
- { \
- .entity weaponentity = weaponentities[slot]; \
- W_NextWeaponOnImpulse(this, i, weaponentity); \
- if(autocvar_g_weaponswitch_debug != 1) \
- break; \
- } \
- }
+#define X(i) IMPULSE(weapon_group_##i) { if (IS_DEAD(this)) { this.impulse = IMP_weapon_group_##i.impulse; return; } for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; W_NextWeaponOnImpulse(this, i, weaponentity); if(autocvar_g_weaponswitch_debug != 1) break; } }
X(1)
X(2)
X(3)
// custom order weapon cycling
-#define X(i, dir) \
- IMPULSE(weapon_priority_##i##_##dir) \
- { \
- if (this.vehicle) return; \
- if (IS_DEAD(this)) \
- { \
- this.impulse = IMP_weapon_priority_##i##_##dir.impulse; \
- return; \
- } \
- noref int prev = -1; \
- noref int best = 0; \
- noref int next = +1; \
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) \
- { \
- .entity weaponentity = weaponentities[slot]; \
- W_CycleWeapon(this, CS(this).cvar_cl_weaponpriorities[i], dir, weaponentity); \
- if(autocvar_g_weaponswitch_debug != 1) \
- break; \
- } \
- }
+#define X(i, dir) IMPULSE(weapon_priority_##i##_##dir) { if (this.vehicle) return; if (IS_DEAD(this)) { this.impulse = IMP_weapon_priority_##i##_##dir.impulse; return; } noref int prev = -1; noref int best = 0; noref int next = +1; for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; W_CycleWeapon(this, CS(this).cvar_cl_weaponpriorities[i], dir, weaponentity); if(autocvar_g_weaponswitch_debug != 1) break; } }
X(0, prev)
X(1, prev)
X(2, prev)
// direct weapons
-#define X(i) \
- IMPULSE(weapon_byid_##i) \
- { \
- if (this.vehicle) return; \
- if (IS_DEAD(this)) \
- { \
- this.impulse = IMP_weapon_byid_##i.impulse; \
- return; \
- } \
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) \
- { \
- .entity weaponentity = weaponentities[slot]; \
- W_SwitchWeapon_TryOthers(this, Weapons_from(WEP_FIRST + i), weaponentity); \
- if(autocvar_g_weaponswitch_debug != 1) \
- break; \
- } \
- }
+#define X(i) IMPULSE(weapon_byid_##i) { if (this.vehicle) return; if (IS_DEAD(this)) { this.impulse = IMP_weapon_byid_##i.impulse; return; } for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; W_SwitchWeapon_TryOthers(this, Weapons_from(WEP_FIRST + i), weaponentity); if(autocvar_g_weaponswitch_debug != 1) break; } }
X(0)
X(1)
X(2)
// then create your function using MUTATOR_HOOKFUNCTION
/** called when a player becomes observer, after shared setup */
-#define EV_MakePlayerObserver(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_MakePlayerObserver(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(MakePlayerObserver, EV_MakePlayerObserver)
/** */
-#define EV_PutClientInServer(i, o) \
- /** client wanting to spawn */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PutClientInServer(i, o) /** client wanting to spawn */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PutClientInServer, EV_PutClientInServer);
/**
* return true to prevent a spectator/observer to spawn as player
*/
- #define EV_ForbidSpawn(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+ #define EV_ForbidSpawn(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ForbidSpawn, EV_ForbidSpawn);
/** returns true if client should be put as player on connection */
-#define EV_AutoJoinOnConnection(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_AutoJoinOnConnection(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(AutoJoinOnConnection, EV_AutoJoinOnConnection);
/** called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them. */
-#define EV_ForbidRandomStartWeapons(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ForbidRandomStartWeapons(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ForbidRandomStartWeapons, EV_ForbidRandomStartWeapons);
/** called when a player spawns as player, after shared setup, before his weapon is chosen (so items may be changed in here) */
-#define EV_PlayerSpawn(i, o) \
- /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) \
- /** spot that was used, or NULL */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_PlayerSpawn(i, o) /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) /** spot that was used, or NULL */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(PlayerSpawn, EV_PlayerSpawn);
/** called after a player's weapon is chosen so it can be overriden here */
-#define EV_PlayerWeaponSelect(i, o) \
- /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PlayerWeaponSelect(i, o) /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PlayerWeaponSelect, EV_PlayerWeaponSelect);
/** called in reset_map */
-#define EV_reset_map_global(i, o) \
- /**/
+#define EV_reset_map_global(i, o) /**/
MUTATOR_HOOKABLE(reset_map_global, EV_reset_map_global);
/** called in reset_map */
-#define EV_reset_map_players(i, o) \
- /**/
+#define EV_reset_map_players(i, o) /**/
MUTATOR_HOOKABLE(reset_map_players, EV_reset_map_players);
/** returns 1 if clearing player score shall not be allowed */
-#define EV_ForbidPlayerScore_Clear(i, o) \
- /**/
+#define EV_ForbidPlayerScore_Clear(i, o) /**/
MUTATOR_HOOKABLE(ForbidPlayerScore_Clear, EV_ForbidPlayerScore_Clear);
/** called when a player disconnects */
-#define EV_ClientDisconnect(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ClientDisconnect(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ClientDisconnect, EV_ClientDisconnect);
/** called when a player dies to e.g. remove stuff he was carrying. */
-#define EV_PlayerDies(i, o) \
- /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /** target */ i(entity, MUTATOR_ARGV_2_entity) \
- /** deathtype */ i(float, MUTATOR_ARGV_3_float) \
- /** damage */ i(float, MUTATOR_ARGV_4_float) \
- /** damage */ o(float, MUTATOR_ARGV_4_float) \
- /**/
+#define EV_PlayerDies(i, o) /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /** target */ i(entity, MUTATOR_ARGV_2_entity) /** deathtype */ i(float, MUTATOR_ARGV_3_float) /** damage */ i(float, MUTATOR_ARGV_4_float) /** damage */ o(float, MUTATOR_ARGV_4_float) /**/
MUTATOR_HOOKABLE(PlayerDies, EV_PlayerDies);
/** called after a player died. */
-#define EV_PlayerDied(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PlayerDied(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PlayerDied, EV_PlayerDied);
/** allows overriding the frag centerprint messages */
-#define EV_FragCenterMessage(i, o) \
- /** attacker */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /** deathtype */ i(float, MUTATOR_ARGV_2_float) \
- /** attacker kcount*/ i(int, MUTATOR_ARGV_3_int) \
- /** targ killcount */ i(int, MUTATOR_ARGV_4_int) \
- /**/
+#define EV_FragCenterMessage(i, o) /** attacker */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /** deathtype */ i(float, MUTATOR_ARGV_2_float) /** attacker kcount*/ i(int, MUTATOR_ARGV_3_int) /** targ killcount */ i(int, MUTATOR_ARGV_4_int) /**/
MUTATOR_HOOKABLE(FragCenterMessage, EV_FragCenterMessage);
/** called when a player dies to e.g. remove stuff he was carrying */
-#define EV_PlayHitsound(i, o) \
- /** victim */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_PlayHitsound(i, o) /** victim */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(PlayHitsound, EV_PlayHitsound);
/** called when an item model is about to be set, allows custom paths etc. */
-#define EV_ItemModel(i, o) \
- /** model */ i(string, MUTATOR_ARGV_0_string) \
- /** output */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_ItemModel(i, o) /** model */ i(string, MUTATOR_ARGV_0_string) /** output */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(ItemModel, EV_ItemModel);
/** called when an item sound is about to be played, allows custom paths etc. */
-#define EV_ItemSound(i, o) \
- /** sound */ i(string, MUTATOR_ARGV_0_string) \
- /** output */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_ItemSound(i, o) /** sound */ i(string, MUTATOR_ARGV_0_string) /** output */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(ItemSound, EV_ItemSound);
/** called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill */
-#define EV_GiveFragsForKill(i, o) \
- /** attacker */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /** frag score */ i(float, MUTATOR_ARGV_2_float) \
- /** */ o(float, MUTATOR_ARGV_2_float) \
- /** deathtype */ i(float, MUTATOR_ARGV_3_float) \
- /** wep entity */ i(entity, MUTATOR_ARGV_4_entity) \
- /**/
+#define EV_GiveFragsForKill(i, o) /** attacker */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /** frag score */ i(float, MUTATOR_ARGV_2_float) /** */ o(float, MUTATOR_ARGV_2_float) /** deathtype */ i(float, MUTATOR_ARGV_3_float) /** wep entity */ i(entity, MUTATOR_ARGV_4_entity) /**/
MUTATOR_HOOKABLE(GiveFragsForKill, EV_GiveFragsForKill);
/** called when the match ends */
* non-empty string to use team entity name. Both behaviors can be active at the
* same time and will stack allowed teams.
*/
-#define EV_TeamBalance_CheckAllowedTeams(i, o) \
- /** mask of teams */ i(float, MUTATOR_ARGV_0_float) \
- /**/ o(float, MUTATOR_ARGV_0_float) \
- /** team entity name */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /** player checked */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_TeamBalance_CheckAllowedTeams(i, o) /** mask of teams */ i(float, MUTATOR_ARGV_0_float) /**/ o(float, MUTATOR_ARGV_0_float) /** team entity name */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /** player checked */ i(entity, MUTATOR_ARGV_2_entity) /**/
MUTATOR_HOOKABLE(TeamBalance_CheckAllowedTeams,
EV_TeamBalance_CheckAllowedTeams);
MUTATOR_HOOKABLE(TeamBalance_GetTeamCounts, EV_NO_ARGS);
/** allows overriding of team counts */
-#define EV_TeamBalance_GetTeamCount(i, o) \
- /** team index to count */ i(float, MUTATOR_ARGV_0_float) \
- /** player to ignore */ i(entity, MUTATOR_ARGV_1_entity) \
- /** number of players in a team */ o(float, MUTATOR_ARGV_2_float) \
- /** number of bots in a team */ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_TeamBalance_GetTeamCount(i, o) /** team index to count */ i(float, MUTATOR_ARGV_0_float) /** player to ignore */ i(entity, MUTATOR_ARGV_1_entity) /** number of players in a team */ o(float, MUTATOR_ARGV_2_float) /** number of bots in a team */ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(TeamBalance_GetTeamCount, EV_TeamBalance_GetTeamCount);
/** allows overriding the teams that will make the game most balanced if the
* player joins any of them.
*/
-#define EV_TeamBalance_FindBestTeams(i, o) \
- /** player checked */ i(entity, MUTATOR_ARGV_0_entity) \
- /** bitmask of teams */ o(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_TeamBalance_FindBestTeams(i, o) /** player checked */ i(entity, MUTATOR_ARGV_0_entity) /** bitmask of teams */ o(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(TeamBalance_FindBestTeams, EV_TeamBalance_FindBestTeams);
/** Called during autobalance. Return true to override the player that will be
switched. */
-#define EV_TeamBalance_GetPlayerForTeamSwitch(i, o) \
- /** source team index */ i(int, MUTATOR_ARGV_0_int) \
- /** destination team index */ i(int, MUTATOR_ARGV_1_int) \
- /** is looking for bot */ i(bool, MUTATOR_ARGV_2_bool) \
- /** player to switch */ o(entity, MUTATOR_ARGV_3_entity) \
- /**/
+#define EV_TeamBalance_GetPlayerForTeamSwitch(i, o) /** source team index */ i(int, MUTATOR_ARGV_0_int) /** destination team index */ i(int, MUTATOR_ARGV_1_int) /** is looking for bot */ i(bool, MUTATOR_ARGV_2_bool) /** player to switch */ o(entity, MUTATOR_ARGV_3_entity) /**/
MUTATOR_HOOKABLE(TeamBalance_GetPlayerForTeamSwitch,
EV_TeamBalance_GetPlayerForTeamSwitch);
/** copies variables for spectating "spectatee" to "this" */
-#define EV_SpectateCopy(i, o) \
- /** spectatee */ i(entity, MUTATOR_ARGV_0_entity) \
- /** client */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_SpectateCopy(i, o) /** spectatee */ i(entity, MUTATOR_ARGV_0_entity) /** client */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(SpectateCopy, EV_SpectateCopy);
/** called when formatting a chat message to replace fancy functions */
-#define EV_FormatMessage(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** escape */ i(string, MUTATOR_ARGV_1_string) \
- /** replacement */ i(string, MUTATOR_ARGV_2_string) \
- /**/ o(string, MUTATOR_ARGV_2_string) \
- /** message */ i(string, MUTATOR_ARGV_3_string) \
- /**/
+#define EV_FormatMessage(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** escape */ i(string, MUTATOR_ARGV_1_string) /** replacement */ i(string, MUTATOR_ARGV_2_string) /**/ o(string, MUTATOR_ARGV_2_string) /** message */ i(string, MUTATOR_ARGV_3_string) /**/
MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
/** called before any formatting is applied, handy for tweaking the message before scripts get ahold of it */
-#define EV_PreFormatMessage(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** message */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_PreFormatMessage(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** message */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(PreFormatMessage, EV_PreFormatMessage);
/** returns true if throwing the current weapon shall not be allowed */
-#define EV_ForbidThrowCurrentWeapon(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** weapon entity */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_ForbidThrowCurrentWeapon(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** weapon entity */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon, EV_ForbidThrowCurrentWeapon);
/** returns true if dropping the current weapon shall not be allowed at any time including death */
-#define EV_ForbidDropCurrentWeapon(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** weapon id */ i(int, MUTATOR_ARGV_1_int) \
- /**/
+#define EV_ForbidDropCurrentWeapon(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** weapon id */ i(int, MUTATOR_ARGV_1_int) /**/
MUTATOR_HOOKABLE(ForbidDropCurrentWeapon, EV_ForbidDropCurrentWeapon);
/** */
MUTATOR_HOOKABLE(SetDefaultAlpha, EV_NO_ARGS);
/** allows changing attack rate */
-#define EV_WeaponRateFactor(i, o) \
- /** weapon rate */ i(float, MUTATOR_ARGV_0_float) \
- /**/ o(float, MUTATOR_ARGV_0_float) \
- /** player */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_WeaponRateFactor(i, o) /** weapon rate */ i(float, MUTATOR_ARGV_0_float) /**/ o(float, MUTATOR_ARGV_0_float) /** player */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(WeaponRateFactor, EV_WeaponRateFactor);
/** allows changing weapon speed (projectiles mostly) */
-#define EV_WeaponSpeedFactor(i, o) \
- /** weapon speed */ i(float, MUTATOR_ARGV_0_float) \
- /**/ o(float, MUTATOR_ARGV_0_float) \
- /** player */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_WeaponSpeedFactor(i, o) /** weapon speed */ i(float, MUTATOR_ARGV_0_float) /**/ o(float, MUTATOR_ARGV_0_float) /** player */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(WeaponSpeedFactor, EV_WeaponSpeedFactor);
/** adjusts {warmup_}start_{items,weapons,ammo_{cells,plasma,rockets,nails,shells,fuel}} */
MUTATOR_HOOKABLE(SetStartItems, EV_NO_ARGS);
/** called every frame. customizes the waypoint for spectators */
-#define EV_CustomizeWaypoint(i, o) \
- /** waypoint */ i(entity, MUTATOR_ARGV_0_entity) \
- /** player; other.enemy = spectator */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_CustomizeWaypoint(i, o) /** waypoint */ i(entity, MUTATOR_ARGV_0_entity) /** player; other.enemy = spectator */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(CustomizeWaypoint, EV_CustomizeWaypoint);
/** Check if items having the given definition are allowed to spawn.
* Return true to disallow spawning.
*/
-#define EV_FilterItemDefinition(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_FilterItemDefinition(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(FilterItemDefinition, EV_FilterItemDefinition);
/**
* checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields)
* return error to request removal
*/
-#define EV_FilterItem(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_FilterItem(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(FilterItem, EV_FilterItem);
/** return error to request removal */
-#define EV_TurretSpawn(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_TurretSpawn(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(TurretSpawn, EV_TurretSpawn);
/** return error to not attack */
-#define EV_TurretFire(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_TurretFire(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(TurretFire, EV_TurretFire);
/** return error to not attack */
-#define EV_Turret_CheckFire(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /** to fire or not to fire */ o(bool, MUTATOR_ARGV_1_bool) \
- /**/
+#define EV_Turret_CheckFire(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /** to fire or not to fire */ o(bool, MUTATOR_ARGV_1_bool) /**/
MUTATOR_HOOKABLE(Turret_CheckFire, EV_Turret_CheckFire);
/** return error to prevent entity spawn, or modify the entity */
-#define EV_OnEntityPreSpawn(i, o) \
- /** entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_OnEntityPreSpawn(i, o) /** entity */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_OnEntityPreSpawn);
/** runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators */
-#define EV_PlayerPreThink(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PlayerPreThink(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PlayerPreThink, EV_PlayerPreThink);
/** TODO change this into a general PlayerPostThink hook? */
-#define EV_GetPressedKeys(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_GetPressedKeys(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(GetPressedKeys, EV_GetPressedKeys);
/** is meant to call GetCvars_handle*(get_cvars_s, get_cvars_f, cvarfield, "cvarname") for cvars this mutator needs from the client */
-#define EV_GetCvars(i, o) \
- /**/ i(float, get_cvars_f) \
- /**/ i(string, get_cvars_s) \
- /**/
+#define EV_GetCvars(i, o) /**/ i(float, get_cvars_f) /**/ i(string, get_cvars_s) /**/
float get_cvars_f;
string get_cvars_s;
MUTATOR_HOOKABLE(GetCvars, EV_NO_ARGS); // NOTE: Can't use EV_GetCvars because of `SZ_GetSpace: overflow`
/** can edit any "just fired" projectile */
-#define EV_EditProjectile(i, o) \
- /** projectile owner */ i(entity, MUTATOR_ARGV_0_entity) \
- /** projectile */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_EditProjectile(i, o) /** projectile owner */ i(entity, MUTATOR_ARGV_0_entity) /** projectile */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
/** called when a monster spawns */
-#define EV_MonsterSpawn(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_MonsterSpawn(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(MonsterSpawn, EV_MonsterSpawn);
/** called when a monster dies */
-#define EV_MonsterDies(i, o) \
- /** target */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /** deathtype */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_MonsterDies(i, o) /** target */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /** deathtype */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(MonsterDies, EV_MonsterDies);
/** called when a monster dies */
-#define EV_MonsterRemove(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_MonsterRemove(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(MonsterRemove, EV_MonsterRemove);
/** called when a monster wants to respawn */
-#define EV_MonsterRespawn(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_MonsterRespawn(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(MonsterRespawn, EV_MonsterRespawn);
/** called when a monster is dropping loot */
-#define EV_MonsterDropItem(i, o) \
- /* monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /* item (can be removed or changed) */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /* attacker */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_MonsterDropItem(i, o) /* monster */ i(entity, MUTATOR_ARGV_0_entity) /* item (can be removed or changed) */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /* attacker */ i(entity, MUTATOR_ARGV_2_entity) /**/
.entity monster_loot;
MUTATOR_HOOKABLE(MonsterDropItem, EV_MonsterDropItem);
* called when a monster moves
* returning true makes the monster stop
*/
-#define EV_MonsterMove(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /** run speed */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /** walk speed */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /** move target */ i(entity, MUTATOR_ARGV_3_entity) \
- /**/ o(entity, MUTATOR_ARGV_3_entity) \
- /**/
+#define EV_MonsterMove(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /** run speed */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /** walk speed */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /** move target */ i(entity, MUTATOR_ARGV_3_entity) /**/ o(entity, MUTATOR_ARGV_3_entity) /**/
MUTATOR_HOOKABLE(MonsterMove, EV_MonsterMove);
/** called when a monster looks for another target */
/**
* called when validating a monster's target
*/
-#define EV_MonsterValidTarget(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_MonsterValidTarget(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(MonsterValidTarget, EV_MonsterValidTarget);
/** called to change a random monster to a miniboss */
-#define EV_MonsterCheckBossFlag(i, o) \
- /** monster */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_MonsterCheckBossFlag(i, o) /** monster */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(MonsterCheckBossFlag, EV_MonsterCheckBossFlag);
/**
* return 1 to prevent spawning
* NOTE: requires reason if disallowed
*/
- #define EV_AllowMobSpawning(i, o) \
- /** caller */ i(entity, MUTATOR_ARGV_0_entity) \
- /** reason */ o(string, MUTATOR_ARGV_1_string) \
- /**/
+ #define EV_AllowMobSpawning(i, o) /** caller */ i(entity, MUTATOR_ARGV_0_entity) /** reason */ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(AllowMobSpawning, EV_AllowMobSpawning);
/** called when a player gets damaged to e.g. remove stuff he was carrying. */
-#define EV_PlayerDamage_SplitHealthArmor(i, o) \
- /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /** target */ i(entity, MUTATOR_ARGV_2_entity) \
- /** force (no out) */ i(vector, MUTATOR_ARGV_3_vector) \
- /** damage take */ i(float, MUTATOR_ARGV_4_float) \
- /** damage take */ o(float, MUTATOR_ARGV_4_float) \
- /** damage save */ i(float, MUTATOR_ARGV_5_float) \
- /** damage save */ o(float, MUTATOR_ARGV_5_float) \
- /** deathtype */ i(float, MUTATOR_ARGV_6_float) \
- /** damage */ i(float, MUTATOR_ARGV_7_float) \
- /**/
+#define EV_PlayerDamage_SplitHealthArmor(i, o) /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /** target */ i(entity, MUTATOR_ARGV_2_entity) /** force (no out) */ i(vector, MUTATOR_ARGV_3_vector) /** damage take */ i(float, MUTATOR_ARGV_4_float) /** damage take */ o(float, MUTATOR_ARGV_4_float) /** damage save */ i(float, MUTATOR_ARGV_5_float) /** damage save */ o(float, MUTATOR_ARGV_5_float) /** deathtype */ i(float, MUTATOR_ARGV_6_float) /** damage */ i(float, MUTATOR_ARGV_7_float) /**/
MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor, EV_PlayerDamage_SplitHealthArmor);
/**
* called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier
* i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
*/
-#define EV_Damage_Calculate(i, o) \
- /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /** target */ i(entity, MUTATOR_ARGV_2_entity) \
- /** deathtype */ i(float, MUTATOR_ARGV_3_float) \
- /** damage */ i(float, MUTATOR_ARGV_4_float) \
- /** damage */ o(float, MUTATOR_ARGV_4_float) \
- /** mirrordamage */ i(float, MUTATOR_ARGV_5_float) \
- /** mirrordamage */ o(float, MUTATOR_ARGV_5_float) \
- /** force */ i(vector, MUTATOR_ARGV_6_vector) \
- /** force */ o(vector, MUTATOR_ARGV_6_vector) \
- /** weapon entity */ i(entity, MUTATOR_ARGV_7_entity) \
- /**/
+#define EV_Damage_Calculate(i, o) /** inflictor */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /** target */ i(entity, MUTATOR_ARGV_2_entity) /** deathtype */ i(float, MUTATOR_ARGV_3_float) /** damage */ i(float, MUTATOR_ARGV_4_float) /** damage */ o(float, MUTATOR_ARGV_4_float) /** mirrordamage */ i(float, MUTATOR_ARGV_5_float) /** mirrordamage */ o(float, MUTATOR_ARGV_5_float) /** force */ i(vector, MUTATOR_ARGV_6_vector) /** force */ o(vector, MUTATOR_ARGV_6_vector) /** weapon entity */ i(entity, MUTATOR_ARGV_7_entity) /**/
MUTATOR_HOOKABLE(Damage_Calculate, EV_Damage_Calculate);
/**
* Called when a player is damaged
*/
-#define EV_PlayerDamaged(i, o) \
- /** attacker */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /** health */ i(float, MUTATOR_ARGV_2_float) \
- /** armor */ i(float, MUTATOR_ARGV_3_float) \
- /** location */ i(vector, MUTATOR_ARGV_4_vector) \
- /** deathtype */ i(int, MUTATOR_ARGV_5_int) \
- /** potential_damage */ i(float, MUTATOR_ARGV_6_float) \
- /**/
+#define EV_PlayerDamaged(i, o) /** attacker */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /** health */ i(float, MUTATOR_ARGV_2_float) /** armor */ i(float, MUTATOR_ARGV_3_float) /** location */ i(vector, MUTATOR_ARGV_4_vector) /** deathtype */ i(int, MUTATOR_ARGV_5_int) /** potential_damage */ i(float, MUTATOR_ARGV_6_float) /**/
MUTATOR_HOOKABLE(PlayerDamaged, EV_PlayerDamaged);
/**
* Called by W_DecreaseAmmo
*/
-#define EV_W_DecreaseAmmo(i, o) \
- /** actor */ i(entity, MUTATOR_ARGV_0_entity) \
- /** weapon entity */ i(entity, MUTATOR_ARGV_1_entity) \
- /** ammo to take */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_W_DecreaseAmmo(i, o) /** actor */ i(entity, MUTATOR_ARGV_0_entity) /** weapon entity */ i(entity, MUTATOR_ARGV_1_entity) /** ammo to take */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(W_DecreaseAmmo, EV_W_DecreaseAmmo);
/**
* Called by W_Reload
*/
-#define EV_W_Reload(i, o) \
- /** actor */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_W_Reload(i, o) /** actor */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(W_Reload, EV_W_Reload);
/** called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items. */
-#define EV_PlayerPowerups(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** old items */ i(int, MUTATOR_ARGV_1_int) \
- /**/
+#define EV_PlayerPowerups(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** old items */ i(int, MUTATOR_ARGV_1_int) /**/
MUTATOR_HOOKABLE(PlayerPowerups, EV_PlayerPowerups);
/**
* called every player think frame
* return 1 to disable regen
*/
- #define EV_PlayerRegen(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** max_mod */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /** regen_mod */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /** rot_mod */ i(float, MUTATOR_ARGV_3_float) \
- /**/ o(float, MUTATOR_ARGV_3_float) \
- /** limit_mod */ i(float, MUTATOR_ARGV_4_float) \
- /**/ o(float, MUTATOR_ARGV_4_float) \
- /** health_regen */ i(float, MUTATOR_ARGV_5_float) \
- /**/ o(float, MUTATOR_ARGV_5_float) \
- /** health_regenlinear */ i(float, MUTATOR_ARGV_6_float) \
- /**/ o(float, MUTATOR_ARGV_6_float) \
- /** health_rot */ i(float, MUTATOR_ARGV_7_float) \
- /**/ o(float, MUTATOR_ARGV_7_float) \
- /** health_rotlinear */ i(float, MUTATOR_ARGV_8_float) \
- /**/ o(float, MUTATOR_ARGV_8_float) \
- /** health_stable */ i(float, MUTATOR_ARGV_9_float) \
- /**/ o(float, MUTATOR_ARGV_9_float) \
- /** health_rotstable */ i(float, MUTATOR_ARGV_10_float) \
- /**/ o(float, MUTATOR_ARGV_10_float) \
- /**/
+ #define EV_PlayerRegen(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** max_mod */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /** regen_mod */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /** rot_mod */ i(float, MUTATOR_ARGV_3_float) /**/ o(float, MUTATOR_ARGV_3_float) /** limit_mod */ i(float, MUTATOR_ARGV_4_float) /**/ o(float, MUTATOR_ARGV_4_float) /** health_regen */ i(float, MUTATOR_ARGV_5_float) /**/ o(float, MUTATOR_ARGV_5_float) /** health_regenlinear */ i(float, MUTATOR_ARGV_6_float) /**/ o(float, MUTATOR_ARGV_6_float) /** health_rot */ i(float, MUTATOR_ARGV_7_float) /**/ o(float, MUTATOR_ARGV_7_float) /** health_rotlinear */ i(float, MUTATOR_ARGV_8_float) /**/ o(float, MUTATOR_ARGV_8_float) /** health_stable */ i(float, MUTATOR_ARGV_9_float) /**/ o(float, MUTATOR_ARGV_9_float) /** health_rotstable */ i(float, MUTATOR_ARGV_10_float) /**/ o(float, MUTATOR_ARGV_10_float) /**/
MUTATOR_HOOKABLE(PlayerRegen, EV_PlayerRegen);
/**
* if MUTATOR_RETURNVALUE is 1, don't do anything
* return 1 if the use key actually did something
*/
- #define EV_PlayerUseKey(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+ #define EV_PlayerUseKey(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PlayerUseKey, EV_PlayerUseKey);
/**
* return false;
* }
*/
-#define EV_SV_ParseClientCommand(i, o) \
- /** client sending the command */ i(entity, MUTATOR_ARGV_0_entity) \
- /** command name */ i(string, MUTATOR_ARGV_1_string) \
- /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_2_int) \
- /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_3_string) \
- /**/
+#define EV_SV_ParseClientCommand(i, o) /** client sending the command */ i(entity, MUTATOR_ARGV_0_entity) /** command name */ i(string, MUTATOR_ARGV_1_string) /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_2_int) /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_3_string) /**/
MUTATOR_HOOKABLE(SV_ParseClientCommand, EV_SV_ParseClientCommand);
/** please read EV_SV_ParseClientCommand description before using */
-#define EV_SV_ParseServerCommand(i, o) \
- /** command name */ i(string, MUTATOR_ARGV_0_string) \
- /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_1_int) \
- /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_2_string) \
- /**/
+#define EV_SV_ParseServerCommand(i, o) /** command name */ i(string, MUTATOR_ARGV_0_string) /** argc (also, argv() can be used) */ i(int, MUTATOR_ARGV_1_int) /** whole command, use only if you really have to */ i(string, MUTATOR_ARGV_2_string) /**/
MUTATOR_HOOKABLE(SV_ParseServerCommand, EV_SV_ParseServerCommand);
/**
* called when a spawnpoint is being evaluated
* return 1 to make the spawnpoint unusable
*/
-#define EV_Spawn_Score(i, o) \
- /** player wanting to spawn */ i(entity, MUTATOR_ARGV_0_entity) \
- /** spot to be evaluated */ i(entity, MUTATOR_ARGV_1_entity) \
- /** spot score, _x is priority, _y is "distance" */ i(vector, MUTATOR_ARGV_2_vector) \
- /**/ o(vector, MUTATOR_ARGV_2_vector) \
- /**/
+#define EV_Spawn_Score(i, o) /** player wanting to spawn */ i(entity, MUTATOR_ARGV_0_entity) /** spot to be evaluated */ i(entity, MUTATOR_ARGV_1_entity) /** spot score, _x is priority, _y is "distance" */ i(vector, MUTATOR_ARGV_2_vector) /**/ o(vector, MUTATOR_ARGV_2_vector) /**/
MUTATOR_HOOKABLE(Spawn_Score, EV_Spawn_Score);
/** runs globally each server frame */
MUTATOR_HOOKABLE(SV_StartFrame, EV_NO_ARGS);
-#define EV_SetModname(i, o) \
- /** name of the mutator/mod if it warrants showing as such in the server browser */ \
- /**/ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_SetModname(i, o) /** name of the mutator/mod if it warrants showing as such in the server browser */ /**/ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(SetModname, EV_SetModname);
/**
* called for each item being spawned on a map, including dropped weapons
* return 1 to remove an item
*/
-#define EV_Item_Spawn(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Item_Spawn(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Item_Spawn, EV_Item_Spawn);
-#define EV_SetWeaponreplace(i, o) \
- /** map entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** weapon info */ i(entity, MUTATOR_ARGV_1_entity) \
- /** replacement */ i(string, MUTATOR_ARGV_2_string) \
- /**/ o(string, MUTATOR_ARGV_2_string) \
- /**/
+#define EV_SetWeaponreplace(i, o) /** map entity */ i(entity, MUTATOR_ARGV_0_entity) /** weapon info */ i(entity, MUTATOR_ARGV_1_entity) /** replacement */ i(string, MUTATOR_ARGV_2_string) /**/ o(string, MUTATOR_ARGV_2_string) /**/
MUTATOR_HOOKABLE(SetWeaponreplace, EV_SetWeaponreplace);
/** called when an item is about to respawn */
-#define EV_Item_RespawnCountdown(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Item_RespawnCountdown(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Item_RespawnCountdown, EV_Item_RespawnCountdown);
/** called when a bot checks a target to attack */
-#define EV_BotShouldAttack(i, o) \
- /** bot */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_BotShouldAttack(i, o) /** bot */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(BotShouldAttack, EV_BotShouldAttack);
/**
* called whenever a player goes through a portal gun teleport
* allows you to strip a player of an item if they go through the teleporter to help prevent cheating
*/
-#define EV_PortalTeleport(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PortalTeleport(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PortalTeleport, EV_PortalTeleport);
/**
* but if your mutator uses something different then you can handle it
* in a special manner using this hook
*/
-#define EV_HelpMePing(i, o) \
- /** the player who pressed impulse 33 */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_HelpMePing(i, o) /** the player who pressed impulse 33 */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(HelpMePing, EV_HelpMePing);
/**
* called when a vehicle initializes
* return true to remove the vehicle
*/
-#define EV_VehicleInit(i, o) \
- /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_VehicleInit(i, o) /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(VehicleInit, EV_VehicleInit);
/**
* called when a player enters a vehicle
* allows mutators to set special settings in this event
*/
-#define EV_VehicleEnter(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** vehicle */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_VehicleEnter(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** vehicle */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(VehicleEnter, EV_VehicleEnter);
/**
* called when a player touches a vehicle
* return true to stop player from entering the vehicle
*/
-#define EV_VehicleTouch(i, o) \
- /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
- /** player */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_VehicleTouch(i, o) /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) /** player */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(VehicleTouch, EV_VehicleTouch);
/**
* called when a player exits a vehicle
* allows mutators to set special settings in this event
*/
-#define EV_VehicleExit(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** vehicle */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_VehicleExit(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** vehicle */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(VehicleExit, EV_VehicleExit);
/** called when a speedrun is aborted and the player is teleported back to start position */
-#define EV_AbortSpeedrun(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_AbortSpeedrun(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(AbortSpeedrun, EV_AbortSpeedrun);
/** called at when a item is touched. Called early, can edit item properties. */
-#define EV_ItemTouch(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /** toucher */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_ItemTouch(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /** toucher */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(ItemTouch, EV_ItemTouch);
enum {
};
/** called after the item has been touched. */
-#define EV_ItemTouched(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /** toucher */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_ItemTouched(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /** toucher */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(ItemTouched, EV_ItemTouched);
/** Called when the amount of entity resources changes. Can be used to override
resource limit. */
-#define EV_GetResourceLimit(i, o) \
- /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /** limit */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_GetResourceLimit(i, o) /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /** limit */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(GetResourceLimit, EV_GetResourceLimit);
/** Called when the amount of resource of an entity changes. See RES_*
constants for resource types. Return true to forbid the change. */
-#define EV_SetResource(i, o) \
- /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_SetResource(i, o) /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(SetResource, EV_SetResource);
/** Called after the amount of resource of an entity has changed. See RES_*
constants for resource types. Amount wasted is the amount of resource that is
above resource limit so it was not given. */
-#define EV_ResourceAmountChanged(i, o) \
- /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_ResourceAmountChanged(i, o) /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(ResourceAmountChanged, EV_ResourceAmountChanged);
/** Called when there was an attempt to set entity resources higher than their
limit. See RES_* constants for resource types. Amount wasted is the amount
of resource that is above resource limit so it was not given. */
-#define EV_ResourceWasted(i, o) \
- /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /** amount wasted */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_ResourceWasted(i, o) /** checked entity */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /** amount wasted */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(ResourceWasted, EV_ResourceWasted);
/** Called when entity is being given some resource. See RES_* constants
for resource types. Return true to forbid giving.
NOTE: This hook is also called by GiveResourceWithLimit */
-#define EV_GiveResource(i, o) \
- /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_GiveResource(i, o) /** receiver */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(GiveResource, EV_GiveResource);
/** Called when entity is being given some resource with specified limit. See
RES_* constants for resource types. Return true to forbid giving. */
-#define EV_GiveResourceWithLimit(i, o) \
- /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /** limit */ i(float, MUTATOR_ARGV_3_float) \
- /**/ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_GiveResourceWithLimit(i, o) /** receiver */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /** limit */ i(float, MUTATOR_ARGV_3_float) /**/ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(GiveResourceWithLimit, EV_GiveResourceWithLimit);
/** Called when some resource is being taken from an entity. See RES_* constants
for resource types. Return true to forbid giving.
NOTE: This hook is also called by TakeResourceWithLimit */
-#define EV_TakeResource(i, o) \
- /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_TakeResource(i, o) /** receiver */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(TakeResource, EV_TakeResource);
/** Called when some resource is being taken from an entity, with a limit. See
RES_* constants for resource types. Return true to forbid giving. */
-#define EV_TakeResourceWithLimit(i, o) \
- /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \
- /** resource type */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** amount */ i(float, MUTATOR_ARGV_2_float) \
- /**/ o(float, MUTATOR_ARGV_2_float) \
- /** limit */ i(float, MUTATOR_ARGV_3_float) \
- /**/ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_TakeResourceWithLimit(i, o) /** receiver */ i(entity, MUTATOR_ARGV_0_entity) /** resource type */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** amount */ i(float, MUTATOR_ARGV_2_float) /**/ o(float, MUTATOR_ARGV_2_float) /** limit */ i(float, MUTATOR_ARGV_3_float) /**/ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(TakeResourceWithLimit, EV_TakeResourceWithLimit);
/** called at when a player connect */
-#define EV_ClientConnect(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ClientConnect(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ClientConnect, EV_ClientConnect);
-#define EV_HavocBot_ChooseRole(i, o) \
- /** bot */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_HavocBot_ChooseRole(i, o) /** bot */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(HavocBot_ChooseRole, EV_HavocBot_ChooseRole);
/** called when a target is checked for accuracy */
-#define EV_AccuracyTargetValid(i, o) \
- /** attacker */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_AccuracyTargetValid(i, o) /** attacker */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(AccuracyTargetValid, EV_AccuracyTargetValid);
enum {
MUT_ACCADD_VALID, // return this flag to make the function continue if target is a client
MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
/** Called when getting the global parameters for a model */
-#define EV_GetModelParams(i, o) \
- /** input */ i(string, MUTATOR_ARGV_0_string) \
- /** command */ i(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_GetModelParams(i, o) /** input */ i(string, MUTATOR_ARGV_0_string) /** command */ i(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
/** called when a bullet has hit a target */
-#define EV_FireBullet_Hit(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** targ */ i(entity, MUTATOR_ARGV_1_entity) \
- /** start pos */ i(vector, MUTATOR_ARGV_2_vector) \
- /** end pos */ i(vector, MUTATOR_ARGV_3_vector) \
- /** damage */ i(float, MUTATOR_ARGV_4_float) \
- /**/ o(float, MUTATOR_ARGV_4_float) \
- /** wep entity */ i(entity, MUTATOR_ARGV_5_entity) \
- /**/
+#define EV_FireBullet_Hit(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** targ */ i(entity, MUTATOR_ARGV_1_entity) /** start pos */ i(vector, MUTATOR_ARGV_2_vector) /** end pos */ i(vector, MUTATOR_ARGV_3_vector) /** damage */ i(float, MUTATOR_ARGV_4_float) /**/ o(float, MUTATOR_ARGV_4_float) /** wep entity */ i(entity, MUTATOR_ARGV_5_entity) /**/
MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit);
-#define EV_FixPlayermodel(i, o) \
- /** model */ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /** skin */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** player */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_FixPlayermodel(i, o) /** model */ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /** skin */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** player */ i(entity, MUTATOR_ARGV_2_entity) /**/
MUTATOR_HOOKABLE(FixPlayermodel, EV_FixPlayermodel);
/** Return error to play frag remaining announcements */
MUTATOR_HOOKABLE(Scores_CountFragsRemaining, EV_NO_ARGS);
-#define EV_GrappleHookThink(i, o) \
- /** hook */ i(entity, MUTATOR_ARGV_0_entity) \
- /** tarzan */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /** pulling entity */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/ o(entity, MUTATOR_ARGV_2_entity) \
- /** velocity multiplier */ i(float, MUTATOR_ARGV_3_float) \
- /**/ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_GrappleHookThink(i, o) /** hook */ i(entity, MUTATOR_ARGV_0_entity) /** tarzan */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /** pulling entity */ i(entity, MUTATOR_ARGV_2_entity) /**/ o(entity, MUTATOR_ARGV_2_entity) /** velocity multiplier */ i(float, MUTATOR_ARGV_3_float) /**/ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(GrappleHookThink, EV_GrappleHookThink);
-#define EV_BuffModel_Customize(i, o) \
- /** buff */ i(entity, MUTATOR_ARGV_0_entity) \
- /** player */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_BuffModel_Customize(i, o) /** buff */ i(entity, MUTATOR_ARGV_0_entity) /** player */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(BuffModel_Customize, EV_BuffModel_Customize);
/** called at when a buff is touched. Called early, can edit buff properties. */
-#define EV_BuffTouch(i, o) \
- /** buff */ i(entity, MUTATOR_ARGV_0_entity) \
- /** player */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_BuffTouch(i, o) /** buff */ i(entity, MUTATOR_ARGV_0_entity) /** player */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(BuffTouch, EV_BuffTouch);
MUTATOR_HOOKABLE(SetNewParms, EV_NO_ARGS);
MUTATOR_HOOKABLE(DecodeLevelParms, EV_NO_ARGS);
-#define EV_GetRecords(i, o) \
- /** page */ i(int, MUTATOR_ARGV_0_int) \
- /** record list */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_GetRecords(i, o) /** page */ i(int, MUTATOR_ARGV_0_int) /** record list */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(GetRecords, EV_GetRecords);
-#define EV_Race_FinalCheckpoint(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Race_FinalCheckpoint(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Race_FinalCheckpoint, EV_Race_FinalCheckpoint);
/** called when player triggered kill (or is changing teams), return error to not do anything */
-#define EV_ClientKill(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** kill delay */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_ClientKill(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** kill delay */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(ClientKill, EV_ClientKill);
/** called when player is about to be killed during kill command or changing teams */
-#define EV_ClientKill_Now(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ClientKill_Now(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ClientKill_Now, EV_ClientKill_Now);
-#define EV_FixClientCvars(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_FixClientCvars(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(FixClientCvars, EV_FixClientCvars);
-#define EV_SpectateSet(i, o) \
- /** client */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_SpectateSet(i, o) /** client */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(SpectateSet, EV_SpectateSet);
-#define EV_SpectateNext(i, o) \
- /** client */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_SpectateNext(i, o) /** client */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(SpectateNext, EV_SpectateNext);
-#define EV_SpectatePrev(i, o) \
- /** client */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/ o(entity, MUTATOR_ARGV_1_entity) \
- /** first */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_SpectatePrev(i, o) /** client */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/ o(entity, MUTATOR_ARGV_1_entity) /** first */ i(entity, MUTATOR_ARGV_2_entity) /**/
MUTATOR_HOOKABLE(SpectatePrev, EV_SpectatePrev);
enum {
};
/** called when player triggered kill (or is changing teams), return error to not do anything */
-#define EV_Bot_FixCount(i, o) \
- /** active real players */ i(int, MUTATOR_ARGV_0_int) \
- /**/ o(int, MUTATOR_ARGV_0_int) \
- /** real players */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /**/
+#define EV_Bot_FixCount(i, o) /** active real players */ i(int, MUTATOR_ARGV_0_int) /**/ o(int, MUTATOR_ARGV_0_int) /** real players */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /**/
MUTATOR_HOOKABLE(Bot_FixCount, EV_Bot_FixCount);
-#define EV_ClientCommand_Spectate(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_ClientCommand_Spectate(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ClientCommand_Spectate, EV_ClientCommand_Spectate);
enum {
MUT_SPECCMD_FORCE // return this flag to force the player to spectate, even if they're not a player
};
-#define EV_CheckRules_World(i, o) \
- /** status */ i(float, MUTATOR_ARGV_0_float) \
- /**/ o(float, MUTATOR_ARGV_0_float) \
- /* time limit */ i(float, MUTATOR_ARGV_1_float) \
- /* frag limit */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_CheckRules_World(i, o) /** status */ i(float, MUTATOR_ARGV_0_float) /**/ o(float, MUTATOR_ARGV_0_float) /* time limit */ i(float, MUTATOR_ARGV_1_float) /* frag limit */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(CheckRules_World, EV_CheckRules_World);
-#define EV_WantWeapon(i, o) \
- /** weapon info entity */ i(entity, MUTATOR_ARGV_0_entity) \
- /** do want? */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /** want all guns */ i(bool, MUTATOR_ARGV_2_bool) \
- /**/ o(bool, MUTATOR_ARGV_2_bool) \
- /** want mutator blocked */ i(bool, MUTATOR_ARGV_3_bool) \
- /**/ o(bool, MUTATOR_ARGV_3_bool) \
- /**/
+#define EV_WantWeapon(i, o) /** weapon info entity */ i(entity, MUTATOR_ARGV_0_entity) /** do want? */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /** want all guns */ i(bool, MUTATOR_ARGV_2_bool) /**/ o(bool, MUTATOR_ARGV_2_bool) /** want mutator blocked */ i(bool, MUTATOR_ARGV_3_bool) /**/ o(bool, MUTATOR_ARGV_3_bool) /**/
MUTATOR_HOOKABLE(WantWeapon, EV_WantWeapon);
-#define EV_AddPlayerScore(i, o) \
- /** score field */ i(entity, MUTATOR_ARGV_0_entity) \
- /** score */ i(float, MUTATOR_ARGV_1_float) \
- /**/ o(float, MUTATOR_ARGV_1_float) \
- /** player */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_AddPlayerScore(i, o) /** score field */ i(entity, MUTATOR_ARGV_0_entity) /** score */ i(float, MUTATOR_ARGV_1_float) /**/ o(float, MUTATOR_ARGV_1_float) /** player */ i(entity, MUTATOR_ARGV_2_entity) /**/
MUTATOR_HOOKABLE(AddPlayerScore, EV_AddPlayerScore);
-#define EV_AddedPlayerScore(i, o) \
- /** score field */ i(entity, MUTATOR_ARGV_0_entity) \
- /** score */ i(float, MUTATOR_ARGV_1_float) \
- /** player */ i(entity, MUTATOR_ARGV_2_entity) \
- /**/
+#define EV_AddedPlayerScore(i, o) /** score field */ i(entity, MUTATOR_ARGV_0_entity) /** score */ i(float, MUTATOR_ARGV_1_float) /** player */ i(entity, MUTATOR_ARGV_2_entity) /**/
MUTATOR_HOOKABLE(AddedPlayerScore, EV_AddPlayerScore);
-#define EV_GetPlayerStatus(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_GetPlayerStatus(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(GetPlayerStatus, EV_GetPlayerStatus);
-#define EV_SetWeaponArena(i, o) \
- /** arena */ i(string, MUTATOR_ARGV_0_string) \
- /**/ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_SetWeaponArena(i, o) /** arena */ i(string, MUTATOR_ARGV_0_string) /**/ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(SetWeaponArena, EV_SetWeaponArena);
-#define EV_DropSpecialItems(i, o) \
- /** target */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_DropSpecialItems(i, o) /** target */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(DropSpecialItems, EV_DropSpecialItems);
/**
* called when an admin tries to kill all monsters
* return 1 to prevent spawning
*/
-#define EV_AllowMobButcher(i, o) \
- /** reason */ o(string, MUTATOR_ARGV_0_string) \
- /**/
+#define EV_AllowMobButcher(i, o) /** reason */ o(string, MUTATOR_ARGV_0_string) /**/
MUTATOR_HOOKABLE(AllowMobButcher, EV_AllowMobButcher);
MUTATOR_HOOKABLE(ReadLevelCvars, EV_NO_ARGS);
-#define EV_SendWaypoint(i, o) \
- /** waypoint */ i(entity, MUTATOR_ARGV_0_entity) \
- /** to */ i(entity, MUTATOR_ARGV_1_entity) \
- /** send flags */ i(int, MUTATOR_ARGV_2_int) \
- /**/ o(int, MUTATOR_ARGV_2_int) \
- /** wp flag */ i(int, MUTATOR_ARGV_3_int) \
- /**/ o(int, MUTATOR_ARGV_3_int) \
- /**/
+#define EV_SendWaypoint(i, o) /** waypoint */ i(entity, MUTATOR_ARGV_0_entity) /** to */ i(entity, MUTATOR_ARGV_1_entity) /** send flags */ i(int, MUTATOR_ARGV_2_int) /**/ o(int, MUTATOR_ARGV_2_int) /** wp flag */ i(int, MUTATOR_ARGV_3_int) /**/ o(int, MUTATOR_ARGV_3_int) /**/
MUTATOR_HOOKABLE(SendWaypoint, EV_SendWaypoint);
-#define EV_TurretValidateTarget(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /** validate flags */ i(int, MUTATOR_ARGV_2_int) \
- /** target score */ o(float, MUTATOR_ARGV_3_float) \
- /**/
+#define EV_TurretValidateTarget(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /** validate flags */ i(int, MUTATOR_ARGV_2_int) /** target score */ o(float, MUTATOR_ARGV_3_float) /**/
MUTATOR_HOOKABLE(TurretValidateTarget, EV_TurretValidateTarget);
-#define EV_TurretThink(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_TurretThink(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(TurretThink, EV_TurretThink);
MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
/** */
-#define EV_PrepareExplosionByDamage(i, o) \
- /** projectile */ i(entity, MUTATOR_ARGV_0_entity) \
- /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_PrepareExplosionByDamage(i, o) /** projectile */ i(entity, MUTATOR_ARGV_0_entity) /** attacker */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(PrepareExplosionByDamage, EV_PrepareExplosionByDamage);
/** called when a monster model is about to be set, allows custom paths etc. */
-#define EV_MonsterModel(i, o) \
- /** model */ i(string, MUTATOR_ARGV_0_string) \
- /** output */ i(string, MUTATOR_ARGV_1_string) \
- /**/ o(string, MUTATOR_ARGV_1_string) \
- /**/
+#define EV_MonsterModel(i, o) /** model */ i(string, MUTATOR_ARGV_0_string) /** output */ i(string, MUTATOR_ARGV_1_string) /**/ o(string, MUTATOR_ARGV_1_string) /**/
MUTATOR_HOOKABLE(MonsterModel, EV_MonsterModel);
/**
* Called before player changes their team. Return true to block team change.
*/
-#define EV_Player_ChangeTeam(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** current team index */ i(float, MUTATOR_ARGV_1_float) \
- /** new team index */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_Player_ChangeTeam(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** current team index */ i(float, MUTATOR_ARGV_1_float) /** new team index */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(Player_ChangeTeam, EV_Player_ChangeTeam);
/**
* Called after player has changed their team.
*/
-#define EV_Player_ChangedTeam(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** old team index */ i(float, MUTATOR_ARGV_1_float) \
- /** current team index */ i(float, MUTATOR_ARGV_2_float) \
- /**/
+#define EV_Player_ChangedTeam(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** old team index */ i(float, MUTATOR_ARGV_1_float) /** current team index */ i(float, MUTATOR_ARGV_2_float) /**/
MUTATOR_HOOKABLE(Player_ChangedTeam, EV_Player_ChangedTeam);
/**
* Called when player is about to be killed when changing teams. Return true to block killing.
*/
-#define EV_Player_ChangeTeamKill(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Player_ChangeTeamKill(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Player_ChangeTeamKill, EV_Player_ChangeTeamKill);
/**/
-#define EV_URI_GetCallback(i, o) \
- /** id */ i(float, MUTATOR_ARGV_0_float) \
- /** status */ i(float, MUTATOR_ARGV_1_float) \
- /** data */ i(string, MUTATOR_ARGV_2_string) \
- /**/
+#define EV_URI_GetCallback(i, o) /** id */ i(float, MUTATOR_ARGV_0_float) /** status */ i(float, MUTATOR_ARGV_1_float) /** data */ i(string, MUTATOR_ARGV_2_string) /**/
MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback);
/**
* return true to prevent weapon use for a player
*/
- #define EV_ForbidWeaponUse(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+ #define EV_ForbidWeaponUse(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(ForbidWeaponUse, EV_ForbidWeaponUse);
/** called when creating a clone of the player (usually for corpses that stay after the player has re-spawned) */
-#define EV_CopyBody(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** newly created clone */ i(entity, MUTATOR_ARGV_1_entity) \
- /** keepvelocity? */ i(bool, MUTATOR_ARGV_2_bool) \
- /**/
+#define EV_CopyBody(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** newly created clone */ i(entity, MUTATOR_ARGV_1_entity) /** keepvelocity? */ i(bool, MUTATOR_ARGV_2_bool) /**/
MUTATOR_HOOKABLE(CopyBody, EV_CopyBody);
/** called when sending a chat message, ret argument can be changed to prevent the message */
-#define EV_ChatMessage(i, o) \
- /** sender */ i(entity, MUTATOR_ARGV_0_entity) \
- /** ret */ i(int, MUTATOR_ARGV_1_int) \
- /**/ o(int, MUTATOR_ARGV_1_int) \
- /**/
+#define EV_ChatMessage(i, o) /** sender */ i(entity, MUTATOR_ARGV_0_entity) /** ret */ i(int, MUTATOR_ARGV_1_int) /**/ o(int, MUTATOR_ARGV_1_int) /**/
MUTATOR_HOOKABLE(ChatMessage, EV_ChatMessage);
/** return true to prevent sending a chat (private, team or regular) message from reaching a certain player */
-#define EV_ChatMessageTo(i, o) \
- /** destination player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** sender */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_ChatMessageTo(i, o) /** destination player */ i(entity, MUTATOR_ARGV_0_entity) /** sender */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(ChatMessageTo, EV_ChatMessageTo);
/** return true to just restart the match, for modes that don't support readyrestart */
MUTATOR_HOOKABLE(ReadyRestart_Deny, EV_NO_ARGS);
/** called when a fusion reactor is validating its target */
-#define EV_FusionReactor_ValidTarget(i, o) \
- /** turret */ i(entity, MUTATOR_ARGV_0_entity) \
- /** target */ i(entity, MUTATOR_ARGV_1_entity) \
- /**/
+#define EV_FusionReactor_ValidTarget(i, o) /** turret */ i(entity, MUTATOR_ARGV_0_entity) /** target */ i(entity, MUTATOR_ARGV_1_entity) /**/
MUTATOR_HOOKABLE(FusionReactor_ValidTarget, EV_FusionReactor_ValidTarget);
enum {
};
/** return true to hide the 'teamnumbers are imbalanced' message */
-#define EV_HideTeamNagger(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_HideTeamNagger(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(HideTeamNagger, EV_HideTeamNagger);
/** return true to show a waypoint while the item is spawning */
-#define EV_Item_ScheduleRespawn(i, o) \
- /** item */ i(entity, MUTATOR_ARGV_0_entity) \
- /** respawn time */ i(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_Item_ScheduleRespawn(i, o) /** item */ i(entity, MUTATOR_ARGV_0_entity) /** respawn time */ i(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(Item_ScheduleRespawn, EV_Item_ScheduleRespawn);
/** called before physics stats are set on a player, allows limited early customization */
-#define EV_PlayerPhysics_UpdateStats(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_PlayerPhysics_UpdateStats(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(PlayerPhysics_UpdateStats, EV_PlayerPhysics_UpdateStats);
/** called after physics stats are set on a player, allows post-initialization modifications */
-#define EV_PlayerPhysics_PostUpdateStats(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /** maxspeed_mod */ i(float, MUTATOR_ARGV_1_float) \
- /**/
+#define EV_PlayerPhysics_PostUpdateStats(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /** maxspeed_mod */ i(float, MUTATOR_ARGV_1_float) /**/
MUTATOR_HOOKABLE(PlayerPhysics_PostUpdateStats, EV_PlayerPhysics_PostUpdateStats);
/** return true to use your own aim target (or none at all) */
-#define EV_HavocBot_Aim(i, o) \
- /** bot */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_HavocBot_Aim(i, o) /** bot */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(HavocBot_Aim, EV_HavocBot_Aim);
/** return true to skip respawn time calculations */
-#define EV_CalculateRespawnTime(i, o) \
- /** player */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_CalculateRespawnTime(i, o) /** player */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(CalculateRespawnTime, EV_CalculateRespawnTime);
/** called when parsing a vote command. */
-#define EV_VoteCommand_Parse(i, o) \
- /** caller */ i(entity, MUTATOR_ARGV_0_entity) \
- /** first command */ i(string, MUTATOR_ARGV_1_string) \
- /** vote command */ i(string, MUTATOR_ARGV_2_string) \
- /** start position of vote command */ i(float, MUTATOR_ARGV_3_float) \
- /** argument count */ i(float, MUTATOR_ARGV_4_float) \
- /**/
+#define EV_VoteCommand_Parse(i, o) /** caller */ i(entity, MUTATOR_ARGV_0_entity) /** first command */ i(string, MUTATOR_ARGV_1_string) /** vote command */ i(string, MUTATOR_ARGV_2_string) /** start position of vote command */ i(float, MUTATOR_ARGV_3_float) /** argument count */ i(float, MUTATOR_ARGV_4_float) /**/
MUTATOR_HOOKABLE(VoteCommand_Parse, EV_VoteCommand_Parse);
enum {
/**
* Called when freezing an entity (monster or player), return true to force showing a waypoint
*/
-#define EV_Freeze(i, o) \
- /** targ */ i(entity, MUTATOR_ARGV_0_entity) \
- /** revive speed */ i(float, MUTATOR_ARGV_1_float) \
- /** frozen type */ i(int, MUTATOR_ARGV_2_int) \
- /**/
+#define EV_Freeze(i, o) /** targ */ i(entity, MUTATOR_ARGV_0_entity) /** revive speed */ i(float, MUTATOR_ARGV_1_float) /** frozen type */ i(int, MUTATOR_ARGV_2_int) /**/
MUTATOR_HOOKABLE(Freeze, EV_Freeze);
/**
* Called when an entity (monster or player) is defrosted
*/
-#define EV_Unfreeze(i, o) \
- /** targ */ i(entity, MUTATOR_ARGV_0_entity) \
- /**/
+#define EV_Unfreeze(i, o) /** targ */ i(entity, MUTATOR_ARGV_0_entity) /**/
MUTATOR_HOOKABLE(Unfreeze, EV_Unfreeze);
/**
* Called when a player is trying to join, argument is the number of players allowed to join the match
*/
-#define EV_GetPlayerLimit(i, o) \
- /** g_maxplayers */ i(int, MUTATOR_ARGV_0_int) \
- /**/ o(int, MUTATOR_ARGV_0_int) \
- /**/
+#define EV_GetPlayerLimit(i, o) /** g_maxplayers */ i(int, MUTATOR_ARGV_0_int) /**/ o(int, MUTATOR_ARGV_0_int) /**/
MUTATOR_HOOKABLE(GetPlayerLimit, EV_GetPlayerLimit);
// If <0, 0 is used.
// Otherwise, g_str (default value) is used.
// For consistency, negative values there are mapped to zero too.
-#define GAMETYPE_DEFAULTED_SETTING(str) \
- ((gametype_setting_tmp = cvar(strcat("g_", GetGametype(), "_" #str))), \
- (gametype_setting_tmp < 0) ? 0 \
- : (gametype_setting_tmp == 0 || autocvar_g_respawn_delay_forced) ? max(0, autocvar_g_##str) \
- : gametype_setting_tmp)
+#define GAMETYPE_DEFAULTED_SETTING(str) ((gametype_setting_tmp = cvar(strcat("g_", GetGametype(), "_" #str))), (gametype_setting_tmp < 0) ? 0 : (gametype_setting_tmp == 0 || autocvar_g_respawn_delay_forced) ? max(0, autocvar_g_##str) : gametype_setting_tmp)
void calculate_player_respawn_time(entity this);
int o;
string k, v;
s = argv(i);
- #define X(expr) \
- if (expr) \
- continue; \
- expr_fail = true; \
- break;
-
- #define BINOP(op, len, expr) \
- if ((o = strstrofs(s, op, 0)) >= 0) { \
- k = substring(s, 0, o); \
- v = substring(s, o + len, -1); \
- X(expr); \
- }
+ #define X(expr) if (expr) continue; expr_fail = true; break;
+
+ #define BINOP(op, len, expr) if ((o = strstrofs(s, op, 0)) >= 0) { k = substring(s, 0, o); v = substring(s, o + len, -1); X(expr); }
BINOP(">=", 2, cvar(k) >= stof(v));
BINOP("<=", 2, cvar(k) <= stof(v));
BINOP(">", 1, cvar(k) > stof(v));
if (this.angles == '0 -1 0') {
this.angles = '-90 0 0';
} else if (this.angles == '0 -2 0') {
- this.angles = '+90 0 0';
+ this.angles = '90 0 0';
}
- #define X(out, in) MACRO_BEGIN \
- if (in != 0) { out = out + (random() * 2 - 1) * in; } \
- MACRO_END
+ #define X(out, in) MACRO_BEGIN if (in != 0) { out = out + (random() * 2 - 1) * in; } MACRO_END
X(this.origin.x, this.originjitter.x); X(this.origin.y, this.originjitter.y); X(this.origin.z, this.originjitter.z);
X(this.angles.x, this.anglesjitter.x); X(this.angles.y, this.anglesjitter.y); X(this.angles.z, this.anglesjitter.z);
X(this.angles.y, this.anglejitter);
// NOTE: FOR_EACH_OBSERVER deprecated! Use the following instead: FOREACH_CLIENT(IS_OBSERVER(it), { code; });
// NOTE: FOR_EACH_REALPLAYER deprecated! Use the following instead: FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { code; });
-#define FOREACH_CLIENTSLOT(cond, body) \
- MACRO_BEGIN \
- for(int _i = 1; _i <= maxclients; ++_i) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = ftoe(i); \
- if(cond) { LAMBDA(body) } \
- } \
- MACRO_END
+#define FOREACH_CLIENTSLOT(cond, body) MACRO_BEGIN for(int _i = 1; _i <= maxclients; ++_i) { const noref int i = _i; ITER_CONST noref entity it = ftoe(i); if(cond) { LAMBDA(body) } } MACRO_END
#define FOREACH_CLIENT(cond, body) FOREACH_CLIENTSLOT(IS_CLIENT(it) && (cond), LAMBDA(body))
// https://en.wikipedia.org/wiki/Fisher–Yates_shuffle
entity _FCR_clients[255];
bool _FCR_entered = false;
-#define FOREACH_CLIENT_RANDOM(cond, body) \
- MACRO_BEGIN \
- if (_FCR_entered) LOG_FATAL("FOREACH_CLIENT_RANDOM must not be nested"); \
- _FCR_entered = true; \
- int _cnt = 0; \
- FOREACH_CLIENT(cond, { \
- int _j = floor(random() * (_cnt + 1)); \
- if (_j != _cnt) \
- _FCR_clients[_cnt] = _FCR_clients[_j]; \
- _FCR_clients[_j] = it; \
- ++_cnt; \
- }); \
- for (int _i = 0; _i < _cnt; ++_i) \
- { \
- const noref int i = _i; \
- ITER_CONST noref entity it = _FCR_clients[i]; \
- if (cond) { LAMBDA(body) } \
- } \
- _FCR_entered = false; \
- MACRO_END
+#define FOREACH_CLIENT_RANDOM(cond, body) MACRO_BEGIN if (_FCR_entered) LOG_FATAL("FOREACH_CLIENT_RANDOM must not be nested"); _FCR_entered = true; int _cnt = 0; FOREACH_CLIENT(cond, { int _j = floor(random() * (_cnt + 1)); if (_j != _cnt) _FCR_clients[_cnt] = _FCR_clients[_j]; _FCR_clients[_j] = it; ++_cnt; }); for (int _i = 0; _i < _cnt; ++_i) { const noref int i = _i; ITER_CONST noref entity it = _FCR_clients[i]; if (cond) { LAMBDA(body) } } _FCR_entered = false; MACRO_END
// NOTE: FOR_EACH_MONSTER deprecated! Use the following instead: IL_EACH(g_monsters, true, { code; });
#define W_SetupProjVelocity_UP_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), WEP_CVAR_PRI(wepname, speed_up), WEP_CVAR_PRI(wepname, speed_z), WEP_CVAR_PRI(wepname, spread), false)
#define W_SetupProjVelocity_UP_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), WEP_CVAR_SEC(wepname, speed_up), WEP_CVAR_SEC(wepname, speed_z), WEP_CVAR_SEC(wepname, spread), false)
-#define W_SetupProjVelocity_UP_BOTH(ent,wepname,isprimary) \
- if(isprimary) { W_SetupProjVelocity_UP_PRI(ent, wepname); } \
- else { W_SetupProjVelocity_UP_SEC(ent, wepname); }
+#define W_SetupProjVelocity_UP_BOTH(ent,wepname,isprimary) if(isprimary) { W_SetupProjVelocity_UP_PRI(ent, wepname); } else { W_SetupProjVelocity_UP_SEC(ent, wepname); }
#define W_SetupProjVelocity_PRE(ent,wepname,prefix) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), 0, 0, WEP_CVAR(wepname, prefix##spread), false)
#define W_SetupProjVelocity_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), 0, 0, WEP_CVAR_PRI(wepname, spread), false)
#define W_SetupProjVelocity_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), 0, 0, WEP_CVAR_SEC(wepname, spread), false)
-#define W_SetupProjVelocity_BOTH(ent,wepname,isprimary) \
- if(isprimary) { W_SetupProjVelocity_PRI(ent, wepname); } \
- else { W_SetupProjVelocity_SEC(ent, wepname); }
+#define W_SetupProjVelocity_BOTH(ent,wepname,isprimary) if(isprimary) { W_SetupProjVelocity_PRI(ent, wepname); } else { W_SetupProjVelocity_SEC(ent, wepname); }
// ====================
// Ballistics Tracing