From 6e0735e995e35d56e60f8b816285077b7db0b155 Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 14 Mar 2016 18:27:41 +1100 Subject: [PATCH] #pragma once --- qcsrc/client/_all.qh | 5 +---- qcsrc/client/announcer.qh | 5 +---- qcsrc/client/autocvars.qh | 4 +--- qcsrc/client/bgmscript.qh | 5 +---- qcsrc/client/commands/all.qh | 5 +---- qcsrc/client/commands/cl_cmd.qh | 5 +---- qcsrc/client/csqc_constants.qh | 5 +---- qcsrc/client/defs.qh | 5 +---- qcsrc/client/hud/hud.qh | 4 +--- qcsrc/client/hud/hud_config.qh | 5 +---- qcsrc/client/main.qh | 5 +---- qcsrc/client/mapvoting.qh | 4 +--- qcsrc/client/miscfunctions.qh | 5 +---- qcsrc/client/mutators/events.qh | 5 +---- qcsrc/client/player_skeleton.qh | 4 +--- qcsrc/client/quickmenu.qh | 5 +---- qcsrc/client/scoreboard.qh | 4 +--- qcsrc/client/shownames.qh | 5 +---- qcsrc/client/teamradar.qh | 5 +---- qcsrc/client/wall.qh | 5 +---- qcsrc/client/weapons/projectile.qh | 5 +---- qcsrc/menu/_all.qh | 5 +---- qcsrc/menu/command/all.qh | 5 +---- qcsrc/menu/command/menu_cmd.qh | 4 +--- qcsrc/menu/draw.qh | 4 +--- qcsrc/menu/menu.qh | 4 +--- qcsrc/menu/mutators/events.qh | 4 +--- qcsrc/menu/skin.qh | 4 +--- qcsrc/menu/xonotic/util.qh | 4 +--- qcsrc/server/_all.qh | 5 +---- qcsrc/server/anticheat.qh | 4 +--- qcsrc/server/antilag.qh | 4 +--- qcsrc/server/autocvars.qh | 4 +--- qcsrc/server/bot/aim.qh | 4 +--- qcsrc/server/bot/bot.qh | 4 +--- qcsrc/server/bot/havocbot/havocbot.qh | 4 +--- qcsrc/server/bot/havocbot/roles.qh | 4 +--- qcsrc/server/bot/havocbot/scripting.qh | 4 +--- qcsrc/server/bot/navigation.qh | 4 +--- qcsrc/server/bot/scripting.qh | 4 +--- qcsrc/server/bot/waypoints.qh | 4 +--- qcsrc/server/campaign.qh | 4 +--- qcsrc/server/cheats.qh | 4 +--- qcsrc/server/cl_client.qh | 6 ++---- qcsrc/server/cl_impulse.qh | 4 +--- qcsrc/server/cl_player.qh | 5 +---- qcsrc/server/command/all.qh | 5 +---- qcsrc/server/command/banning.qh | 5 +---- qcsrc/server/command/cmd.qh | 4 +--- qcsrc/server/command/common.qh | 6 +----- qcsrc/server/command/getreplies.qh | 4 +--- qcsrc/server/command/radarmap.qh | 6 +----- qcsrc/server/command/sv_cmd.qh | 4 +--- qcsrc/server/command/vote.qh | 4 +--- qcsrc/server/constants.qh | 5 +---- qcsrc/server/defs.qh | 5 +---- qcsrc/server/g_damage.qh | 4 +--- qcsrc/server/g_hook.qh | 4 +--- qcsrc/server/g_subs.qh | 4 +--- qcsrc/server/g_world.qh | 5 +---- qcsrc/server/ipban.qh | 4 +--- qcsrc/server/item_key.qh | 5 +---- qcsrc/server/mapvoting.qh | 4 +--- qcsrc/server/miscfunctions.qh | 5 +---- qcsrc/server/mutators/all.qh | 7 ++----- qcsrc/server/mutators/events.qh | 4 +--- qcsrc/server/mutators/gamemode.qh | 5 +---- qcsrc/server/mutators/mutator.qh | 5 +---- qcsrc/server/pathlib/main.qh | 5 ++--- qcsrc/server/pathlib/pathlib.qh | 5 +---- qcsrc/server/pathlib/utility.qh | 5 ++--- qcsrc/server/playerdemo.qh | 4 +--- qcsrc/server/portals.qh | 4 +--- qcsrc/server/race.qh | 5 +---- qcsrc/server/round_handler.qh | 5 +---- qcsrc/server/scores.qh | 4 +--- qcsrc/server/scores_rules.qh | 5 +---- qcsrc/server/spawnpoints.qh | 4 +--- qcsrc/server/steerlib.qh | 5 +---- qcsrc/server/sys-post.qh | 5 +---- qcsrc/server/sys-pre.qh | 5 +---- qcsrc/server/teamplay.qh | 4 +--- qcsrc/server/weapons/accuracy.qh | 4 +--- qcsrc/server/weapons/common.qh | 4 +--- qcsrc/server/weapons/csqcprojectile.qh | 4 +--- qcsrc/server/weapons/hitplot.qh | 4 +--- qcsrc/server/weapons/selection.qh | 4 +--- qcsrc/server/weapons/spawning.qh | 4 +--- qcsrc/server/weapons/throwing.qh | 4 +--- qcsrc/server/weapons/tracing.qh | 4 +--- qcsrc/server/weapons/weaponstats.qh | 4 +--- qcsrc/server/weapons/weaponsystem.qh | 6 +----- 92 files changed, 96 insertions(+), 321 deletions(-) diff --git a/qcsrc/client/_all.qh b/qcsrc/client/_all.qh index 529734753..746734dee 100644 --- a/qcsrc/client/_all.qh +++ b/qcsrc/client/_all.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_ALL_H -#define CLIENT_ALL_H +#pragma once #include @@ -11,5 +10,3 @@ #include "defs.qh" #include "main.qh" #include "miscfunctions.qh" - -#endif diff --git a/qcsrc/client/announcer.qh b/qcsrc/client/announcer.qh index 314c6602d..c7c0eb025 100644 --- a/qcsrc/client/announcer.qh +++ b/qcsrc/client/announcer.qh @@ -1,8 +1,5 @@ -#ifndef CLIENT_ANNOUNCER_H -#define CLIENT_ANNOUNCER_H +#pragma once void Announcer(); string AnnouncerOption(); - -#endif diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 59ba16a5f..4b2571135 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_AUTOCVARS_H -#define CLIENT_AUTOCVARS_H +#pragma once bool autocvar__con_chat_maximized; bool autocvar__hud_configure; @@ -454,4 +453,3 @@ float autocvar_crosshair_rpc_alpha = 1; float autocvar_crosshair_rpc_size = 1; int autocvar_cl_nade_timer; bool autocvar_cl_items_nofade; -#endif diff --git a/qcsrc/client/bgmscript.qh b/qcsrc/client/bgmscript.qh index d979e79d0..18b0d5ee4 100644 --- a/qcsrc/client/bgmscript.qh +++ b/qcsrc/client/bgmscript.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_BGMSCRIPT_H -#define CLIENT_BGMSCRIPT_H +#pragma once entityclass(BGMScript); class(BGMScript) .string bgmscript; @@ -14,5 +13,3 @@ class(BGMScript) .float just_toggled; void BGMScript_InitEntity(entity e); float doBGMScript(entity e); #endif - -#endif diff --git a/qcsrc/client/commands/all.qh b/qcsrc/client/commands/all.qh index 3a15cca9a..2df61f004 100644 --- a/qcsrc/client/commands/all.qh +++ b/qcsrc/client/commands/all.qh @@ -1,8 +1,5 @@ -#ifndef CLIENT_COMMANDS_ALL_H -#define CLIENT_COMMANDS_ALL_H +#pragma once #include #include "cl_cmd.qh" - -#endif diff --git a/qcsrc/client/commands/cl_cmd.qh b/qcsrc/client/commands/cl_cmd.qh index d53d1b6a6..857adeaac 100644 --- a/qcsrc/client/commands/cl_cmd.qh +++ b/qcsrc/client/commands/cl_cmd.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_COMMANDS_CL_CMD_H -#define CLIENT_COMMANDS_CL_CMD_H +#pragma once void Cmd_HUD_SetFields(int); void Cmd_HUD_Help(); @@ -23,5 +22,3 @@ REGISTRY_SORT(CLIENT_COMMANDS) 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"))); } - -#endif diff --git a/qcsrc/client/csqc_constants.qh b/qcsrc/client/csqc_constants.qh index d70de9cb3..2ea1e746f 100644 --- a/qcsrc/client/csqc_constants.qh +++ b/qcsrc/client/csqc_constants.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_CSQC_CONSTANTS -#define CLIENT_CSQC_CONSTANTS +#pragma once // Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask) const int MASK_ENGINE = BIT(0); @@ -141,5 +140,3 @@ const int CAMERA_FREE = 1; const int CAMERA_CHASE = 2; const int EF_NOMODELFLAGS = BIT(23); - -#endif diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh index d3db0ebfd..84bcb2b3d 100644 --- a/qcsrc/client/defs.qh +++ b/qcsrc/client/defs.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_DEFS_H -#define CLIENT_DEFS_H +#pragma once // Additional OPTIONAL Fields and Globals //float intermission; @@ -122,5 +121,3 @@ float uid2name_dialog; .bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) - -#endif diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 45dd4887f..b931a34ef 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_HUD_H -#define CLIENT_HUD_H +#pragma once #include @@ -412,4 +411,3 @@ void HUD_Notify_Push(string icon, string attacker, string victim); var void HUD_ModIcons_GameType(vector pos, vector size); void HUD_ModIcons_SetFunc(); -#endif diff --git a/qcsrc/client/hud/hud_config.qh b/qcsrc/client/hud/hud_config.qh index 05792286d..32c846076 100644 --- a/qcsrc/client/hud/hud_config.qh +++ b/qcsrc/client/hud/hud_config.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_HUD_CONFIG_H -#define CLIENT_HUD_CONFIG_H +#pragma once const int S_MOUSE1 = 1; const int S_MOUSE2 = 2; @@ -18,5 +17,3 @@ void HUD_Configure_Frame(); void HUD_Configure_PostDraw(); float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary); - -#endif diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 084dfba2f..9c672ad07 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_MAIN_H -#define CLIENT_MAIN_H +#pragma once #include #include @@ -152,5 +151,3 @@ float hud; float view_quality; int framecount; .float health; - -#endif diff --git a/qcsrc/client/mapvoting.qh b/qcsrc/client/mapvoting.qh index bbc05d884..ebc107a0b 100644 --- a/qcsrc/client/mapvoting.qh +++ b/qcsrc/client/mapvoting.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_MAPVOTING_H -#define CLIENT_MAPVOTING_H +#pragma once #include void MapVote_Draw(); @@ -11,4 +10,3 @@ float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary); void Net_MapVote_Picture(); float mv_active; -#endif diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh index a2fa4edce..32563598b 100644 --- a/qcsrc/client/miscfunctions.qh +++ b/qcsrc/client/miscfunctions.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_MISCFUNCTIONS_H -#define CLIENT_MISCFUNCTIONS_H +#pragma once entity players; entity teams; @@ -155,5 +154,3 @@ void Accuracy_LoadLevels(); void Accuracy_LoadColors(); vector Accuracy_GetColor(float accuracy); - -#endif diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 7141e4455..f86ef5333 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_MUTATORS_EVENTS_H -#define CLIENT_MUTATORS_EVENTS_H +#pragma once #include @@ -132,5 +131,3 @@ MUTATOR_HOOKABLE(Weapon_ImpactEffect, EV_Weapon_ImpactEffect); /** also, argv() can be used */ i(int, cmd_argc) \ /**/ MUTATOR_HOOKABLE(HUD_Command, EV_HUD_Command); - -#endif diff --git a/qcsrc/client/player_skeleton.qh b/qcsrc/client/player_skeleton.qh index 48a3111d3..50462bdbb 100644 --- a/qcsrc/client/player_skeleton.qh +++ b/qcsrc/client/player_skeleton.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_PLAYER_SKELETON -#define CLIENT_PLAYER_SKELETON +#pragma once void free_skeleton_from_frames(entity e); void skeleton_from_frames(entity e, float is_dead); @@ -11,4 +10,3 @@ class(Skeleton) .int bone_weapon; class(Skeleton) .float bone_aim[MAX_AIM_BONES]; class(Skeleton) .float bone_aimweight[MAX_AIM_BONES]; class(Skeleton) .float fixbone; -#endif diff --git a/qcsrc/client/quickmenu.qh b/qcsrc/client/quickmenu.qh index cf5f66649..373cd2755 100644 --- a/qcsrc/client/quickmenu.qh +++ b/qcsrc/client/quickmenu.qh @@ -1,8 +1,5 @@ -#ifndef CLIENT_QUICKMENU_H -#define CLIENT_QUICKMENU_H +#pragma once bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary); bool QuickMenu_IsOpened(); void QuickMenu_Mouse(); - -#endif diff --git a/qcsrc/client/scoreboard.qh b/qcsrc/client/scoreboard.qh index 4e43cb65f..8fccae948 100644 --- a/qcsrc/client/scoreboard.qh +++ b/qcsrc/client/scoreboard.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_SCOREBOARD_H -#define CLIENT_SCOREBOARD_H +#pragma once float xmin, xmax, ymin, ymax, sbwidth; @@ -12,4 +11,3 @@ void HUD_InitScores(); void HUD_UpdatePlayerPos(entity pl); void HUD_UpdateTeamPos(entity Team); float HUD_WouldDrawScoreboard(); -#endif diff --git a/qcsrc/client/shownames.qh b/qcsrc/client/shownames.qh index 1304c5370..24f6568d2 100644 --- a/qcsrc/client/shownames.qh +++ b/qcsrc/client/shownames.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_SHOWNAMES_H -#define CLIENT_SHOWNAMES_H +#pragma once entityclass(ShowNames); class(ShowNames) .float healthvalue; @@ -9,5 +8,3 @@ class(ShowNames) .float fadedelay; class(ShowNames) .float pointtime; void Draw_ShowNames_All(); - -#endif diff --git a/qcsrc/client/teamradar.qh b/qcsrc/client/teamradar.qh index ca7ec87b5..0b1884ccf 100644 --- a/qcsrc/client/teamradar.qh +++ b/qcsrc/client/teamradar.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_TEAMRADAR_H -#define CLIENT_TEAMRADAR_H +#pragma once const int MAX_TEAMRADAR_TIMES = 32; @@ -44,5 +43,3 @@ void draw_teamradar_icon(vector coord, entity icon, entity pingdata, vector rgb, void draw_teamradar_link(vector start, vector end, int colors); void teamradar_loadcvars(); - -#endif diff --git a/qcsrc/client/wall.qh b/qcsrc/client/wall.qh index f93eb3ae1..11aebd0ed 100644 --- a/qcsrc/client/wall.qh +++ b/qcsrc/client/wall.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_WALL_H -#define CLIENT_WALL_H +#pragma once entityclass(Wall); class(Wall) .float lip; @@ -19,5 +18,3 @@ class(Wall) .vector saved; void Ent_Wall_Draw(entity this); void Ent_Wall_Remove(entity this); - -#endif diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index 1b0d313aa..66e1be470 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -1,5 +1,4 @@ -#ifndef CLIENT_WEAPONS_PROJECTILE_H -#define CLIENT_WEAPONS_PROJECTILE_H +#pragma once entityclass(Projectile); class(Projectile).int traileffect; @@ -30,5 +29,3 @@ void loopsound(entity e, int ch, string samp, float vol, float attn); void Ent_RemoveProjectile(entity this); const int FL_PROJECTILE = BIT(15); - -#endif diff --git a/qcsrc/menu/_all.qh b/qcsrc/menu/_all.qh index 0c4f926dd..33313d637 100644 --- a/qcsrc/menu/_all.qh +++ b/qcsrc/menu/_all.qh @@ -1,7 +1,4 @@ -#ifndef MENU_ALL_H -#define MENU_ALL_H +#pragma once #include "draw.qh" #include "xonotic/util.qh" - -#endif diff --git a/qcsrc/menu/command/all.qh b/qcsrc/menu/command/all.qh index 6377a4c08..05b4eb2e4 100644 --- a/qcsrc/menu/command/all.qh +++ b/qcsrc/menu/command/all.qh @@ -1,8 +1,5 @@ -#ifndef MENU_COMMANDS_ALL_H -#define MENU_COMMANDS_ALL_H +#pragma once #include #include "menu_cmd.qh" - -#endif diff --git a/qcsrc/menu/command/menu_cmd.qh b/qcsrc/menu/command/menu_cmd.qh index 364b13690..31537bd40 100644 --- a/qcsrc/menu/command/menu_cmd.qh +++ b/qcsrc/menu/command/menu_cmd.qh @@ -1,5 +1,3 @@ -#ifndef MENU_CMD_H -#define MENU_CMD_H +#pragma once void GameCommand(string command); -#endif diff --git a/qcsrc/menu/draw.qh b/qcsrc/menu/draw.qh index 74bcae304..b12534f7d 100644 --- a/qcsrc/menu/draw.qh +++ b/qcsrc/menu/draw.qh @@ -1,5 +1,4 @@ -#ifndef DRAW_H -#define DRAW_H +#pragma once // from the engine vector drawfontscale; @@ -41,4 +40,3 @@ vector globalToBoxSize(vector v, vector scale); float draw_TextWidth_WithColors(string s, vector size); float draw_TextWidth_WithoutColors(string s, vector size); -#endif diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index a4cdbc5f5..8bc24a16e 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -1,5 +1,4 @@ -#ifndef MENU_H -#define MENU_H +#pragma once #include "draw.qh" #include "skin.qh" @@ -58,4 +57,3 @@ const string MENU_SOUND_WINNER = "sound/menu/winner.wav"; void m_play_focus_sound(); void m_play_click_sound(string soundfile); -#endif diff --git a/qcsrc/menu/mutators/events.qh b/qcsrc/menu/mutators/events.qh index 2b881992e..f43199cea 100644 --- a/qcsrc/menu/mutators/events.qh +++ b/qcsrc/menu/mutators/events.qh @@ -1,5 +1,4 @@ -#ifndef MENU_MUTATORS_EVENTS_H -#define MENU_MUTATORS_EVENTS_H +#pragma once #include @@ -34,4 +33,3 @@ string cmd_string; /** whole command, use only if you really have to */ i(string, cmd_string) \ /**/ MUTATOR_HOOKABLE(Menu_ConsoleCommand, EV_Menu_ConsoleCommand); -#endif diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index ebb622b0a..7cc2d2d3b 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -1,5 +1,4 @@ -#ifndef SKIN_H -#define SKIN_H +#pragma once #define SKINBEGIN #define SKINVECTOR(name,def) vector SKIN##name = def @@ -27,4 +26,3 @@ #undef SKINFLOAT #undef SKINVECTOR #undef SKINBEGIN -#endif diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 79ce7c5ee..d433352cf 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -1,5 +1,4 @@ -#ifndef MENU_UTIL_H -#define MENU_UTIL_H +#pragma once float GL_CheckExtension(string ext); float GL_Have_TextureCompression(); @@ -54,4 +53,3 @@ string _Nex_ExtResponseSystem_RecommendedServers; float _Nex_ExtResponseSystem_RecommendedServersNeedsRefresh; void CheckSendCvars(entity me, string cvarnamestring); -#endif diff --git a/qcsrc/server/_all.qh b/qcsrc/server/_all.qh index 6a78f5320..b52046037 100644 --- a/qcsrc/server/_all.qh +++ b/qcsrc/server/_all.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_ALL_H -#define SERVER_ALL_H +#pragma once int maxclients; @@ -51,5 +50,3 @@ const string STR_OBSERVER = "observer"; #include "constants.qh" #include "defs.qh" #include "miscfunctions.qh" - -#endif diff --git a/qcsrc/server/anticheat.qh b/qcsrc/server/anticheat.qh index e1055ac44..c3e99078d 100644 --- a/qcsrc/server/anticheat.qh +++ b/qcsrc/server/anticheat.qh @@ -1,5 +1,4 @@ -#ifndef ANTICHEAT_H -#define ANTICHEAT_H +#pragma once void anticheat_init(entity this); void anticheat_report(); @@ -14,4 +13,3 @@ void anticheat_startframe(); void anticheat_endframe(); void anticheat_fixangle(entity this); -#endif diff --git a/qcsrc/server/antilag.qh b/qcsrc/server/antilag.qh index bb9fe8052..ee7b5d4e3 100644 --- a/qcsrc/server/antilag.qh +++ b/qcsrc/server/antilag.qh @@ -1,5 +1,4 @@ -#ifndef ANTILAG_H -#define ANTILAG_H +#pragma once void antilag_record(entity e, entity store, float t); vector antilag_takebackorigin(entity e, entity store, float t); @@ -11,4 +10,3 @@ void antilag_clear(entity e, entity store); #define ANTILAG_LATENCY(e) min(0.4, e.ping * 0.001) // add one ticrate? -#endif diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index cd950738e..26fa625af 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_AUTOCVARS_H -#define SERVER_AUTOCVARS_H +#pragma once bool autocvar__notarget; bool autocvar__campaign_testrun; @@ -545,4 +544,3 @@ float autocvar_g_frozen_revive_falldamage; int autocvar_g_frozen_revive_falldamage_health; bool autocvar_g_frozen_damage_trigger; float autocvar_g_frozen_force; -#endif diff --git a/qcsrc/server/bot/aim.qh b/qcsrc/server/bot/aim.qh index d1cbd0d62..3ea036b5f 100644 --- a/qcsrc/server/bot/aim.qh +++ b/qcsrc/server/bot/aim.qh @@ -1,5 +1,4 @@ -#ifndef AIM_H -#define AIM_H +#pragma once /* * Globals and Fields */ @@ -98,4 +97,3 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay); .void(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func; -#endif diff --git a/qcsrc/server/bot/bot.qh b/qcsrc/server/bot/bot.qh index 7927942ea..f4ba92cd3 100644 --- a/qcsrc/server/bot/bot.qh +++ b/qcsrc/server/bot/bot.qh @@ -1,5 +1,4 @@ -#ifndef BOT_H -#define BOT_H +#pragma once /* * Globals and Fields */ @@ -115,4 +114,3 @@ void bot_serverframe(); void() havocbot_setupbot; void bot_calculate_stepheightvec(); -#endif diff --git a/qcsrc/server/bot/havocbot/havocbot.qh b/qcsrc/server/bot/havocbot/havocbot.qh index 2d3d32913..99c7b0075 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qh +++ b/qcsrc/server/bot/havocbot/havocbot.qh @@ -1,5 +1,4 @@ -#ifndef HAVOCBOT_H -#define HAVOCBOT_H +#pragma once /* * Globals and Fields @@ -63,4 +62,3 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay .entity draggedby; .float ladder_time; .entity ladder_entity; -#endif diff --git a/qcsrc/server/bot/havocbot/roles.qh b/qcsrc/server/bot/havocbot/roles.qh index cfabf0534..6120ce033 100644 --- a/qcsrc/server/bot/havocbot/roles.qh +++ b/qcsrc/server/bot/havocbot/roles.qh @@ -1,4 +1,2 @@ -#ifndef ROLES_H -#define ROLES_H +#pragma once void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius); -#endif diff --git a/qcsrc/server/bot/havocbot/scripting.qh b/qcsrc/server/bot/havocbot/scripting.qh index c09dbdeac..07cb4d6e6 100644 --- a/qcsrc/server/bot/havocbot/scripting.qh +++ b/qcsrc/server/bot/havocbot/scripting.qh @@ -1,5 +1,3 @@ -#ifndef HAVOCBOT_SCRIPTING_H -#define HAVOCBOT_SCRIPTING_H +#pragma once void bot_clearqueue(entity bot); -#endif diff --git a/qcsrc/server/bot/navigation.qh b/qcsrc/server/bot/navigation.qh index cf4a5ce5b..efa2843a2 100644 --- a/qcsrc/server/bot/navigation.qh +++ b/qcsrc/server/bot/navigation.qh @@ -1,5 +1,4 @@ -#ifndef NAVIGATION_H -#define NAVIGATION_H +#pragma once /* * Globals and Fields */ @@ -77,4 +76,3 @@ void botframe_updatedangerousobjects(float maxupdate); entity navigation_findnearestwaypoint(entity ent, float walkfromwp); float navigation_waypoint_will_link(vector v, vector org, entity ent, float walkfromwp, float bestdist); -#endif diff --git a/qcsrc/server/bot/scripting.qh b/qcsrc/server/bot/scripting.qh index d5cdda9d6..3ec51cc78 100644 --- a/qcsrc/server/bot/scripting.qh +++ b/qcsrc/server/bot/scripting.qh @@ -1,5 +1,4 @@ -#ifndef BOT_SCRIPTING_H -#define BOT_SCRIPTING_H +#pragma once #define BOT_EXEC_STATUS_IDLE 0 #define BOT_EXEC_STATUS_PAUSED 1 @@ -80,4 +79,3 @@ void bot_list_commands(); float bot_execute_commands(); entity find_bot_by_name(string name); entity find_bot_by_number(float number); -#endif diff --git a/qcsrc/server/bot/waypoints.qh b/qcsrc/server/bot/waypoints.qh index 8e0dd0fe6..3033ced70 100644 --- a/qcsrc/server/bot/waypoints.qh +++ b/qcsrc/server/bot/waypoints.qh @@ -1,5 +1,4 @@ -#ifndef WAYPOINTS_H -#define WAYPOINTS_H +#pragma once /* * Globals and Fields */ @@ -66,4 +65,3 @@ entity waypoint_spawnpersonal(vector position); vector waypoint_fixorigin(vector position); void botframe_autowaypoints(); -#endif diff --git a/qcsrc/server/campaign.qh b/qcsrc/server/campaign.qh index f5228c269..8be26fef8 100644 --- a/qcsrc/server/campaign.qh +++ b/qcsrc/server/campaign.qh @@ -1,5 +1,4 @@ -#ifndef CAMPAIGN_H -#define CAMPAIGN_H +#pragma once // this must be included BEFORE campaign_common.h to make this a memory saving #define CAMPAIGN_MAX_ENTRIES 2 @@ -16,4 +15,3 @@ void CampaignLevelWarp(float n); float campaign_bots_may_start; // campaign mode: bots shall spawn but wait for the player to spawn before they do anything // in other game modes, this is ignored -#endif diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 4ead519eb..03b5ac8dd 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -1,5 +1,4 @@ -#ifndef CHEATS_H -#define CHEATS_H +#pragma once #include "../common/impulses/all.qh" @@ -16,4 +15,3 @@ float CheatFrame(); const float CHRAME_DRAG = 8; void Drag_MoveDrag(entity from, entity to); // call this from CopyBody -#endif diff --git a/qcsrc/server/cl_client.qh b/qcsrc/server/cl_client.qh index b4c125c6b..a31004316 100644 --- a/qcsrc/server/cl_client.qh +++ b/qcsrc/server/cl_client.qh @@ -1,5 +1,5 @@ -#ifndef CL_CLIENT_H -#define CL_CLIENT_H +#pragma once + float c1, c2, c3, c4; void play_countdown(float finished, string samp); @@ -10,5 +10,3 @@ float Spectate(entity pl); #define SPECTATE_COPY() [[accumulate]] void SpectateCopy(entity this, entity spectatee) #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); } - -#endif diff --git a/qcsrc/server/cl_impulse.qh b/qcsrc/server/cl_impulse.qh index aecf079b7..50edc2c9c 100644 --- a/qcsrc/server/cl_impulse.qh +++ b/qcsrc/server/cl_impulse.qh @@ -1,5 +1,3 @@ -#ifndef CL_IMPULSE_H -#define CL_IMPULSE_H +#pragma once void ImpulseCommands(entity this); -#endif diff --git a/qcsrc/server/cl_player.qh b/qcsrc/server/cl_player.qh index 3d95cdab9..22c595f66 100644 --- a/qcsrc/server/cl_player.qh +++ b/qcsrc/server/cl_player.qh @@ -1,5 +1,4 @@ -#ifndef CL_PLAYER_H -#define CL_PLAYER_H +#pragma once .entity pusher; .float pushltime; @@ -38,5 +37,3 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, /** to be used by `prvm_edictset server playernumber muted 1` */ .float muted; int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol); - -#endif diff --git a/qcsrc/server/command/all.qh b/qcsrc/server/command/all.qh index 0d74ec273..5add6184e 100644 --- a/qcsrc/server/command/all.qh +++ b/qcsrc/server/command/all.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_COMMANDS_ALL_H -#define SERVER_COMMANDS_ALL_H +#pragma once #include REGISTRY(SERVER_COMMANDS, BITS(7)) @@ -27,5 +26,3 @@ STATIC_INIT(SERVER_COMMANDS_aliases) { #include "getreplies.qh" #include "radarmap.qh" #include "vote.qh" - -#endif diff --git a/qcsrc/server/command/banning.qh b/qcsrc/server/command/banning.qh index a330ff1b0..d6b1ae60f 100644 --- a/qcsrc/server/command/banning.qh +++ b/qcsrc/server/command/banning.qh @@ -1,5 +1,4 @@ -#ifndef BANNING_H -#define BANNING_H +#pragma once // ==================================== // Declarations for kick/ban commands @@ -19,5 +18,3 @@ void BanCommand_macro_write_aliases(float fh); void BanCommand_macro_help(); float BanCommand_macro_usage(float argc); - -#endif diff --git a/qcsrc/server/command/cmd.qh b/qcsrc/server/command/cmd.qh index 1f2365822..0dd27dd89 100644 --- a/qcsrc/server/command/cmd.qh +++ b/qcsrc/server/command/cmd.qh @@ -1,5 +1,4 @@ -#ifndef CMD_H -#define CMD_H +#pragma once // ================================================= // Declarations for server side networked commands @@ -14,4 +13,3 @@ string MapVote_Suggest(string m); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void ClientCommand_macro_write_aliases(float fh); -#endif diff --git a/qcsrc/server/command/common.qh b/qcsrc/server/command/common.qh index 6aed511e1..2524d31e4 100644 --- a/qcsrc/server/command/common.qh +++ b/qcsrc/server/command/common.qh @@ -1,5 +1,4 @@ -#ifndef COMMAND_COMMON_H -#define COMMAND_COMMON_H +#pragma once #include REGISTRY(COMMON_COMMANDS, BITS(7)) @@ -186,6 +185,3 @@ void CommonCommand_macro_write_aliases(float fh) { FOREACH(COMMON_COMMANDS, true, LAMBDA(CMD_Write_Alias("qc_cmd_svcmd", it.m_name, it.m_description))); } - - -#endif diff --git a/qcsrc/server/command/getreplies.qh b/qcsrc/server/command/getreplies.qh index a0f9b21ef..7b4360792 100644 --- a/qcsrc/server/command/getreplies.qh +++ b/qcsrc/server/command/getreplies.qh @@ -1,5 +1,4 @@ -#ifndef GETREPLIES_H -#define GETREPLIES_H +#pragma once // ====================================================== // Declarations for reply messages, re-worked by Samual @@ -21,4 +20,3 @@ string getladder(); string getmaplist(); string getlsmaps(); string getmonsterlist(); -#endif diff --git a/qcsrc/server/command/radarmap.qh b/qcsrc/server/command/radarmap.qh index fea60ba9e..4332003f8 100644 --- a/qcsrc/server/command/radarmap.qh +++ b/qcsrc/server/command/radarmap.qh @@ -1,5 +1,4 @@ -#ifndef RADARMAP_H -#define RADARMAP_H +#pragma once // =========================================== // Declarations for radarmap generation code @@ -16,6 +15,3 @@ string doublehex = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D // removes the need to bound() float RadarMap_Make(float argc); - - -#endif diff --git a/qcsrc/server/command/sv_cmd.qh b/qcsrc/server/command/sv_cmd.qh index 8fa66dac4..29db3ee4d 100644 --- a/qcsrc/server/command/sv_cmd.qh +++ b/qcsrc/server/command/sv_cmd.qh @@ -1,5 +1,4 @@ -#ifndef SV_CMD_H -#define SV_CMD_H +#pragma once // ================================================= // Declarations for server side game commands @@ -17,4 +16,3 @@ float shuffleteams_teams[SHUFFLETEAMS_MAX_TEAMS]; // maximum of 4 teams // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void GameCommand_macro_write_aliases(float fh); -#endif diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 0cab6c1d4..7b10b37eb 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -1,5 +1,4 @@ -#ifndef VOTE_H -#define VOTE_H +#pragma once // ================================================ // Declarations for the vote system/vote commands @@ -55,4 +54,3 @@ void reset_map(float dorespawn); void ReadyCount(); void ReadyRestart_force(); void VoteCount(float first_count); -#endif diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh index c1ea1c6c6..c8717f005 100644 --- a/qcsrc/server/constants.qh +++ b/qcsrc/server/constants.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_CONSTANTS_H -#define SERVER_CONSTANTS_H +#pragma once const int FL_WEAPON = BIT(13); const int FL_POWERUP = BIT(14); @@ -19,5 +18,3 @@ const int RESPAWN_SILENT = 2; const int NUM_PLAYERSKINS_TEAMPLAY = 3; const int ASSAULT_VALUE_INACTIVE = 1000; - -#endif diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 27755db96..245719b32 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_DEFS_H -#define SERVER_DEFS_H +#pragma once #include "../common/weapons/all.qh" #include "../common/stats.qh" @@ -452,5 +451,3 @@ const int MIF_GUIDED_CONFUSABLE = MIF_GUIDED_HEAT | MIF_GUIDED_AI; .float init_for_player_needed; .void(entity) init_for_player; - -#endif diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 6a8ca99b4..be570eb7f 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -1,5 +1,4 @@ -#ifndef G_DAMAGE_H -#define G_DAMAGE_H +#pragma once #if defined(CSQC) #elif defined(MENUQC) @@ -118,4 +117,3 @@ void Fire_ApplyDamage(entity e); void Fire_ApplyEffect(entity e); void fireburner_think(); -#endif diff --git a/qcsrc/server/g_hook.qh b/qcsrc/server/g_hook.qh index 95ba88205..900c23d36 100644 --- a/qcsrc/server/g_hook.qh +++ b/qcsrc/server/g_hook.qh @@ -1,5 +1,4 @@ -#ifndef HOOK_H -#define HOOK_H +#pragma once // Wazat's grappling hook .entity hook; @@ -16,4 +15,3 @@ const float HOOK_WAITING_FOR_RELEASE = BIT(4); void GrappleHookInit(); vector hook_shotorigin[4]; -#endif diff --git a/qcsrc/server/g_subs.qh b/qcsrc/server/g_subs.qh index 81516f935..90378d510 100644 --- a/qcsrc/server/g_subs.qh +++ b/qcsrc/server/g_subs.qh @@ -1,5 +1,4 @@ -#ifndef G_SUBS_H -#define G_SUBS_H +#pragma once void SUB_NullThink(); @@ -165,4 +164,3 @@ void InitTrigger(); void InitSolidBSPTrigger(); float InitMovingBrushTrigger(); -#endif diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index 920ef71e1..3703abad2 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -1,5 +1,4 @@ -#ifndef G_WORLD_H -#define G_WORLD_H +#pragma once float checkrules_equality; float checkrules_suddendeathwarning; @@ -24,5 +23,3 @@ void Map_Goto_SetStr(string nextmapname); void Map_Goto(float reinit); float DoNextMapOverride(float reinit); void CheckRules_World(); - -#endif diff --git a/qcsrc/server/ipban.qh b/qcsrc/server/ipban.qh index e758cbca4..946f44f93 100644 --- a/qcsrc/server/ipban.qh +++ b/qcsrc/server/ipban.qh @@ -1,5 +1,4 @@ -#ifndef IPBAN_H -#define IPBAN_H +#pragma once void Ban_SaveBans(); void Ban_LoadBans(); @@ -8,4 +7,3 @@ float Ban_MaybeEnforceBanOnce(entity client); float BanCommand(string command); void OnlineBanList_URI_Get_Callback(float id, float status, string data); -#endif diff --git a/qcsrc/server/item_key.qh b/qcsrc/server/item_key.qh index 4a2acd85b..50be5f8db 100644 --- a/qcsrc/server/item_key.qh +++ b/qcsrc/server/item_key.qh @@ -1,5 +1,4 @@ -#ifndef ITEM_KEY -#define ITEM_KEY +#pragma once /** * Returns the bit ID of a key @@ -25,5 +24,3 @@ float item_keys_usekey(entity l, entity p); */ string item_keys_keylist(float keylist); #endif - -#endif diff --git a/qcsrc/server/mapvoting.qh b/qcsrc/server/mapvoting.qh index e4e6b0b52..3a1a0ad64 100644 --- a/qcsrc/server/mapvoting.qh +++ b/qcsrc/server/mapvoting.qh @@ -1,5 +1,4 @@ -#ifndef MAPVOTING_H -#define MAPVOTING_H +#pragma once // definitions for functions used outside mapvoting.qc void MapVote_Start(); @@ -13,4 +12,3 @@ string GameTypeVote_MapInfo_FixName(string m); float gametypevote; string getmapname_stored; float mapvote_initialized; -#endif diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 4cb4e20b3..f87860f8f 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -1,5 +1,4 @@ -#ifndef MISCFUNCTIONS_H -#define MISCFUNCTIONS_H +#pragma once #include "../common/t_items.qh" @@ -369,5 +368,3 @@ entity initialize_entity_first; float sound_allowed(float dest, entity e); void InitializeEntity(entity e, void() func, float order); void SetCustomizer(entity e, float() customizer, void() uncustomizer); - -#endif diff --git a/qcsrc/server/mutators/all.qh b/qcsrc/server/mutators/all.qh index e586ec74e..4a1f2b353 100644 --- a/qcsrc/server/mutators/all.qh +++ b/qcsrc/server/mutators/all.qh @@ -1,9 +1,6 @@ +#pragma once + #include "mutator.qh" #include "gamemode.qh" -#ifndef SERVER_MUTATORS_H -#define SERVER_MUTATORS_H - #include "all.inc" - -#endif diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index d81b2b1a5..b83e40abc 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_MUTATORS_EVENTS_H -#define SERVER_MUTATORS_EVENTS_H +#pragma once #include @@ -857,4 +856,3 @@ float uricb_id; float uricb_status; string uricb_data; MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback); -#endif diff --git a/qcsrc/server/mutators/gamemode.qh b/qcsrc/server/mutators/gamemode.qh index b83704650..de3a215fe 100644 --- a/qcsrc/server/mutators/gamemode.qh +++ b/qcsrc/server/mutators/gamemode.qh @@ -1,5 +1,4 @@ -#ifndef GAMEMODE_H -#define GAMEMODE_H +#pragma once #include "../cl_client.qh" #include "../cl_player.qh" @@ -44,5 +43,3 @@ float redalive, bluealive, yellowalive, pinkalive; .float bluealive_stat = _STAT(BLUEALIVE); .float yellowalive_stat = _STAT(YELLOWALIVE); .float pinkalive_stat = _STAT(PINKALIVE); - -#endif diff --git a/qcsrc/server/mutators/mutator.qh b/qcsrc/server/mutators/mutator.qh index 485bce298..636efab13 100644 --- a/qcsrc/server/mutators/mutator.qh +++ b/qcsrc/server/mutators/mutator.qh @@ -1,5 +1,4 @@ -#ifndef MUTATOR_H -#define MUTATOR_H +#pragma once #include @@ -39,5 +38,3 @@ #include #include #include - -#endif diff --git a/qcsrc/server/pathlib/main.qh b/qcsrc/server/pathlib/main.qh index 177c432cf..6c8e4dc76 100644 --- a/qcsrc/server/pathlib/main.qh +++ b/qcsrc/server/pathlib/main.qh @@ -1,5 +1,4 @@ -#ifndef PATHLIB_MAIN_H -#define PATHLIB_MAIN_H +#pragma once + float buildpath_nodefilter_none(vector n,vector c,vector p); entity path_build(entity next, vector where, entity prev, entity start); -#endif diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index 5c331d4b4..c71594818 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -1,5 +1,4 @@ -#ifndef PATHLIB_H -#define PATHLIB_H +#pragma once .entity pathlib_list; .entity path_next; @@ -107,5 +106,3 @@ var float pathlib_makenode(entity parent,vector start, vector to, vector goal,f var float buildpath_nodefilter(vector n,vector c,vector p); var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev); - -#endif diff --git a/qcsrc/server/pathlib/utility.qh b/qcsrc/server/pathlib/utility.qh index bf72549a0..3544e86ca 100644 --- a/qcsrc/server/pathlib/utility.qh +++ b/qcsrc/server/pathlib/utility.qh @@ -1,6 +1,5 @@ -#ifndef PATHLIB_UTILITY -#define PATHLIB_UTILITY +#pragma once + float fsnap(float val,float fsize); entity pathlib_nodeatpoint(vector where); float tile_check_plus2(vector where); -#endif diff --git a/qcsrc/server/playerdemo.qh b/qcsrc/server/playerdemo.qh index 7c1931432..0fd42dca6 100644 --- a/qcsrc/server/playerdemo.qh +++ b/qcsrc/server/playerdemo.qh @@ -1,5 +1,4 @@ -#ifndef PLAYERDEMO_H -#define PLAYERDEMO_H +#pragma once void playerdemo_init(entity this); void playerdemo_shutdown(); @@ -8,4 +7,3 @@ float playerdemo_read(entity this); void playerdemo_open_read(string f); void playerdemo_open_write(string f); -#endif diff --git a/qcsrc/server/portals.qh b/qcsrc/server/portals.qh index 68ff068a7..f3528d081 100644 --- a/qcsrc/server/portals.qh +++ b/qcsrc/server/portals.qh @@ -1,5 +1,4 @@ -#ifndef PORTALS_H -#define PORTALS_H +#pragma once .float portal_id; .entity portal_in, portal_out; @@ -12,4 +11,3 @@ void Portal_ClearWithID(entity own, float id); vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle); void Portal_ClearAll_PortalsOnly(entity own); -#endif diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index c78c7765b..51b2aa889 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,5 +1,4 @@ -#ifndef RACE_H -#define RACE_H +#pragma once bool g_race_qualifying; @@ -58,5 +57,3 @@ void race_SendRankings(float pos, float prevpos, float del, float msg); void race_RetractPlayer(); void race_InitSpectator(); - -#endif diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index 448788442..7d4499ce4 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -1,5 +1,4 @@ -#ifndef ROUND_HANDLER_H -#define ROUND_HANDLER_H +#pragma once entity round_handler; .float delay; // stores delay from round end to countdown start @@ -23,5 +22,3 @@ void round_handler_Remove(); #define round_handler_CountdownRunning() (!round_handler.wait && round_handler.cnt) #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt) #define round_handler_GetEndTime() (round_handler.round_endtime) - -#endif diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 8c9af4534..497e5a6ae 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -1,5 +1,4 @@ -#ifndef SCORES_H -#define SCORES_H +#pragma once #include "../common/constants.qh" @@ -129,4 +128,3 @@ string GetTeamScoreString(float tm, float shortString); * nospectators: exclude spectators */ entity PlayerScore_Sort(.float field, float teams, float strict, float nospectators); -#endif diff --git a/qcsrc/server/scores_rules.qh b/qcsrc/server/scores_rules.qh index b307eebfb..1d2646bb8 100644 --- a/qcsrc/server/scores_rules.qh +++ b/qcsrc/server/scores_rules.qh @@ -1,8 +1,5 @@ -#ifndef SCORES_RULES_H -#define SCORES_RULES_H +#pragma once void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabled); void ScoreRules_basics_end(); void ScoreRules_generic(); - -#endif diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index ef2ab6687..b01035090 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -1,5 +1,4 @@ -#ifndef SPAWNPOINTS_H -#define SPAWNPOINTS_H +#pragma once .vector spawnpoint_score; float spawnpoint_nag; @@ -8,4 +7,3 @@ entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck) entity SelectSpawnPoint (float anypoint); spawnfunc(info_player_deathmatch); void spawnpoint_use(); -#endif diff --git a/qcsrc/server/steerlib.qh b/qcsrc/server/steerlib.qh index 3c10bfd02..32ac07c3c 100644 --- a/qcsrc/server/steerlib.qh +++ b/qcsrc/server/steerlib.qh @@ -1,10 +1,7 @@ -#ifndef STEERLIB_H -#define STEERLIB_H +#pragma once .vector steerto; vector steerlib_arrive(vector point,float maximal_distance); vector steerlib_attract2(entity this, vector point, float min_influense,float max_distance,float max_influense); vector steerlib_pull(vector point); - -#endif diff --git a/qcsrc/server/sys-post.qh b/qcsrc/server/sys-post.qh index aca5969ba..a74e521ab 100644 --- a/qcsrc/server/sys-post.qh +++ b/qcsrc/server/sys-post.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_SYS_POST_H -#define SERVER_SYS_POST_H +#pragma once #undef objerror #undef droptofloor @@ -39,5 +38,3 @@ var void remove(entity e); #undef IT_QUAD #pragma noref 0 - -#endif diff --git a/qcsrc/server/sys-pre.qh b/qcsrc/server/sys-pre.qh index be17b6923..ca6a2044d 100644 --- a/qcsrc/server/sys-pre.qh +++ b/qcsrc/server/sys-pre.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_SYS_PRE_H -#define SERVER_SYS_PRE_H +#pragma once #define objerror builtin_objerror #define droptofloor builtin_droptofloor @@ -34,5 +33,3 @@ #define IT_QUAD _IT_QUAD /* BIT(22) */ #pragma noref 1 - -#endif diff --git a/qcsrc/server/teamplay.qh b/qcsrc/server/teamplay.qh index 6b3bdf0f2..5a2fe7b12 100644 --- a/qcsrc/server/teamplay.qh +++ b/qcsrc/server/teamplay.qh @@ -1,5 +1,4 @@ -#ifndef TEAMPLAY_H -#define TEAMPLAY_H +#pragma once string cache_mutatormsg; string cache_lastmutatormsg; @@ -54,4 +53,3 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam); void SV_ChangeTeam(float _color); void ShufflePlayerOutOfTeam (float source_team); -#endif diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index 33c1fbf39..35b0174ec 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -1,5 +1,4 @@ -#ifndef ACCURACY_H -#define ACCURACY_H +#pragma once .bool cvar_cl_accuracy_data_share; REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share"); @@ -28,4 +27,3 @@ void accuracy_add(entity e, float w, float fired, float hit); // helper bool accuracy_isgooddamage(entity attacker, entity targ); bool accuracy_canbegooddamage(entity attacker); -#endif diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index b97457ad9..7633c386e 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -1,5 +1,4 @@ -#ifndef WEAPONS_COMMON_H -#define WEAPONS_COMMON_H +#pragma once void W_GiveWeapon (entity e, float wep); .float prevstrengthsound; @@ -7,4 +6,3 @@ void W_GiveWeapon (entity e, float wep); void W_PlayStrengthSound(entity player); float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception); void W_PrepareExplosionByDamage(entity attacker, void() explode); -#endif diff --git a/qcsrc/server/weapons/csqcprojectile.qh b/qcsrc/server/weapons/csqcprojectile.qh index c2ecc3e4d..af8c96085 100644 --- a/qcsrc/server/weapons/csqcprojectile.qh +++ b/qcsrc/server/weapons/csqcprojectile.qh @@ -1,5 +1,4 @@ -#ifndef CSQCPROJECTILE_H -#define CSQCPROJECTILE_H +#pragma once .float csqcprojectile_clientanimate; @@ -7,4 +6,3 @@ void CSQCProjectile(entity e, float clientanimate, float type, float docull); void UpdateCSQCProjectile(entity e); void UpdateCSQCProjectileAfterTeleport(entity e); void CSQCProjectile_Check(entity e); -#endif diff --git a/qcsrc/server/weapons/hitplot.qh b/qcsrc/server/weapons/hitplot.qh index 3b111f1c5..8aa15a61b 100644 --- a/qcsrc/server/weapons/hitplot.qh +++ b/qcsrc/server/weapons/hitplot.qh @@ -1,9 +1,7 @@ -#ifndef HITPLOT_H -#define HITPLOT_H +#pragma once .float hitplotfh; void W_HitPlotAnalysis(entity player, vector screenforward, vector screenright, vector screenup); void W_HitPlotOpen(entity player); void W_HitPlotClose(entity player); -#endif diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index b4e2fb81c..5800f9415 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -1,5 +1,4 @@ -#ifndef SELECTION_H -#define SELECTION_H +#pragma once // switch between weapons void Send_WeaponComplain(entity e, float wpn, float type); @@ -30,4 +29,3 @@ void W_PreviousWeapon(float list); // previously used if exists and has ammo, (second) best otherwise void W_LastWeapon(entity this); -#endif diff --git a/qcsrc/server/weapons/spawning.qh b/qcsrc/server/weapons/spawning.qh index fd66a8e87..9ce5ca30e 100644 --- a/qcsrc/server/weapons/spawning.qh +++ b/qcsrc/server/weapons/spawning.qh @@ -1,7 +1,5 @@ -#ifndef SPAWNING_H -#define SPAWNING_H +#pragma once string W_Apply_Weaponreplace(string in); void weapon_defaultspawnfunc(entity this, Weapon e); -#endif diff --git a/qcsrc/server/weapons/throwing.qh b/qcsrc/server/weapons/throwing.qh index 1bf50c14a..488791295 100644 --- a/qcsrc/server/weapons/throwing.qh +++ b/qcsrc/server/weapons/throwing.qh @@ -1,5 +1,4 @@ -#ifndef THROWING_H -#define THROWING_H +#pragma once .float savenextthink; void thrown_wep_think(); @@ -13,4 +12,3 @@ float W_IsWeaponThrowable(float w); void W_ThrowWeapon(vector velo, vector delta, float doreduce); void SpawnThrownWeapon(entity this, vector org, float w); -#endif diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index c4f63835c..bb486d8ce 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -1,5 +1,4 @@ -#ifndef TRACING_H -#define TRACING_H +#pragma once vector w_shotorg; vector w_shotdir; @@ -56,4 +55,3 @@ entity fireBullet_trace_callback_eff; entity fireBullet_last_hit; void fireBullet_trace_callback(vector start, vector hit, vector end); void fireBullet(vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, int tracereffects); -#endif diff --git a/qcsrc/server/weapons/weaponstats.qh b/qcsrc/server/weapons/weaponstats.qh index 0018f1906..f031223e7 100644 --- a/qcsrc/server/weapons/weaponstats.qh +++ b/qcsrc/server/weapons/weaponstats.qh @@ -1,5 +1,4 @@ -#ifndef WEAPONSTATS_H -#define WEAPONSTATS_H +#pragma once float weaponstats_buffer; @@ -11,4 +10,3 @@ void WeaponStats_LogDamage(float awep, float abot, float vwep, float vbot, float void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot); #define WEAPONSTATS_GETINDEX(awep,abot,vwep,vbot) (((vwep) + (awep) * (WEP_LAST - WEP_FIRST + 1) - (WEP_FIRST + WEP_FIRST * (WEP_LAST - WEP_FIRST + 1))) * 4 + (abot) * 2 + (vbot)) -#endif diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index 0000ac215..03cb7c13c 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -1,6 +1,4 @@ -#ifndef WEAPONSYSTEM_H -#define WEAPONSYSTEM_H - +#pragma once float internalteam; float weaponswapping; @@ -33,5 +31,3 @@ bool weapon_prepareattack_check(Weapon thiswep, entity actor, .entity weaponenti void weapon_prepareattack_do(entity actor, .entity weaponentity, float secondary, float attacktime); void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor, .entity weaponentity, int fire) func); - -#endif -- 2.39.2