-#ifndef ANIM_H
-#define ANIM_H
+#pragma once
// begin engine fields
#define setanim(...) anim_set(__VA_ARGS__)
void anim_update(entity e);
#define updateanim(...) anim_update(__VA_ARGS__)
-
-#endif
-#ifndef ANIMDECIDE_H
-#define ANIMDECIDE_H
+#pragma once
// must be called at least once to initialize, or when modelindex is changed
void animdecide_load_if_needed(entity e);
const int ANIMACTION_SHOOT = 4; // shoot
const int ANIMACTION_TAUNT = 5; // taunt
const int ANIMACTION_MELEE = 6; // melee
-#endif
-#ifndef CAMPAIGN_COMMON_H
-#define CAMPAIGN_COMMON_H
+#pragma once
#ifndef CAMPAIGN_MAX_ENTRIES
#define CAMPAIGN_MAX_ENTRIES 64
// Sets up the campaign for the n-th array item (meaning: campaign_offset+nth
// level) using localcmd()
void CampaignSetup(float n);
-#endif
-#ifndef COMMON_COMMANDS_ALL_H
-#define COMMON_COMMANDS_ALL_H
+#pragma once
#include "command.qh"
REGISTRY(GENERIC_COMMANDS, BITS(7))
#include "generic.qh"
#include "markup.qh"
#include "rpn.qh"
-
-#endif
-#ifndef COMMAND_H
-#define COMMAND_H
+#pragma once
const int CMD_REQUEST_COMMAND = 1;
const int CMD_REQUEST_USAGE = 2;
TC(Command, this);
}
ENDCLASS(Command)
-
-#endif
-#ifndef COMMAND_GENERIC_H
-#define COMMAND_GENERIC_H
+#pragma once
#include <common/constants.qh>
int curl_uri_get_pos;
float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1];
string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1];
-#endif
-#ifndef COMMAND_MARKUP_H
-#define COMMAND_MARKUP_H
+#pragma once
// ==========================================================
// Declarations for markup command code, reworked by Samual
string markup_to[NUM_MARKUPS];
string GenericCommand_markup(string s2);
-#endif
-#ifndef COMMAND_RPN_H
-#define COMMAND_RPN_H
+#pragma once
// =========================================================
// Declarations for RPN command code, written by divVerent
string rpn_stack[MAX_RPN_STACK];
void GenericCommand_rpn(float request, float argc, string command);
-
-#endif
-#ifndef CONSTANTS_H
-#define CONSTANTS_H
+#pragma once
REGISTER_NET_TEMP(TE_CSQC_PICTURE)
REGISTER_NET_TEMP(TE_CSQC_RACE)
const int GTV_FORBIDDEN = 0; // Cannot be voted
const int GTV_AVAILABLE = 1; // Can be voted
const int GTV_CUSTOM = 2; // Custom entry
-#endif
-#ifndef CSQCMODEL_SETTINGS_H
-#define CSQCMODEL_SETTINGS_H
+#pragma once
// define this if svqc code wants to use .frame2 and .lerpfrac
//#define CSQCMODEL_HAVE_TWO_FRAMES
#endif
#define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE
-#endif
-#ifndef DEATHTYPES_ALL_H
-#define DEATHTYPES_ALL_H
+#pragma once
#include <common/notifications/all.qh>
string Deathtype_Name(int deathtype);
#include "all.inc"
-
-#endif
-#ifndef EFFECTS_ALL_H
-#define EFFECTS_ALL_H
+#pragma once
#include "effect.qh"
EFFECT(0, Null, string_null)
#include "all.inc"
-
-#endif
-#ifndef EFFECT_H
-#define EFFECT_H
+#pragma once
#define particleeffectnum(e) \
_particleeffectnum(e.eent_eff_name)
this.eent_eff_trail = eff_trail;
return this;
}
-
-#endif
-#ifndef EFFECTS_QC
-#define EFFECTS_QC
+#pragma once
+
#include "all.inc"
-#endif
-#ifndef GLOBALSOUND_H
-#define GLOBALSOUND_H
+#pragma once
#ifdef SVQC
/** Use new sound handling. TODO: use when sounds play correctly on clients */
FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr));
allvoicesamples = strzone(substring(allvoicesamples, 1, -1));
}
-
-#endif
-#ifndef RUBBLE_H
-#define RUBBLE_H
+#pragma once
#ifdef CSQC
}
#endif
-
-#endif
-#ifndef ENT_CS_H
-#define ENT_CS_H
+#pragma once
REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
REGISTER_NET_TEMP(CLIENT_ENTCS)
}
#endif
-
-#endif
-#ifndef IMPULSES_ALL_H
-#define IMPULSES_ALL_H
+#pragma once
REGISTRY(IMPULSES, 255)
REGISTER_REGISTRY(IMPULSES)
CHIMPULSE(CLONE_STANDING, 142)
CHIMPULSE(TELEPORT, 143)
CHIMPULSE(R00T, 148)
-
-#endif
-#ifndef ITEMS_ALL_H
-#define ITEMS_ALL_H
+#pragma once
#include <common/command/all.qh>
#ifndef MENUQC
string Item_Model(string item_mdl);
#endif
-
-#endif
-#ifndef INVENTORY_H
-#define INVENTORY_H
+#pragma once
#include "all.qh"
#include "item/pickup.qh"
void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); }
void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
#endif
-
-#endif
-#ifndef GAMEITEM_H
-#define GAMEITEM_H
+#pragma once
const int IT_UNLIMITED_WEAPON_AMMO = BIT(0); // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
const int IT_UNLIMITED_SUPERWEAPONS = BIT(1); // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
}
void ITEM_HANDLE(Show, GameItem this) { this.show(this); }
ENDCLASS(GameItem)
-
-#endif
-#ifndef AMMO_H
-#define AMMO_H
+#pragma once
+
#include "pickup.qh"
CLASS(Ammo, Pickup)
#ifdef SVQC
ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo))
#endif
ENDCLASS(Ammo)
-#endif
-#ifndef ARMOR_H
-#define ARMOR_H
+#pragma once
+
#include "pickup.qh"
CLASS(Armor, Pickup)
#ifdef SVQC
ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc)
#endif
ENDCLASS(Armor)
-#endif
-#ifndef HEALTH_H
-#define HEALTH_H
+#pragma once
+
#include "pickup.qh"
CLASS(Health, Pickup)
#ifdef SVQC
ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc)
#endif
ENDCLASS(Health)
-#endif
-#ifndef PICKUP_H
-#define PICKUP_H
+#pragma once
+
#include <common/items/inventory.qh>
#include <common/items/item.qh>
CLASS(Pickup, GameItem)
bool ITEM_HANDLE(Pickup, Pickup this, entity item, entity player);
#endif
ENDCLASS(Pickup)
-
-#endif
-#ifndef MAPINFO_H
-#define MAPINFO_H
+#pragma once
bool autocvar_developer_mapper;
#define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl")
#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*"
-#endif
-#ifndef CL_MINIGAMES_H
-#define CL_MINIGAMES_H
+#pragma once
// Get a square in the center of the avaliable area
// \note macro to pass by reference pos and mySize
this.minigame_event = name##_client_event; \
} \
REGISTER_INIT(MINIGAME_##name)
-
-#endif
-#ifndef CL_MINIGAMES_HUD_H
-#define CL_MINIGAMES_HUD_H
+#pragma once
float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary);
void HUD_Minigame_Mouse();
-
-#endif
-#ifndef MINIGAMES_H
-#define MINIGAMES_H
+#pragma once
// previous node in a doubly linked list
.entity list_prev;
int msle_id(string class_name);
string msle_classname(int id);
-
-#endif
-#ifndef SV_MINIGAMES_H
-#define SV_MINIGAMES_H
+#pragma once
/// Create a new minigame session
/// \return minigame session entity
this.minigame_event = name##_server_event; \
} \
REGISTER_INIT(MINIGAME_##name)
-
-#endif
-#ifndef MODELS_ALL_H
-#define MODELS_ALL_H
+#pragma once
#include "model.qh"
MODEL(Null, "null");
#include "all.inc"
-
-#endif
-#ifndef MODEL_H
-#define MODEL_H
+#pragma once
#define setmodel(e, m) _setmodel((e), (m).model_str())
precache_model(s);
}
ENDCLASS(Model)
-
-#endif
-#ifndef MONSTERS_ALL_H
-#define MONSTERS_ALL_H
+#pragma once
#include "monster.qh"
#include "monster/_mod.inc"
-
-#endif
-#ifndef MONSTER_H
-#define MONSTER_H
+#pragma once
#ifdef SVQC
#include "sv_monsters.qh"
METHOD(Monster, mr_anim, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
ENDCLASS(Monster)
-
-#endif
-#ifndef SPAWN_H
-#define SPAWN_H
+#pragma once
entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag);
-#endif
-#ifndef SV_MONSTERS_H
-#define SV_MONSTERS_H
+#pragma once
// stats networking
.int stat_monsters_killed;
#undef _MSOUND
float GetMonsterSoundSampleField_notFound;
-
-#endif
-#ifndef NET_NOTICE_H
-#define NET_NOTICE_H
+#pragma once
#ifdef SVQC
string autocvar_sv_join_notices;
#ifdef CSQC
void cl_notice_read();
#endif
-
-#endif
-#ifndef NOTIFICATIONS_H
-#define NOTIFICATIONS_H
+#pragma once
#include <common/command/all.qh>
}
#include "all.inc"
-
-#endif
-#ifndef MOVELIB_H
-#define MOVELIB_H
+#pragma once
#ifdef SVQC
.vector moveto;
#endif
void movelib_groundalign4point(entity this, float spring_length, float spring_up, float blendrate, float _max);
-
-#endif
-#ifndef MOVETYPES_H
-#define MOVETYPES_H
+#pragma once
#define IS_ONGROUND(s) boolean((s).flags & FL_ONGROUND)
#define SET_ONGROUND(s) ((s).flags |= FL_ONGROUND)
#ifdef CSQC
#define moveflags STAT(MOVEFLAGS)
#endif
-
-#endif
-#ifndef COMMON_PHYSICS_H
-#define COMMON_PHYSICS_H
+#pragma once
// Client/server mappings
return true;
}
#endif
-
-#endif
-#ifndef PLAYERSTATS_H
-#define PLAYERSTATS_H
+#pragma once
#ifdef SVQC
//float PS_PM_IN_DB = -1; // playerstats_prematch_in_db // db for info COLLECTED at the beginning of a match
void PlayerStats_PlayerDetail_CheckUpdate();
void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status);
#endif
-#endif
-#ifndef SOUNDS_ALL_H
-#define SOUNDS_ALL_H
+#pragma once
#include "sound.qh"
SOUND(Null, "misc/null");
#include "all.inc"
#include "all.qc"
-#endif
-#ifndef SOUND_H
-#define SOUND_H
+#pragma once
// negative = SVQC autochannels
// positive = one per entity
precache_sound(s);
}
ENDCLASS(Sound)
-
-#endif
-#ifndef STATS_H
-#define STATS_H
+#pragma once
#ifdef SVQC
#include <server/cl_client.qh>
#ifdef SVQC
SPECTATE_COPYFIELD(_STAT(GUNALIGN))
#endif
-
-
-#endif
-#ifndef T_ITEMS_H
-#define T_ITEMS_H
+#pragma once
const int AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
float GiveItems(entity e, float beginarg, float endarg);
#endif
-#endif
-#ifndef TEAMS_H
-#define TEAMS_H
+#pragma once
#ifdef TEAMNUMBERS_THAT_ARENT_STUPID
const int NUM_TEAM_1 = 1; // red
// safe team comparisons
#define SAME_TEAM(a,b) (teamplay ? (a.team == b.team) : (a == b))
#define DIFF_TEAM(a,b) (teamplay ? (a.team != b.team) : (a != b))
-
-#endif
-#ifndef TRIGGERS_FUNC_BREAKABLE_H
-#define TRIGGERS_FUNC_BREAKABLE_H
+#pragma once
#ifdef SVQC
spawnfunc(func_breakable);
#endif
-
-#endif
-#ifndef TRIGGERS_FUNC_INCLUDE_H
-#define TRIGGERS_FUNC_INCLUDE_H
+#pragma once
#include "door.qh"
#include "ladder.qh"
#include "train.qh"
-
-#endif
-#ifndef TRIGGERS_INCLUDE_H
-#define TRIGGERS_INCLUDE_H
+#pragma once
// some required common stuff
#ifdef CSQC
// trigger
#include "trigger/include.qh"
-
-#endif
-#ifndef PLATFORMS_H
-#define PLATFORMS_H
+#pragma once
.float dmgtime2;
const float PLAT_LOW_TRIGGER = 1;
.float dmg;
-
-#endif
-#ifndef SUBS_H
-#define SUBS_H
+#pragma once
#define SUB_ANGLES(s) (s).angles
#define SUB_VELOCITY velocity
.float max_health; // players maximum health is stored here
#endif
-
-#endif
-#ifndef TRIGGERS_TARGET_INCLUDE_H
-#define TRIGGERS_TARGET_INCLUDE_H
+#pragma once
#include "music.qh"
-
-#endif
-#ifndef TARGET_MUSIC_H
-#define TARGET_MUSIC_H
+#pragma once
.float lifetime;
#elif defined(SVQC)
void target_music_kill();
#endif
-
-#endif
-#ifndef T_TELEPORTERS_H
-#define T_TELEPORTERS_H
+#pragma once
.entity pusher;
const float TELEPORT_FLAG_SOUND = 1;
if(head.isplayermodel) \
if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
#endif
-
-#endif
-#ifndef TRIGGER_IMPULSE_H
-#define TRIGGER_IMPULSE_H
+#pragma once
// tZorks trigger impulse / gravity
.float radius;
.float falloff;
.float strength;
.float lastpushtime;
-
-#endif
-#ifndef TRIGGERS_TRIGGER_INCLUDE_H
-#define TRIGGERS_TRIGGER_INCLUDE_H
+#pragma once
#include "multi.qh"
#include "jumppads.qh"
#include "keylock.qh"
#include "impulse.qh"
#include "viewloc.qh"
-
-#endif
-#ifndef T_JUMPPADS_H
-#define T_JUMPPADS_H
+#pragma once
const float PUSH_ONCE = 1;
const float PUSH_SILENT = 2;
spawnfunc(info_notnull);
spawnfunc(target_position);
#endif
-#endif
-#ifndef SECRET_H
-#define SECRET_H
+#pragma once
#ifdef SVQC
/**
*/
void secrets_setstatus(entity this);
#endif
-#endif
-#ifndef TRIGGER_SWAMP_H
-#define TRIGGER_SWAMP_H
+#pragma once
.float swamp_interval; //Hurt players in swamp with this interval
.float swamp_slowdown; //Players in swamp get slowd down by this mutch 0-1 is slowdown 1-~ is speedup (!?)
.float in_swamp; // bool
.entity swampslug; // Uses this to release from swamp ("untouch" fix)
-
-#endif
-#ifndef T_VIEWLOC_H
-#define T_VIEWLOC_H
+#pragma once
.entity viewloc;
.entity enemy;
.vector movedir;
#endif
-
-#endif
-#ifndef TRIGGERS_H
-#define TRIGGERS_H
+#pragma once
const float SF_TRIGGER_INIT = 1;
const float SF_TRIGGER_UPDATE = 2;
const int ACTIVE_BUSY = 2;
const int ACTIVE_TOGGLE = 3;
#endif
-
-#endif
-#ifndef TURRETS_ALL_H
-#define TURRETS_ALL_H
+#pragma once
#include <common/command/all.qh>
#include "config.qh"
REGISTER_TURRET(Null, NEW(Turret));
#include "turret/_mod.inc"
-
-#endif
-#ifndef TURRETS_CONFIG_H
-#define TURRETS_CONFIG_H
+#pragma once
#ifdef SVQC
#endif
-
-#endif
-#ifndef SV_TURRETS_H
-#define SV_TURRETS_H
+#pragma once
entity turret_projectile(entity actor, Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim);
void turret_projectile_explode(entity this);
float tvt_thadf; // turret head angle diff float, updated by a successful call to turret_validate_target
float tvt_tadf; // turret angle diff float, updated by a successful call to turret_validate_target
float tvt_dist; // turret distance, updated by a successful call to turret_validate_target
-
-#endif
-#ifndef TURRET_H
-#define TURRET_H
+#pragma once
#include <common/weapons/all.qh>
const int TNSF_ANIM = 128;
const int TNSF_FULL_UPDATE = 16777215;
-
-#endif
-#ifndef TURRETS_UTIL_H
-#define TURRETS_UTIL_H
+#pragma once
float shortangle_f(float ang1, float ang2);
float anglemods(float v);
vector angleofs(entity from, entity to);
vector angleofs3(vector from, vector from_a, entity to);
void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype);
-
-#endif
-#ifndef COMMON_UTIL_H
-#define COMMON_UTIL_H
+#pragma once
#ifndef MENUQC
// Returns the correct difference between two always increasing numbers
#define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from)
-#endif
-#ifndef VEHICLES_ALL_H
-#define VEHICLES_ALL_H
+#pragma once
#include "vehicle.qh"
REGISTER_VEHICLE(Null, NEW(Vehicle));
#include "vehicle/_mod.inc"
-
-#endif
-#ifndef CL_VEHICLES_H
-#define CL_VEHICLES_H
+#pragma once
vector vehicleHud_Size;
vector vehicleHud_Pos;
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
#define weapon2mode STAT(VEHICLESTAT_W2MODE)
-
-#endif
-#ifndef VEHICLES_DEF_H
-#define VEHICLES_DEF_H
+#pragma once
#ifdef SVQC
#include <common/turrets/sv_turrets.qh>
float vehicle_altitude(entity this, float amax);
#endif
-#endif
-#ifndef VEHICLE_H
-#define VEHICLE_H
+#pragma once
CLASS(Vehicle, Object)
ATTRIB(Vehicle, vehicleid, int, 0)
// fields:
.entity tur_head;
-
-#endif
-#ifndef BUMBLEBEE_H
-#define BUMBLEBEE_H
+#pragma once
#ifdef CSQC
void CSQC_BUMBLE_GUN_HUD();
#endif
-
-#endif
-#ifndef RAPTOR_H
-#define RAPTOR_H
+#pragma once
const int RSM_FIRST = 1;
const int RSM_BOMB = 1;
const int RSM_FLARE = 2;
const int RSM_LAST = 2;
-
-#endif
-#ifndef VIEWLOC_H
-#define VIEWLOC_H
+#pragma once
.entity viewloc;
void viewloc_SetTags(entity this);
#endif
-
-#endif
-#ifndef WEAPONS_ALL_H
-#define WEAPONS_ALL_H
+#pragma once
#include <common/command/all.qh>
#include <common/stats.qh>
vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
#endif
-
-#endif
-#ifndef CALCULATIONS_H
-#define CALCULATIONS_H
+#pragma once
+
vector damage_explosion_calcpush(vector explosion_f, vector target_v, float speedfactor);
vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float spreadstyle);
int W_GetGunAlignment(entity player);
-#endif
-#ifndef WEAPONS_CONFIG_H
-#define WEAPONS_CONFIG_H
+#pragma once
#ifdef SVQC
// ==========================
cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
#endif
-#endif
-#ifndef WEAPON_H
-#define WEAPON_H
+#pragma once
+
#include <common/items/item/pickup.qh>
#include <common/stats.qh>
string W_Sound(string w_snd);
string W_Model(string w_mdl);
-
-#endif