--- /dev/null
+#ifndef ANNOUNCER_H
+#define ANNOUNCER_H
+
+void Announcer();
+
+#endif
#if defined(CSQC)
+ #include "autocvars.qh"
+ #include "../common/util.qh"
+ #include "defs.qh"
+ #include "main.qh"
#include "movetypes.qh"
#include "prandom.qh"
#include "rubble.qh"
--- /dev/null
+#ifndef CASINGS_H
+#define CASINGS_H
+
+void Casings_Precache();
+
+void Ent_Casing(float isNew);
+
+#endif
// Last updated: December 28th, 2011
// ==============================================
+#include "cl_cmd.qh"
+
+#include "../../common/mapinfo.qh"
#include "../../common/command/generic.qh"
#include "../../common/command/shared_defs.qh"
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../hud.qh"
+#include "../hud_config.qh"
+#include "../main.qh"
+#include "../mapvoting.qh"
+#include "../miscfunctions.qh"
+#include "../scoreboard.qh"
void DrawDebugModel()
{
#if defined(CSQC)
+ #include "defs.qh"
#include "gibs.qh"
#include "miscfunctions.qh"
#include "player_skeleton.qh"
#include "sortlist.qh"
+ #include "main.qh"
+ #include "../client/autocvars.qh"
#include "../client/weapons/projectile.qh"
#include "../common/animdecide.qh"
#include "../common/csqcmodel_settings.qh"
+ #include "../common/teams.qh"
#include "../csqcmodellib/cl_model.qh"
#include "../csqcmodellib/cl_player.qh"
--- /dev/null
+#ifndef CSQCMODEL_HOOKS
+#define CSQCMODEL_HOOKS
+
+void CSQCPlayer_Precache();
+
+#endif
#if defined(CSQC)
#include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
#include "../common/constants.qh"
#include "../common/util.qh"
+ #include "../common/deathtypes.qh"
#include "../common/weapons/weapons.qh"
+ #include "vehicles/vehicles.qh"
#include "autocvars.qh"
- #include "../common/deathtypes.qh"
+ #include "defs.qh"
#include "damage.qh"
+ #include "gibs.qh"
#include "movetypes.qh"
#include "prandom.qh"
- #include "vehicles/vehicles.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#endif
+.entity tag_entity;
+
+.float cnt;
+.int state;
+.bool isplayermodel;
+
void DamageEffect_Think()
{
// if particle distribution is enabled, slow ticrate by total number of damages
#define DAMAGE_H
.float total_damages; // number of effects which currently are attached to a player
+
+void Ent_DamageInfo(float isNew);
+
#endif
-#ifndef DEFS_H
-#define DEFS_H
+#ifndef CLIENT_DEFS_H
+#define CLIENT_DEFS_H
// Additional OPTIONAL Fields and Globals
//float intermission;
--- /dev/null
+#ifndef EFFECTS_H
+#define EFFECTS_H
+
+void Net_ReadArc();
+
+#endif
#include "gibs.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "rubble.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+
+.float scale;
+.float alpha;
+.float cnt;
+.float gravity;
+
void Gib_Delete()
{
remove(self);
+#include "hook.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
#include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
#include "noise.qh"
+#include "../common/teams.qh"
#include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
+#include "../csqcmodellib/interpolate.qh"
entityclass(Hook)
class(Hook) .float HookType; // ENT_CLIENT_*
--- /dev/null
+#ifndef HOOK_H
+#define HOOK_H
+
+void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
+void Hook_Precache();
+
+void Ent_ReadHook(float bIsNew, float type);
+
+#endif
+#include "hud.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud_config.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
#include "scoreboard.qh"
+#include "sortlist.qh"
#include "teamradar.qh"
#include "../common/buffs.qh"
+#include "../common/constants.qh"
#include "../common/counting.qh"
+#include "../common/deathtypes.qh"
#include "../common/mapinfo.qh"
#include "../common/nades.qh"
+#include "../common/stats.qh"
+#include "../csqcmodellib/cl_player.qh"
#include "../server/t_items.qh"
+#include "../warpzonelib/mathlib.qh"
/*
==================
// Health/armor (#3)
//
-// prev_* vars contain the health/armor at the previous FRAME
-// set to -1 when player is dead or was not playing
-int prev_health, prev_armor;
-float health_damagetime, armor_damagetime;
-int health_beforedamage, armor_beforedamage;
-// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
-int old_p_health, old_p_armor;
-float old_p_healthtime, old_p_armortime;
-// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
-// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
-int prev_p_health, prev_p_armor;
void HUD_HealthArmor(void)
{
// Vote window (#9)
//
-int vote_yescount;
-int vote_nocount;
-int vote_needed;
-int vote_highlighted; // currently selected vote
-
-int vote_active; // is there an active vote?
-int vote_prev; // previous state of vote_active to check for a change
-float vote_alpha;
-float vote_change; // "time" when vote_active changed
void HUD_Vote(void)
{
int panel_order[HUD_PANEL_MAX];
string hud_panelorder_prev;
+void HUD_Reset (void);
+void HUD_Main (void);
+
+int vote_yescount;
+int vote_nocount;
+int vote_needed;
+int vote_highlighted; // currently selected vote
+
+int vote_active; // is there an active vote?
+int vote_prev; // previous state of vote_active to check for a change
+float vote_alpha;
+float vote_change; // "time" when vote_active changed
+
float hud_draw_maximized;
float hud_panel_radar_maximized;
float chat_panel_modified;
float GetPlayerColorForce(int i);
+float stringwidth_colors(string s, vector theSize);
+int GetPlayerColor(int i);
+string GetPlayerName(int i);
+float stringwidth_nocolors(string s, vector theSize);
+void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
+
+
+// prev_* vars contain the health/armor at the previous FRAME
+// set to -1 when player is dead or was not playing
+int prev_health, prev_armor;
+float health_damagetime, armor_damagetime;
+int health_beforedamage, armor_beforedamage;
+// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
+int old_p_health, old_p_armor;
+float old_p_healthtime, old_p_armortime;
+// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
+// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
+int prev_p_health, prev_p_armor;
+
#define HUD_PANELS(HUD_PANEL) \
HUD_PANEL(WEAPONS , HUD_Weapons , weapons) \
#if defined(CSQC)
#include "../dpdefs/csprogsdefs.qh"
#include "defs.qh"
+ #include "miscfunctions.qh"
#include "../dpdefs/keycodes.qh"
#include "../common/constants.qh"
#include "autocvars.qh"
--- /dev/null
+#ifndef HUD_CONFIG_H
+#define HUD_CONFIG_H
+
+void HUD_Panel_ExportCfg(string cfgname);
+
+void HUD_Panel_Mouse();
+
+void HUD_Configure_Frame();
+
+void HUD_Configure_PostDraw();
+
+float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary);
+
+#endif
#include "../dpdefs/csprogsdefs.qh"
#include "../common/buffs.qh"
#include "../csqcmodellib/interpolate.qh"
+ #include "hook.qh"
#include "main.qh"
#include "../csqcmodellib/cl_model.qh"
#elif defined(MENUQC)
--- /dev/null
+#ifndef LASER_H
+#define LASER_H
+
+void Ent_Laser();
+
+#endif
+#include "main.qh"
+
+#include "casings.qh"
+#include "csqcmodel_hooks.qh"
+#include "damage.qh"
+#include "defs.qh"
+#include "effects.qh"
+#include "gibs.qh"
+#include "hud.qh"
+#include "hud_config.qh"
+#include "hook.qh"
+#include "laser.qh"
#include "mapvoting.qh"
#include "modeleffects.qh"
#include "particles.qh"
#include "scoreboard.qh"
#include "shownames.qh"
+#include "sortlist.qh"
#include "target_music.qh"
#include "tturrets.qh"
#include "tuba.qh"
#include "wall.qh"
#include "waypointsprites.qh"
+#include "miscfunctions.qh"
+#include "prandom.qh"
#include "vehicles/vehicles.qh"
+#include "weapons/projectile.qh"
+
#include "../server/vehicles/bumblebee.qh"
+#include "../server/t_items.qh"
+#include "../common/buffs.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/notifications.qh"
#include "../common/net_notice.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/weapons/weapons.qh"
#include "../common/monsters/monsters.qh"
+#include "../common/nades.qh"
+
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/interpolate.qh"
#include "../warpzonelib/client.qh"
#ifndef MAIN_H
#define MAIN_H
+#include "../common/constants.qh"
+
// --------------------------------------------------------------------------
// MENU Functionality
float zoomin_effect;
float warmup_stage;
+void Fog_Force();
+
string getcommandkey(string text, string command);
string vote_called_vote;
#include "mapvoting.qh"
+#include "hud.qh"
+#include "../dpdefs/keycodes.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "../common/mapinfo.qh"
+#include "miscfunctions.qh"
#include "scoreboard.qh"
+#include "../common/util.qh"
+
string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize)
{
string pre, post;
#ifndef MAPVOTING_H
#define MAPVOTING_H
+#include "../common/constants.qh"
+
int mv_num_maps;
float mv_active;
#include "miscfunctions.qh"
+#include "../common/teams.qh"
#include "../common/urllib.qh"
-
+#include "../common/util.qh"
#include "../common/command/generic.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../warpzonelib/mathlib.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "sortlist.qh"
void AuditLists()
{
#include "modeleffects.qh"
+#include "defs.qh"
+#include "main.qh"
+
+.float cnt;
+.float scale;
+.float alpha;
+
void ModelEffect_Draw()
{
self.angles = self.angles + frametime * self.avelocity;
#include "particles.qh"
+#include "../common/util.qh"
+#include "autocvars.qh"
+#include "bgmscript.qh"
+#include "main.qh"
+#include "../common/stats.qh"
+#include "../warpzonelib/common.qh"
+
void Draw_PointParticles()
{
float n, i, fail;
#include "player_skeleton.qh"
+#include "../common/csqcmodel_settings.qh"
#include "../warpzonelib/anglestransform.qh"
class(Skeleton) .float skeleton_info_modelindex;
#ifndef PLAYER_SKELETON
#define PLAYER_SKELETON
+#include "../common/util.qh"
+
void free_skeleton_from_frames(entity e);
void skeleton_from_frames(entity e, float is_dead);
void skeleton_loadinfo(entity e);
#include "scoreboard.qh"
+#include "autocvars.qh"
+#include "miscfunctions.qh"
+#include "../common/constants.qh"
+#include "../common/counting.qh"
+#include "../common/mapinfo.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "sortlist.qh"
+
float scoreboard_alpha_bg;
float scoreboard_alpha_fg;
float scoreboard_highlight;
float scoreboard_fade_alpha;
void Cmd_HUD_SetFields(float argc);
+void HUD_DrawScoreboard();
void HUD_InitScores();
void HUD_UpdatePlayerPos(entity pl);
void HUD_UpdateTeamPos(entity Team);
#include "main.qh"
#include "../csqcmodellib/cl_model.qh"
#include "shownames.qh"
+ #include "hud.qh"
+ #include "miscfunctions.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#endif
class(ShowNames) .float sameteam;
class(ShowNames) .float fadedelay;
class(ShowNames) .float pointtime;
+
+void Draw_ShowNames_All();
+
#endif
#include "target_music.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "../common/util.qh"
+#include "../common/constants.qh"
+#include "../warpzonelib/common.qh"
+
+.string noise;
+.float cnt;
+.float count;
+.float fade_time;
+.float fade_rate;
+.float lifetime;
+.float volume;
+
void TargetMusic_Advance()
{
// run AFTER all the thinks!
#if defined(CSQC)
+ #include "autocvars.qh"
+ #include "defs.qh"
+ #include "hud.qh"
+ #include "main.qh"
+ #include "miscfunctions.qh"
#include "teamradar.qh"
+ #include "../common/util.qh"
+ #include "../csqcmodellib/interpolate.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#endif
#include "tturrets.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "hud.qh"
+#include "miscfunctions.qh"
#include "waypointsprites.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "teamradar.qh"
+#include "../common/teams.qh"
#include "../server/movelib.qh"
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.vector colormod;
+.float cnt;
+.float alpha;
+.float gravity;
string tid2info_base;
string tid2info_head;
#include "tuba.qh"
+#include "autocvars.qh"
+#include "main.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+#include "../warpzonelib/mathlib.qh"
+
#define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
const int TUBA_MIN = -18;
-#if defined(CSQC)
- #include "../../dpdefs/csprogsdefs.qh"
- #include "../defs.qh"
- #include "../../common/constants.qh"
- #include "../../common/stats.qh"
- #include "../../common/util.qh"
- #include "../../common/buffs.qh"
- #include "../autocvars.qh"
- #include "../movetypes.qh"
- #include "../prandom.qh"
- #include "../main.qh"
- #include "vehicles.qh"
- #include "../../csqcmodellib/cl_model.qh"
- #include "../../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "../../dpdefs/csprogsdefs.qh"
+#include "../../common/constants.qh"
+#include "../../common/stats.qh"
+#include "../../common/util.qh"
+#include "../../common/buffs.qh"
+#include "../../csqcmodellib/cl_model.qh"
+#include "../../server/t_items.qh"
+#include "../defs.qh"
+#include "../miscfunctions.qh"
+#include "../movetypes.qh"
+#include "../scoreboard.qh"
+#include "../autocvars.qh"
+#include "../movetypes.qh"
+#include "../prandom.qh"
+#include "../main.qh"
+#include "vehicles.qh"
+
+.float cnt;
const string hud_bg = "gfx/vehicles/frame.tga";
const string hud_sh = "gfx/vehicles/vh-shield.tga";
const string raptor_drop = "gfx/vehicles/axh-dropcross.tga";
string raptor_xhair;
-void CSQC_WAKIZASHI_HUD();
-void CSQC_SPIDER_HUD();
-void CSQC_RAPTOR_HUD();
-void CSQC_BUMBLE_HUD();
-void CSQC_BUMBLE_GUN_HUD();
+
const int MAX_AXH = 4;
entity AuxiliaryXhair[MAX_AXH];
void Vehicles_Precache();
void Net_AuXair2(bool bIsNew);
void Net_VehicleSetup();
+
+void CSQC_WAKIZASHI_HUD();
+void CSQC_SPIDER_HUD();
+void CSQC_RAPTOR_HUD();
+void CSQC_BUMBLE_HUD();
+void CSQC_BUMBLE_GUN_HUD();
+
#endif
#include "../common/weapons/weapons.qh"
#include "../common/mapinfo.qh"
#include "autocvars.qh"
+ #include "announcer.qh"
#include "hud.qh"
+ #include "hud_config.qh"
+ #include "hook.qh"
+ #include "mapvoting.qh"
+ #include "miscfunctions.qh"
#include "scoreboard.qh"
+ #include "shownames.qh"
+ #include "target_music.qh"
#include "noise.qh"
#include "main.qh"
+ #include "waypointsprites.qh"
+ #include "vehicles/vehicles.qh"
#include "../csqcmodellib/cl_player.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#include "wall.qh"
+#include "autocvars.qh"
+#include "bgmscript.qh"
+#include "main.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/interpolate.qh"
+
+.float alpha;
+.float scale;
+.vector movedir;
+
void Ent_Wall_Draw()
{
float f;
#include "waypointsprites.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+#include "teamradar.qh"
+#include "../common/buffs.qh"
+#include "../common/constants.qh"
+#include "../common/teams.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/interpolate.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.float alpha;
+
void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
{
vector v1, v2, v3, v4;
+#include "../../common/constants.qh"
+#include "../../common/nades.qh"
+#include "../../common/util.qh"
+#include "../../csqcmodellib/interpolate.qh"
+#include "../../warpzonelib/anglestransform.qh"
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../main.qh"
+#include "../movetypes.qh"
#include "projectile.qh"
+.float alpha;
+.float scale;
+.vector colormod;
+
void SUB_Stop()
{
self.move_velocity = self.move_avelocity = '0 0 0';
#ifndef BUFFS_H
#define BUFFS_H
+#include "util.qh"
+
entity Buff_Type_first;
entity Buff_Type_last;
.entity enemy; // internal next pointer
#ifndef GENERIC_H
#define GENERIC_H
+#include "../constants.qh"
#include "markup.qh"
#include "rpn.qh"
#ifndef COUNTING_H
#define COUNTING_H
+#include "util.qh"
+
// ===============================================
// Time processing and counting functions/macros
// ===============================================
#ifndef MAPINFO_H
#define MAPINFO_H
+#include "util.qh"
+
int MAPINFO_TYPE_ALL;
entity MapInfo_Type_first;
entity MapInfo_Type_last;
--- /dev/null
+#include "monster/zombie.qc"
+#include "monster/spider.qc"
+#include "monster/mage.qc"
+#include "monster/wyvern.qc"
+#include "monster/shambler.qc"
+++ /dev/null
-// TODO: include once
-//#ifndef MONSTERS_ALL_H
-//#define MONSTERS_ALL_H
-
-#include "monster/zombie.qc"
-#include "monster/spider.qc"
-#include "monster/mage.qc"
-#include "monster/wyvern.qc"
-#include "monster/shambler.qc"
-
-//#endif
#include "monsters.qh"
-#include "all.qh"
+#include "all.inc"
// MONSTER PLUGIN SYSTEM
entity monster_info[MON_MAXCOUNT];
#ifndef MONSTERS_H
#define MONSTERS_H
+#include "../util.qh"
+
// monster requests
const int MR_SETUP = 1; // (SERVER) setup monster data
const int MR_THINK = 2; // (SERVER) logic to run every frame
REGISTER_MONSTER_2(MON_##id,func,monsterflags,min_s,max_s,modelname,shortname,mname)
#endif
-#include "all.qh"
+#include "all.inc"
#undef REGISTER_MONSTER
ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done);
#ifndef NADES_H
#define NADES_H
+#include "teams.qh"
+
.float healer_lifetime;
.float healer_radius;
#ifndef NOTIFICATIONS_H
#define NOTIFICATIONS_H
+#include "autocvars.qh"
#include "constants.qh"
#include "teams.qh"
+#include "util.qh"
// ================================================
// Unified notification system, written by Samual
--- /dev/null
+#!/bin/bash
+set -eu
+cd "$(dirname "$0")"
+cd ..
+
+export QCC=../../../gmqcc/gmqcc
+
+function check() {
+ declare -l base="$1"
+ declare -la predefs=("${!2}")
+ find "$base" -type f -name '*.qc' -print0 | while IFS= read -r -d '' file; do
+ echo "$file"
+ ${QCC} -std=gmqcc -fftepp ${predefs[@]} "$file" >/dev/null
+ done
+}
+
+# TODO: `sort -V` all the includes
+
+clientdefs=("-DCSQC" "common/util-pre.qh" "dpdefs/csprogsdefs.qh")
+check client clientdefs[@]