]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up CSQC #includes
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 03:07:19 +0000 (14:07 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 03:07:19 +0000 (14:07 +1100)
58 files changed:
qcsrc/client/casings.qc
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/defs.qh
qcsrc/client/gibs.qc
qcsrc/client/gibs.qh [new file with mode: 0644]
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/mapvoting.qh [new file with mode: 0644]
qcsrc/client/miscfunctions.qc
qcsrc/client/miscfunctions.qh [new file with mode: 0644]
qcsrc/client/modeleffects.qc
qcsrc/client/modeleffects.qh [new file with mode: 0644]
qcsrc/client/particles.qc
qcsrc/client/particles.qh [new file with mode: 0644]
qcsrc/client/player_skeleton.qc
qcsrc/client/progs.src
qcsrc/client/rubble.qc
qcsrc/client/rubble.qh [new file with mode: 0644]
qcsrc/client/scoreboard.qc
qcsrc/client/scoreboard.qh
qcsrc/client/sortlist.qc
qcsrc/client/sortlist.qh [new file with mode: 0644]
qcsrc/client/target_music.qc
qcsrc/client/target_music.qh [new file with mode: 0644]
qcsrc/client/teamradar.qc
qcsrc/client/teamradar.qh
qcsrc/client/tturrets.qc
qcsrc/client/tturrets.qh
qcsrc/client/tuba.qc
qcsrc/client/tuba.qh [new file with mode: 0644]
qcsrc/client/vehicles/vehicles.qh
qcsrc/client/wall.qc
qcsrc/client/wall.qh [new file with mode: 0644]
qcsrc/client/waypointsprites.qc
qcsrc/client/waypointsprites.qh
qcsrc/client/weapons/projectile.qc
qcsrc/client/weapons/projectile.qh
qcsrc/common/command/generic.qh
qcsrc/common/command/markup.qc
qcsrc/common/command/markup.qh
qcsrc/common/command/rpn.qc
qcsrc/common/command/rpn.qh
qcsrc/common/deathtypes.qh
qcsrc/common/net_notice.qc
qcsrc/common/net_notice.qh
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/csqcmodellib/cl_model.qh
qcsrc/csqcmodellib/common.qh
qcsrc/server/movelib.qc
qcsrc/server/movelib.qh [new file with mode: 0644]
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/bumblebee.qh [new file with mode: 0644]
qcsrc/warpzonelib/common.qh

index bee5b540b344bb5dc0ef198259fee9a0e0f46374..b7693efbb8d545670636b7730a2a73898b11de35 100644 (file)
@@ -1,13 +1,11 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
        #include "movetypes.qh"
        #include "prandom.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
+       #include "rubble.qh"
+
+       .float cnt;
+       .float alpha;
+       .float state;
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index 8658ae2cd2ca3414d773e209edafadbdadb3bfa3..7b74d2dd7fa56752889ee75f6abb3cdbb1e08115 100644 (file)
@@ -3,19 +3,8 @@
 //  Last updated: December 28th, 2011
 // ==============================================
 
-#if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
-       #include "../defs.qh"
-       #include "../../common/util.qh"
-       #include "../../common/mapinfo.qh"
-       #include "../../common/command/shared_defs.qh"
-       #include "cl_cmd.qh"
-       #include "../autocvars.qh"
-       #include "../hud.qh"
-       #include "../main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "../../common/command/generic.qh"
+#include "../../common/command/shared_defs.qh"
 
 void DrawDebugModel()
 {
index 1bdaaf1142a7c8e3e3d40c0c313fcb524bd0d6f7..d139f589c1e5dafba6ebb529060167db2a4dcd45 100644 (file)
@@ -1,20 +1,22 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
+       #include "gibs.qh"
+       #include "miscfunctions.qh"
+       #include "player_skeleton.qh"
+       #include "sortlist.qh"
+
+       #include "../client/weapons/projectile.qh"
+
        #include "../common/animdecide.qh"
-       #include "autocvars.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "main.qh"
        #include "../common/csqcmodel_settings.qh"
-       #include "../csqcmodellib/common.qh"
+
        #include "../csqcmodellib/cl_model.qh"
        #include "../csqcmodellib/cl_player.qh"
-       #include "weapons/projectile.qh"
-       #include "player_skeleton.qh"
+       #include "../csqcmodellib/interpolate.qh"
+
+       #include "../warpzonelib/mathlib.qh"
+
+       .float death_time;
+       .float modelflags;
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index b13583f6f514785ce4a3f2e28076ad07e00ca50b..4ae2a06965d0f4a13bbfa7c827df18c053f27b0b 100644 (file)
@@ -1,152 +1,6 @@
 #ifndef DEFS_H
 #define DEFS_H
 
-//NOTE: THIS IS AN INTERFACE FILE. DO NOT EDIT.
-//MODIFYING THIS FILE CAN RESULT IN CRC ERRORS.
-//YOU HAVE BEEN WARNED.
-
-//feel free to look though. :)
-
-
-
-
-
-/*
-==============================================================================
-
-                       SOURCE FOR GLOBALVARS_T C STRUCTURE
-
-==============================================================================
-*/
-
-//
-// system globals
-//
-//entity               self;
-//entity               other;
-//entity               world;
-//float                time;
-//float                frametime;
-
-//int          player_localentnum;     //the entnum of the VIEW entity
-//int          player_localnum;        //the playernum
-//float                maxclients;     //a constant filled in by the engine. gah, portability eh?
-
-//float                clientcommandframe;     //player movement
-//float                servercommandframe;     //clientframe echoed off the server
-
-//string               mapname;
-
-//
-// global variables set by built in functions
-//
-//vector               v_forward, v_up, v_right;       // set by makevectors()
-
-// set by traceline / tracebox
-//float                trace_allsolid;
-//float                trace_startsolid;
-//float                trace_fraction;
-//vector               trace_endpos;
-//vector               trace_plane_normal;
-//float                trace_plane_dist;
-//entity               trace_ent;
-//float                trace_inopen;
-//float                trace_inwater;
-
-//
-// required prog functions
-//
-void()         CSQC_Init;
-void()         CSQC_Shutdown;
-float(float f, float t, float n)       CSQC_InputEvent;
-void(float w, float h)         CSQC_UpdateView;
-bool(string s) CSQC_ConsoleCommand;
-
-//these fields are read and set by the default player physics
-//vector               pmove_org;
-//vector               pmove_vel;
-//vector               pmove_mins;
-//vector               pmove_maxs;
-//retrieved from the current movement commands (read by player physics)
-//float                input_timelength;
-//vector               input_angles;
-//vector               input_movevalues;       //forwards, right, up.
-//int                  input_buttons;          //attack, use, jump (default physics only uses jump)
-
-//float                movevar_gravity;
-//float                movevar_stopspeed;
-//float                movevar_maxspeed;
-//float                movevar_spectatormaxspeed;      //used by NOCLIP movetypes.
-//float                movevar_accelerate;
-//float                movevar_airaccelerate;
-//float                movevar_wateraccelerate;
-//float                movevar_friction;
-//float                movevar_waterfriction;
-//float                movevar_entgravity;     //the local player's gravity field. Is a multiple (1 is the normal value)
-
-//================================================
-//void         end_sys_globals;                // flag for structure dumping
-//================================================
-
-/*
-==============================================================================
-
-                       SOURCE FOR ENTVARS_T C STRUCTURE
-
-==============================================================================
-*/
-
-//
-// system fields (*** = do not set in prog code, maintained by C code)
-//
-.int           modelindex;             // *** model index in the precached list
-.vector                absmin, absmax; // *** origin + mins / maxs
-
-.int           entnum; // *** the ent number as on the server
-.float         drawmask;
-.void()                predraw;
-
-.float         movetype;
-.float         solid;
-
-.vector                origin;                 // ***
-.vector                oldorigin;              // ***
-.vector                velocity;
-.vector                angles;
-.vector                avelocity;
-
-.string                classname;              // spawn function
-.string                model;
-.int           frame;
-.int           skin;
-.int           effects;
-
-.vector                mins, maxs;             // bounding box extents reletive to origin
-.vector                size;                   // maxs - mins
-
-.void()                touch;
-.void()                use;
-.void()                think;
-.void()                blocked;                // for doors or plats, called when can't push other
-
-.float         nextthink;
-
-.entity                chain;
-
-.string                netname;
-
-.entity        enemy;
-
-.int           flags;
-
-.int           colormap;
-
-.entity                owner;          // who launched a missile
-
-//================================================
-//void         end_sys_fields;                 // flag for structure dumping
-//================================================
-
 // Additional OPTIONAL Fields and Globals
 //float                intermission;
 float          scoreboard_showscores;
index 00c774f71cb427240d4147c5ac8ceafb49a4f8c4..2d8f48b1a7db5f75517771979f728adea19ef630 100644 (file)
@@ -1,20 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/util.qh"
-       #include "../common/buffs.qh"
-       #include "autocvars.qh"
-       #include "movetypes.qh"
-       #include "prandom.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-       #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-.bool silent;
+#include "gibs.qh"
 
 void Gib_Delete()
 {
diff --git a/qcsrc/client/gibs.qh b/qcsrc/client/gibs.qh
new file mode 100644 (file)
index 0000000..e863ddf
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef GIBS_H
+#define GIBS_H
+
+.vector colormod;
+
+.bool silent;
+
+void Gib_Delete();
+
+string species_prefix(int specnum);
+
+void Gib_setmodel(entity gib, string mdlname, int specnum);
+
+void new_te_bloodshower (int ef, vector org, float explosionspeed, int howmany);
+
+void SUB_RemoveOnNoImpact();
+
+void Gib_Touch();
+
+void Gib_Draw();
+
+void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, int specnum, bool destroyontouch, bool issilent);
+
+void Ent_GibSplash(bool isNew);
+
+void GibSplash_Precache();
+#endif
\ No newline at end of file
index 7bd1027f84fce05cd265ff646a5e77c67fe5e15a..8436ff6225a0ccc0e546bf5007fccec05720c394 100644 (file)
@@ -1,19 +1,6 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/common.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "noise.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
+#include "hud.qh"
+#include "noise.qh"
+#include "../warpzonelib/common.qh"
 
 .float HookType; // ENT_CLIENT_*
 .vector origin;
index 528b0f19aa76b383075bf2473a15057952c0e58c..e97c89e097c75ce3115e5a98ffb5f228ee0cc614 100644 (file)
@@ -1,27 +1,10 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/stats.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/nades.qh"
-       #include "../common/buffs.qh"
-       #include "../common/counting.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "../common/mapinfo.qh"
-       #include "autocvars.qh"
-       #include "../common/deathtypes.qh"
-       #include "teamradar.qh"
-       #include "hud.qh"
-       #include "scoreboard.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_player.qh"
-       #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "scoreboard.qh"
+#include "teamradar.qh"
+#include "../common/buffs.qh"
+#include "../common/counting.qh"
+#include "../common/mapinfo.qh"
+#include "../common/nades.qh"
+#include "../server/t_items.qh"
 
 /*
 ==================
index 5c21886c53b93bfc1f77d5439ac9e2f464132b51..d2b225765ab4aea6c596693aa776cb290a4eb291 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef HUD_H
 #define HUD_H
 
+#include "../common/weapons/weapons.qh"
+
 const int HUD_PANEL_MAX = 24;
 entity hud_panel[HUD_PANEL_MAX];
 const int HUD_PANEL_FIRST = 0;
@@ -99,6 +101,8 @@ string panel_bg_padding_str;
 
 float current_player;
 
+float GetPlayerColorForce(float i);
+
 
 #define HUD_PANELS(HUD_PANEL)                                                                                                                                                                          \
        HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons)                                                                                                                    \
index 828812d613374ee60e92306b3a79d692d3199a5b..42140acedf912a574ded6b3c6813b44d0ba2851c 100644 (file)
@@ -1,28 +1,23 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-    #include "defs.qh"
-    #include "../common/constants.qh"
-    #include "../common/stats.qh"
-    #include "../warpzonelib/client.qh"
-    #include "../common/teams.qh"
-    #include "../common/util.qh"
-    #include "../common/nades.qh"
-    #include "../common/weapons/weapons.qh"
-    #include "../common/mapinfo.qh"
-    #include "command/cl_cmd.qh"
-    #include "autocvars.qh"
-    #include "../common/notifications.qh"
-    #include "../csqcmodellib/interpolate.qh"
-    #include "hud.qh"
-    #include "waypointsprites.qh"
-    #include "prandom.qh"
-    #include "tturrets.qh"
-    #include "main.qh"
-    #include "../csqcmodellib/cl_model.qh"
-    #include "shownames.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "mapvoting.qh"
+#include "modeleffects.qh"
+#include "particles.qh"
+#include "scoreboard.qh"
+#include "shownames.qh"
+#include "target_music.qh"
+#include "tturrets.qh"
+#include "tuba.qh"
+#include "wall.qh"
+#include "waypointsprites.qh"
+
+#include "vehicles/vehicles.qh"
+
+#include "../server/vehicles/bumblebee.qh"
+
+#include "../common/net_notice.qh"
+
+#include "../common/monsters/monsters.qh"
+
+#include "../warpzonelib/client.qh"
 
 // --------------------------------------------------------------------------
 // BEGIN REQUIRED CSQC FUNCTIONS
index ab9d36c632926b31ca4e7210ba0feb65e1e2a6a1..f6e86516f90cc726b9504c4bfb4578ba72cbdc15 100644 (file)
@@ -1,56 +1,16 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../dpdefs/keycodes.qh"
-       #include "../common/constants.qh"
-       #include "../common/util.qh"
-       #include "../common/mapinfo.qh"
-       #include "autocvars.qh"
-       #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-
-int mv_num_maps;
-
-float mv_active;
-string mv_maps[MAPVOTE_COUNT];
-string mv_pics[MAPVOTE_COUNT];
-string mv_pk3[MAPVOTE_COUNT];
-float mv_preview[MAPVOTE_COUNT];
-float mv_votes[MAPVOTE_COUNT];
-float mv_avail[MAPVOTE_COUNT];
-float mv_avail_start[MAPVOTE_COUNT];
-entity mv_pk3list;
-float mv_abstain;
-float mv_ownvote;
-float mv_detail;
-float mv_timeout;
-float mv_top2_time;
-float mv_top2_alpha;
-
-vector mv_mousepos;
-int mv_selection;
-int mv_columns;
-int mv_mouse_selection;
-int mv_selection_keyboard;
-
-float gametypevote;
-string mapvote_chosenmap;
-vector gtv_text_size;
-vector gtv_text_size_small;
-
-string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, vector fontsize)
+#include "mapvoting.qh"
+#include "scoreboard.qh"
+
+string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize)
 {
        string pre, post;
        pre = sprintf("%d. ", id+1);
        if(mv_detail)
        {
-               if(count == 1)
+               if(_count == 1)
                        post = _(" (1 vote)");
-               else if(count >= 0 && mv_avail[id] == GTV_AVAILABLE)
-                       post = sprintf(_(" (%d votes)"), count);
+               else if(_count >= 0 && mv_avail[id] == GTV_AVAILABLE)
+                       post = sprintf(_(" (%d votes)"), _count);
                else
                        post = "";
        }
@@ -78,7 +38,7 @@ vector MapVote_RGB(int id)
                return '1 1 1';
 }
 
-void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, int id)
+void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float _count, int id)
 {
        float alpha;
        float desc_padding = gtv_text_size.x * 3;
@@ -111,7 +71,7 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
        entity title;
        title = spawn();
        title.message = MapVote_FormatMapItem(id, MapInfo_Type_ToText(MapInfo_Type_FromString(gtype)), 
-                                                                                 count, tsize, gtv_text_size);
+                                                                                 _count, tsize, gtv_text_size);
        title.origin = pos-offset;
        
        pos.y += gtv_text_size_small.y;
@@ -172,7 +132,7 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
        remove(title);
 }
 
-void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, int id)
+void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float _count, int id)
 {
        vector img_size = '0 0 0';
        vector rgb;
@@ -188,7 +148,7 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
 
        pos_y = pos.y + img_size.y;
 
-       label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize);
+       label = MapVote_FormatMapItem(id, map, _count, tsize, hud_fontsize);
 
        text_size = stringwidth(label, false, hud_fontsize);
 
@@ -227,7 +187,7 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
                drawfill(pos, img_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
 }
 
-void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int id)
+void MapVote_DrawAbstain(vector pos, float isize, float tsize, float _count, int id)
 {
        vector rgb;
        float text_size;
@@ -237,7 +197,7 @@ void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int
 
        pos_y = pos.y + hud_fontsize.y;
 
-       label = MapVote_FormatMapItem(id, _("Don't care"), count, tsize, hud_fontsize);
+       label = MapVote_FormatMapItem(id, _("Don't care"), _count, tsize, hud_fontsize);
 
        text_size = stringwidth(label, false, hud_fontsize);
 
@@ -508,9 +468,6 @@ void MapVote_ReadMask()
        }
 }
 
-const int NUM_SSDIRS = 4;
-string ssdirs[NUM_SSDIRS];
-int n_ssdirs;
 void MapVote_Init()
 {
        int i, j;
diff --git a/qcsrc/client/mapvoting.qh b/qcsrc/client/mapvoting.qh
new file mode 100644 (file)
index 0000000..d8ace55
--- /dev/null
@@ -0,0 +1,81 @@
+#ifndef MAPVOTING_H
+#define MAPVOTING_H
+
+int mv_num_maps;
+
+float mv_active;
+string mv_maps[MAPVOTE_COUNT];
+string mv_pics[MAPVOTE_COUNT];
+string mv_pk3[MAPVOTE_COUNT];
+float mv_preview[MAPVOTE_COUNT];
+float mv_votes[MAPVOTE_COUNT];
+float mv_avail[MAPVOTE_COUNT];
+float mv_avail_start[MAPVOTE_COUNT];
+entity mv_pk3list;
+float mv_abstain;
+float mv_ownvote;
+float mv_detail;
+float mv_timeout;
+float mv_top2_time;
+float mv_top2_alpha;
+
+vector mv_mousepos;
+int mv_selection;
+int mv_columns;
+int mv_mouse_selection;
+int mv_selection_keyboard;
+
+float gametypevote;
+string mapvote_chosenmap;
+vector gtv_text_size;
+vector gtv_text_size_small;
+
+string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, vector fontsize);
+
+string GameTypeVote_DescriptionByID(float id);
+
+vector MapVote_RGB(int id);
+
+void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, int id);
+
+void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, int id);
+
+void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int id);
+
+vector MapVote_GridVec(vector gridspec, int i, int m);
+
+float MapVote_Selection(vector topleft, vector cellsize, float rows, float columns);
+
+void MapVote_Draw();
+
+void Cmd_MapVote_MapDownload(float argc);
+
+void MapVote_CheckPK3(string pic, string pk3, int id);
+
+void MapVote_CheckPic(string pic, string pk3, int id);
+
+void MapVote_ReadMask();
+
+const int NUM_SSDIRS = 4;
+string ssdirs[NUM_SSDIRS];
+int n_ssdirs;
+void MapVote_Init();
+
+void MapVote_SendChoice(float index);
+
+int MapVote_MoveLeft(int pos);
+int MapVote_MoveRight(int pos);
+int MapVote_MoveUp(int pos);
+
+int MapVote_MoveDown(int pos);
+
+float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary);
+
+void MapVote_UpdateMask();
+
+void MapVote_UpdateVotes();
+
+void Ent_MapVote();
+
+void Net_MapVote_Picture();
+#endif
\ No newline at end of file
index a152baee0320d587fae63c59819f9d302758b736..449d89cd0e94b5dcde1d0bcf35bf6d78c83ed7f8 100644 (file)
@@ -1,24 +1,8 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/command/generic.qh"
-       #include "../common/urllib.qh"
-       #include "autocvars.qh"
-       #include "hud.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-
-entity players;
-entity teams;
-float team_count; // real teams
+#include "miscfunctions.qh"
+
+#include "../common/urllib.qh"
+
+#include "../common/command/generic.qh"
 
 void AuditLists()
 {
@@ -175,8 +159,6 @@ vector rotate(vector v, float a)
        return w;
 }
 
-int ColorTranslateMode;
-
 string ColorTranslateRGB(string s)
 {
        if(ColorTranslateMode & 1)
@@ -275,54 +257,6 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color,
        }
 }
 
-// drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
-float _drawpic_imgaspect;
-vector _drawpic_imgsize;
-vector _drawpic_sz;
-float _drawpic_oldsz;
-string _drawpic_picpath;
-#define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag)\
-       do {\
-               _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 * (_drawpic_oldsz - _drawpic_sz.x) * 0.5, 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 * (_drawpic_oldsz - _drawpic_sz.y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
-                       }\
-               }\
-       } while(0)
-
-// 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)\
-       do{\
-               _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;\
-       } while(0)
-
-// 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)\
-       do{\
-               _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;\
-       } while(0)
-
 void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
 {
        float sz;
@@ -336,19 +270,6 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc
        drawpic_aspect_skin_expanding(position, pic, theScale, rgb, theAlpha, flag, fadelerp);
        drawpic_skin(position, pic, theScale, rgb, theAlpha * fadelerp, flag);
 }
-#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) do {                                                                                                                                     \
-       float textaspect, oldsz;                                                                                                                                                                                \
-       textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y;                                                                                    \
-       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;                                                                                                                                                          \
-       }                                                                                                                                                                                                                               \
-} while(0)
 
 // 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) {
@@ -362,7 +283,6 @@ void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAl
        drawcolorcodedstring(pos, text, '1 1 0' * sz.y, theAlpha, drawflag);
 }
 
-vector drawfontscale;
 void drawstring_expanding(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
 {
        float sz;
@@ -579,7 +499,6 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
        }
 }
 
-const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
 vector getplayerorigin(int pl)
 {
        entity e;
@@ -662,13 +581,6 @@ void draw_endBoldFont()
        drawfont = FONT_USER+1;
 }
 
-
-const int MAX_ACCURACY_LEVELS = 10;
-float acc_lev[MAX_ACCURACY_LEVELS];
-vector acc_col[MAX_ACCURACY_LEVELS];
-float acc_col_loadtime;
-int acc_levels;
-string acc_color_levels;
 void Accuracy_LoadLevels()
 {
        if(autocvar_accuracy_color_levels != acc_color_levels)
diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh
new file mode 100644 (file)
index 0000000..f5830c4
--- /dev/null
@@ -0,0 +1,165 @@
+#ifndef MISCFUNCTIONS_H
+#define MISCFUNCTIONS_H
+
+entity players;
+entity teams;
+float team_count; // real teams
+
+void AuditLists();
+
+float RegisterPlayer(entity player);
+
+void RemovePlayer(entity player);
+
+void MoveToLast(entity e);
+
+float RegisterTeam(entity Team);
+
+void RemoveTeam(entity Team);
+
+entity GetTeam(int Team, bool add);
+
+vector HUD_GetFontsize(string cvarname);
+
+float PreviewExists(string name);
+
+vector rotate(vector v, float a);
+
+int ColorTranslateMode;
+
+string ColorTranslateRGB(string s);
+
+// decolorizes and team colors the player name when needed
+string playername(string thename, float teamid);
+
+float cvar_or(string cv, float v);
+
+vector project_3d_to_2d(vector vec);
+
+void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8);
+
+float expandingbox_sizefactor_from_fadelerp(float fadelerp);
+
+vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor);
+
+void drawborderlines(float thickness, vector pos, vector dim, vector color, float theAlpha, float drawflag);
+
+void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag);
+
+// drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
+float _drawpic_imgaspect;
+vector _drawpic_imgsize;
+vector _drawpic_sz;
+float _drawpic_oldsz;
+string _drawpic_picpath;
+#define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag)\
+       do {\
+               _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 * (_drawpic_oldsz - _drawpic_sz.x) * 0.5, 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 * (_drawpic_oldsz - _drawpic_sz.y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
+                       }\
+               }\
+       } while(0)
+
+// 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)\
+       do{\
+               _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;\
+       } while(0)
+
+// 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)\
+       do{\
+               _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;\
+       } while(0)
+
+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) do {                                                                                                                                     \
+       float textaspect, oldsz;                                                                                                                                                                                \
+       textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y;                                                                                    \
+       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;                                                                                                                                                          \
+       }                                                                                                                                                                                                                               \
+} while(0)
+
+// 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);
+
+// drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box
+void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag);
+
+vector drawfontscale;
+void drawstring_expanding(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
+
+// drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
+void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag, float fadelerp);
+
+void drawcolorcodedstring_expanding(vector position, string text, vector theScale, float theAlpha, float flag, float fadelerp);
+
+void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float theAlpha, float drawflag, float fadelerp);
+
+// this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
+float PolyDrawModelSurface(entity e, float i_s);
+void PolyDrawModel(entity e);
+
+void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag);
+
+const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
+vector getplayerorigin(int pl);
+
+float getplayeralpha(float pl);
+
+vector getcsqcplayercolor(float pl);
+
+float getplayerisdead(float pl);
+
+void URI_Get_Callback(int id, float status, string data);
+
+void draw_beginBoldFont();
+
+void draw_endBoldFont();
+
+
+const int MAX_ACCURACY_LEVELS = 10;
+float acc_lev[MAX_ACCURACY_LEVELS];
+vector acc_col[MAX_ACCURACY_LEVELS];
+float acc_col_loadtime;
+int acc_levels;
+string acc_color_levels;
+void Accuracy_LoadLevels();
+
+void Accuracy_LoadColors();
+
+vector Accuracy_GetColor(float accuracy);
+
+#endif
\ No newline at end of file
index a48403b8f6cbf5621df5a8c420c1c7e90a0407ec..c376085e07aaea1aa3b105e90ec7f06942014d91 100644 (file)
@@ -1,16 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-
-.float frame1time;
-.float lifetime, fadetime;
-.float teleport_time;
-.float scale1, scale2;
+#include "modeleffects.qh"
 
 void ModelEffect_Draw()
 {
diff --git a/qcsrc/client/modeleffects.qh b/qcsrc/client/modeleffects.qh
new file mode 100644 (file)
index 0000000..df500b8
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef MODELEFFECTS_H
+#define MODELEFFECTS_H
+
+.float frame1time;
+.float lifetime, fadetime;
+.float teleport_time;
+.float scale1, scale2;
+
+void ModelEffect_Draw();
+
+void Ent_ModelEffect(bool isNew);
+#endif
\ No newline at end of file
index 6dcc2e1cb986a462611363254142c3c4070e5ff8..66fdd6a0f6ad124943c66938631a6592e6099e86 100644 (file)
@@ -1,30 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../common/constants.qh"
-       #include "../common/stats.qh"
-       #include "../warpzonelib/common.qh"
-       #include "../common/util.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "autocvars.qh"
-       #include "bgmscript.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-.int dphitcontentsmask;
-
-.int cnt; // effect number
-.vector velocity; // particle velocity
-.float waterlevel; // direction jitter
-.int count; // count multiplier
-.int impulse; // density
-.string noise; // sound
-.float atten;
-.float volume;
-.float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
-.vector movedir; // trace direction
+#include "particles.qh"
 
 void Draw_PointParticles()
 {
@@ -203,7 +177,6 @@ void Ent_PointParticles()
        self.entremove = Ent_PointParticles_Remove;
 }
 
-.float glow_color; // palette index
 void Draw_Rain()
 {
     te_particlerain(self.origin + self.mins, self.origin + self.maxs, self.velocity, floor(self.count * drawframetime + random()), self.glow_color);
diff --git a/qcsrc/client/particles.qh b/qcsrc/client/particles.qh
new file mode 100644 (file)
index 0000000..ea9c5b6
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef PARTICLES_H
+#define PARTICLES_H
+
+.int dphitcontentsmask;
+
+.int cnt; // effect number
+.vector velocity; // particle velocity
+.float waterlevel; // direction jitter
+.int count; // count multiplier
+.int impulse; // density
+.string noise; // sound
+.float atten;
+.float volume;
+.float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
+.vector movedir; // trace direction
+
+void Draw_PointParticles();
+
+void Ent_PointParticles_Remove();
+
+void Ent_PointParticles();
+
+.float glow_color; // palette index
+
+void Draw_Rain();
+
+void Draw_Snow();
+
+void Ent_RainOrSnow();
+
+void Net_ReadVortexBeamParticle();
+#endif
\ No newline at end of file
index c459b7ab107989bcb2350b55a6e8e6b674dea759..0a9ac8cacb9167ddf05fc7eb762aafc8b02b26ff 100644 (file)
@@ -1,11 +1,6 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../common/util.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "player_skeleton.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "player_skeleton.qh"
+
+#include "../warpzonelib/anglestransform.qh"
 
 .float skeleton_info_modelindex;
 .float skeleton_info_skin;
index 5ea354fabe10e9b4956090be0cd1c03921054ea4..650c16c4f59ea3f0f0b538f9c88914794d9f3b49 100644 (file)
@@ -5,129 +5,71 @@ sys-pre.qh
 ../dpdefs/csprogsdefs.qh
 sys-post.qh
 
-defs.qh
-../dpdefs/keycodes.qh
-../common/constants.qh
-../common/stats.qh
-
-../warpzonelib/anglestransform.qh
-../warpzonelib/mathlib.qh
-../warpzonelib/common.qh
-../warpzonelib/client.qh
-
-../common/playerstats.qh
-../common/teams.qh
-../common/util.qh
-../common/nades.qh
-../common/buffs.qh
-../common/test.qh
-../common/counting.qh
-../common/weapons/weapons.qh // TODO
-../common/mapinfo.qh
-../common/command/markup.qh
-../common/command/rpn.qh
-../common/command/generic.qh
-../common/command/shared_defs.qh
-../common/urllib.qh
-../common/animdecide.qh
-command/cl_cmd.qh
-
-../common/monsters/monsters.qh
-
-autocvars.qh
-
-../common/notifications.qh // must be after autocvars
-../common/deathtypes.qh // must be after notifications
-
-damage.qh
-
-../csqcmodellib/interpolate.qh
-teamradar.qh
-hud.qh
-scoreboard.qh
-waypointsprites.qh
-movetypes.qh
-prandom.qh
-bgmscript.qh
-noise.qh
-tturrets.qh
-../server/tturrets/include/turrets_early.qh
-../server/movelib.qc
-main.qh
-vehicles/vehicles.qh
-../common/csqcmodel_settings.qh
-../csqcmodellib/common.qh
-../csqcmodellib/cl_model.qh
-../csqcmodellib/cl_player.qh
-weapons/projectile.qh // TODO
-player_skeleton.qh
-
-sortlist.qc
-miscfunctions.qc
-../server/t_items.qh
-../server/t_items.qc
-
-teamradar.qc
-hud_config.qc
-hud.qc
-scoreboard.qc
-mapvoting.qc
+announcer.qc
+bgmscript.qc
+casings.qc
 csqcmodel_hooks.qc
-../common/net_notice.qc
-
-rubble.qc
-hook.qc
-particles.qc
-laser.qc
-weapons/projectile.qc // TODO
-gibs.qc
 damage.qc
-casings.qc
-../csqcmodellib/cl_model.qc
-../csqcmodellib/cl_player.qc
 effects.qc
-wall.qc
+gibs.qc
+hook.qc
+hud_config.qc
+hud.qc
+laser.qc
+main.qc
+mapvoting.qc
+miscfunctions.qc
 modeleffects.qc
-tuba.qc
+movetypes.qc
+noise.qc
+particles.qc
+player_skeleton.qc
+prandom.qc
+rubble.qc
+scoreboard.qc
+shownames.qc
+sortlist.qc
 target_music.qc
-
+teamradar.qc
+tturrets.qc
+tuba.qc
 vehicles/vehicles.qc
-../server/vehicles/bumblebee.qc
-shownames.qh
-shownames.qc
-
-announcer.qc
-main.qc
 view.qc
-../csqcmodellib/interpolate.qc
+wall.qc
 waypointsprites.qc
-movetypes.qc
-prandom.qc
-bgmscript.qc
-noise.qc
 
+command/cl_cmd.qc
+
+weapons/projectile.qc // TODO
+
+../common/animdecide.qc
+../common/buffs.qc
+../common/mapinfo.qc
+../common/nades.qc
+../common/net_notice.qc
+../common/notifications.qc
+../common/playerstats.qc
 ../common/test.qc
+../common/urllib.qc
 ../common/util.qc
-../common/playerstats.qc
-../common/notifications.qc
+
+../common/command/generic.qc
 ../common/command/markup.qc
 ../common/command/rpn.qc
-../common/command/generic.qc
-../common/mapinfo.qc
-../common/weapons/weapons.qc // TODO
-../common/urllib.qc
-command/cl_cmd.qc
 
 ../common/monsters/monsters.qc
 
-../common/nades.qc
-../common/buffs.qc
+../common/weapons/weapons.qc // TODO
+
+../csqcmodellib/cl_model.qc
+../csqcmodellib/cl_player.qc
+../csqcmodellib/interpolate.qc
+
+../server/movelib.qc
+../server/t_items.qc
+../server/vehicles/bumblebee.qc
 
 ../warpzonelib/anglestransform.qc
-../warpzonelib/mathlib.qc
-../warpzonelib/common.qc
 ../warpzonelib/client.qc
-tturrets.qc
-
-player_skeleton.qc
-../common/animdecide.qc
+../warpzonelib/common.qc
+../warpzonelib/mathlib.qc
\ No newline at end of file
index 3363f8971ec6e5d6dd44dd89f2b53a1fd5d1551a..c09dd18aed4ed8bfe1cc3cc78256e869489efcc1 100644 (file)
@@ -1,11 +1,9 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
+       #include "rubble.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
 
-.float creationtime;
-
 // LordHavoc: rewrote this file, it was really bad code
 
 void RubbleLimit(string cname, float limit, void() deleteproc)
diff --git a/qcsrc/client/rubble.qh b/qcsrc/client/rubble.qh
new file mode 100644 (file)
index 0000000..b907adc
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef RUBBLE_H
+#define RUBBLE_H
+.float creationtime;
+void RubbleLimit(string cname, float limit, void() deleteproc);
+entity RubbleNew(string cname);
+#endif
\ No newline at end of file
index ebc0db3502984b37221bc0b0bc685ec339eaf0e5..e468514d9cf60c505d89c5a61a16bd281a8298b6 100644 (file)
@@ -1,22 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/stats.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/buffs.qh"
-       #include "../common/counting.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "../common/mapinfo.qh"
-       #include "command/cl_cmd.qh"
-       #include "autocvars.qh"
-       #include "hud.qh"
-       #include "scoreboard.qh"
-       #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "scoreboard.qh"
 
 float scoreboard_alpha_bg;
 float scoreboard_alpha_fg;
@@ -74,7 +56,6 @@ string TranslateScoresLabel(string l)
        }
 }
 
-void Cmd_HUD_SetFields(float argc);
 void HUD_InitScores()
 {
        int i, f;
@@ -105,7 +86,6 @@ void HUD_InitScores()
        Cmd_HUD_SetFields(0);
 }
 
-void HUD_UpdatePlayerPos(entity pl);
 float SetTeam(entity pl, float Team);
 //float lastpnum;
 void HUD_UpdatePlayerTeams()
@@ -627,7 +607,6 @@ string HUD_GetField(entity pl, int field)
        //return "error";
 }
 
-float xmin, xmax, ymin, ymax, sbwidth;
 float hud_fixscoreboardcolumnwidth_len;
 float hud_fixscoreboardcolumnwidth_iconlen;
 float hud_fixscoreboardcolumnwidth_marginlen;
index 388e254c2740f9af608629828edc7445bf7da84c..f2b155fb1fa35bfb5f4ebb1e3f2fb7277074b70a 100644 (file)
@@ -1,7 +1,14 @@
 #ifndef SCOREBOARD_H
 #define SCOREBOARD_H
 
-float HUD_WouldDrawScoreboard(void);
+float xmin, xmax, ymin, ymax, sbwidth;
+
 float scoreboard_active;
 float scoreboard_fade_alpha;
+
+void Cmd_HUD_SetFields(float argc);
+void HUD_InitScores();
+void HUD_UpdatePlayerPos(entity pl);
+void HUD_UpdateTeamPos(entity Team);
+float HUD_WouldDrawScoreboard(void);
 #endif
\ No newline at end of file
index c1b60f962ce50d0e3e8c25c94e50ceb8e1585998..7093ee07dacb206e860cb7848b13e8fffecdc71f 100644 (file)
@@ -1,11 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-//.float(entity,entity) sort_cmp;
-.entity sort_next, sort_prev;
+#include "sortlist.qh"
 
 entity Sort_Spawn()
 {
@@ -104,19 +97,6 @@ entity Sort_Get(entity sort, float i)
 }
 */
 
-/**
- * Swap two neighbours in a sortlist.
- * @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
-
 /*
 void Sort_Erase(entity ent)
 {
diff --git a/qcsrc/client/sortlist.qh b/qcsrc/client/sortlist.qh
new file mode 100644 (file)
index 0000000..1751234
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef SORTLIST_H
+#define SORTLIST_H
+
+//.float(entity,entity) sort_cmp;
+.entity sort_next, sort_prev;
+
+entity Sort_Spawn();
+
+/**
+ * Swap two neighbours in a sortlist.
+ * @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
+
+#endif
\ No newline at end of file
index 2db1f40be1386698bad27ca49b5981893269ed39..6006aeb479e7c161f0d9488798b18131dd8ebcb4 100644 (file)
@@ -1,24 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/common.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-float music_disabled;
-entity music_default;
-entity music_target;
-entity music_trigger;
-// FIXME also control bgmvolume here, to not require a target_music for the default track.
-
-.int state;
-.float lastvol;
+#include "target_music.qh"
 
 void TargetMusic_Advance()
 {
diff --git a/qcsrc/client/target_music.qh b/qcsrc/client/target_music.qh
new file mode 100644 (file)
index 0000000..5a15389
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef TARGET_MUSIC_H
+#define TARGET_MUSIC_H
+
+float music_disabled;
+entity music_default;
+entity music_target;
+entity music_trigger;
+// FIXME also control bgmvolume here, to not require a target_music for the default track.
+
+.int state;
+.float lastvol;
+
+void TargetMusic_Advance();
+
+void Net_TargetMusic();
+
+void Ent_TriggerMusic_Think();
+
+void Ent_TriggerMusic_Remove();
+
+void Ent_ReadTriggerMusic();
+#endif
\ No newline at end of file
index 02b083692153d10305188f4c532b9db17a2effa8..8f6b17e1bd069f7d95161a1b8fa6365e78a61c7e 100644 (file)
@@ -1,25 +1,9 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "../csqcmodellib/interpolate.qh"
        #include "teamradar.qh"
-       #include "hud.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
 
-float teamradar_angle; // player yaw angle
-vector teamradar_origin3d_in_texcoord; // player origin
-vector teamradar_origin2d; // 2D origin
-vector teamradar_size2d; // 2D size
-vector teamradar_extraclip_mins, teamradar_extraclip_maxs; // for non-centered radar display
-float teamradar_size; // 2D scale factor
-float v_flipped;
-
 float vlen2d(vector v)
 {
        return sqrt(v.x * v.x + v.y * v.y);
@@ -180,14 +164,6 @@ void draw_teamradar_link(vector start, vector end, int colors)
        R_EndPolygon();
 }
 
-float hud_panel_radar_scale; // window size = ...qu
-float hud_panel_radar_foreground_alpha;
-float hud_panel_radar_rotation;
-vector hud_panel_radar_size;
-float hud_panel_radar_zoommode;
-float hud_panel_radar_maximized_zoommode;
-float hud_panel_radar_maximized_rotation;
-
 void teamradar_loadcvars()
 {
        v_flipped = autocvar_v_flipped;
index 3585b732990bcac65955360125d8461d39783143..777098a9952f035d18e7400d34f78eac1247682a 100644 (file)
@@ -8,4 +8,48 @@ const int MAX_TEAMRADAR_TIMES = 32;
 .float teamradar_times[MAX_TEAMRADAR_TIMES];
 .int teamradar_time_index;
 .vector teamradar_color;
+
+float teamradar_angle; // player yaw angle
+vector teamradar_origin3d_in_texcoord; // player origin
+vector teamradar_origin2d; // 2D origin
+vector teamradar_size2d; // 2D size
+vector teamradar_extraclip_mins, teamradar_extraclip_maxs; // for non-centered radar display
+float teamradar_size; // 2D scale factor
+float v_flipped;
+
+float hud_panel_radar_scale; // window size = ...qu
+float hud_panel_radar_foreground_alpha;
+float hud_panel_radar_rotation;
+vector hud_panel_radar_size;
+float hud_panel_radar_zoommode;
+float hud_panel_radar_maximized_zoommode;
+float hud_panel_radar_maximized_rotation;
+
+
+float vlen2d(vector v);
+
+float vlen_maxnorm2d(vector v);
+
+float vlen_minnorm2d(vector v);
+
+vector teamradar_3dcoord_to_texcoord(vector in);
+
+vector teamradar_texcoord_to_2dcoord(vector in);
+
+vector yinvert(vector v);
+
+void draw_teamradar_background(float fg);
+
+void draw_teamradar_player(vector coord3d, vector pangles, vector rgb);
+
+void draw_teamradar_icon(vector coord, float icon, entity pingdata, vector rgb, float a);
+
+void draw_teamradar_link(vector start, vector end, int colors);
+
+void teamradar_loadcvars();
+
+// radar links
+
+void Ent_RadarLink();
+
 #endif
\ No newline at end of file
index 707c7920904c47a7fb6346d33d17953f72267659..9dbecd3844b9cc53c95632261d9d5b939f7cfb05 100644 (file)
@@ -1,22 +1,7 @@
-#if defined(CSQC)
-    #include "../dpdefs/csprogsdefs.qh"
-    #include "defs.qh"
-    #include "../common/constants.qh"
-    #include "../warpzonelib/mathlib.qh"
-    #include "../common/teams.qh"
-    #include "../common/buffs.qh"
-    #include "autocvars.qh"
-    #include "teamradar.qh"
-    #include "movetypes.qh"
-    #include "tturrets.qh"
-    #include "../server/tturrets/include/turrets_early.qh"
-    #include "main.qh"
-    #include "../csqcmodellib/common.qh"
-    #include "../csqcmodellib/cl_model.qh"
-    #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "tturrets.qh"
+#include "waypointsprites.qh"
+
+#include "../server/movelib.qh"
 
 string tid2info_base;
 string tid2info_head;
index b6184dc4def131b10d58c0df1546d04da4fe86d0..767e5112dab2834a5a55269ad57e8904b1019663 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef TTURRETS_H
 #define TTURRETS_H
 
+#include "../server/tturrets/include/turrets_early.qh"
+
 void ent_turret();
 void turrets_precache();
 .entity tur_head;
index 33378a041ea4e9d5594a7736286590b3000b130a..dec00043f9baf0300382d7867f0476a15ebf28c6 100644 (file)
@@ -1,27 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-const float TUBA_MIN = -18;
-const float TUBA_MAX =  27;
-const float TUBA_INSTRUMENTS = 3;
-
-#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
-.int note; // note
-.float attenuate; // if set, attenuate it
-.float cnt; // current volume
-.float count; // initial volume
-.float tuba_instrument;
-
-int Tuba_PitchStep;
+#include "tuba.qh"
 
 void tubasound(entity e, float restart)
 {
diff --git a/qcsrc/client/tuba.qh b/qcsrc/client/tuba.qh
new file mode 100644 (file)
index 0000000..e843009
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef TUBA_H
+#define TUBA_H
+
+const float TUBA_MIN = -18;
+const float TUBA_MAX =  27;
+const float TUBA_INSTRUMENTS = 3;
+
+#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
+.int note; // note
+.float attenuate; // if set, attenuate it
+.float cnt; // current volume
+.float count; // initial volume
+.float tuba_instrument;
+
+int Tuba_PitchStep;
+
+void tubasound(entity e, float restart);
+
+void Ent_TubaNote_Think();
+
+void Ent_TubaNote_UpdateSound();
+
+void Ent_TubaNote_StopSound();
+
+void Ent_TubaNote(float bIsNew);
+
+void Tuba_Precache();
+#endif
\ No newline at end of file
index fa4875b60eb9d7cc9f7a8efdb56e02d50f2d9482..19bce0c7e015ad0ad1d3347ff93f68d2e0067764 100644 (file)
@@ -4,4 +4,6 @@
 void RaptorCBShellfragDraw();
 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
 void Vehicles_Precache();
+void Net_AuXair2(bool bIsNew);
+void Net_VehicleSetup();
 #endif
\ No newline at end of file
index 2f086eac2d2971eeff77e14e3c2e7cc73ca16503..1ae8fa85a311dccebaecdce7af6fd1216521d0b3 100644 (file)
@@ -1,20 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "bgmscript.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-.float lip;
-.float bgmscriptangular;
-.int lodmodelindex0, lodmodelindex1, lodmodelindex2;
-.float loddistance1, loddistance2;
-.vector saved;
+#include "wall.qh"
 
 void Ent_Wall_Draw()
 {
diff --git a/qcsrc/client/wall.qh b/qcsrc/client/wall.qh
new file mode 100644 (file)
index 0000000..4a3955e
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef WALL_H
+#define WALL_H
+
+.float lip;
+.float bgmscriptangular;
+.int lodmodelindex0, lodmodelindex1, lodmodelindex2;
+.float loddistance1, loddistance2;
+.vector saved;
+
+void Ent_Wall_Draw();
+
+void Ent_Wall_Remove();
+
+void Ent_Wall();
+#endif
\ No newline at end of file
index ac1b40a67b1c56e5625e830b6963baf818a6973d..2b4ffd68471b21e49aafa4106e71905550d8f34d 100644 (file)
@@ -1,71 +1,4 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/buffs.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "autocvars.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "teamradar.qh"
-       #include "waypointsprites.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-       #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-float waypointsprite_initialized;
-float waypointsprite_fadedistance;
-float waypointsprite_normdistance;
-float waypointsprite_minscale;
-float waypointsprite_minalpha;
-float waypointsprite_distancealphaexponent;
-float waypointsprite_timealphaexponent;
-float waypointsprite_scale;
-float waypointsprite_fontsize;
-float waypointsprite_edgefadealpha;
-float waypointsprite_edgefadescale;
-float waypointsprite_edgefadedistance;
-float waypointsprite_edgeoffset_bottom;
-float waypointsprite_edgeoffset_left;
-float waypointsprite_edgeoffset_right;
-float waypointsprite_edgeoffset_top;
-float waypointsprite_crosshairfadealpha;
-float waypointsprite_crosshairfadescale;
-float waypointsprite_crosshairfadedistance;
-float waypointsprite_distancefadealpha;
-float waypointsprite_distancefadescale;
-float waypointsprite_distancefadedistance;
-float waypointsprite_alpha;
-
-.float helpme;
-.float rule;
-.string netname; // primary picture
-.string netname2; // secondary picture
-.string netname3; // tertiary picture
-.float team; // team that gets netname2
-.float lifetime;
-.float fadetime;
-.float maxdistance;
-.int hideflags;
-.float spawntime;
-.float health;
-.float build_started;
-.float build_starthealth;
-.float build_finished;
-
-const float SPRITE_HEALTHBAR_WIDTH = 144;
-const float SPRITE_HEALTHBAR_HEIGHT = 9;
-const float SPRITE_HEALTHBAR_MARGIN = 6;
-const float SPRITE_HEALTHBAR_BORDER = 2;
-const float SPRITE_HEALTHBAR_BORDERALPHA = 1;
-const float SPRITE_HEALTHBAR_HEALTHALPHA = 0.5;
-const float SPRITE_ARROW_SCALE = 1.0;
-const float SPRITE_HELPME_BLINK = 2;
+#include "waypointsprites.qh"
 
 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
 {
@@ -368,7 +301,6 @@ vector fixrgbexcess(vector rgb)
        return rgb;
 }
 
-float waypointsprite_count, waypointsprite_newcount;
 void Draw_WaypointSprite()
 {
        string spriteimage;
index 9a066a4eeab91d096d755f4a2362c817ed2dd018..aff39639eee9b9062a141a9b2235e0ad287bfebd 100644 (file)
@@ -1,7 +1,86 @@
 #ifndef WAYPOINTSPRITES_H
 #define WAYPOINTSPRITES_H
 
+
+float waypointsprite_initialized;
+float waypointsprite_fadedistance;
+float waypointsprite_normdistance;
+float waypointsprite_minscale;
+float waypointsprite_minalpha;
+float waypointsprite_distancealphaexponent;
+float waypointsprite_timealphaexponent;
+float waypointsprite_scale;
+float waypointsprite_fontsize;
+float waypointsprite_edgefadealpha;
+float waypointsprite_edgefadescale;
+float waypointsprite_edgefadedistance;
+float waypointsprite_edgeoffset_bottom;
+float waypointsprite_edgeoffset_left;
+float waypointsprite_edgeoffset_right;
+float waypointsprite_edgeoffset_top;
+float waypointsprite_crosshairfadealpha;
+float waypointsprite_crosshairfadescale;
+float waypointsprite_crosshairfadedistance;
+float waypointsprite_distancefadealpha;
+float waypointsprite_distancefadescale;
+float waypointsprite_distancefadedistance;
+float waypointsprite_alpha;
+
+.float helpme;
+.float rule;
+.string netname; // primary picture
+.string netname2; // secondary picture
+.string netname3; // tertiary picture
+.float team; // team that gets netname2
+.float lifetime;
+.float fadetime;
+.float maxdistance;
+.int hideflags;
+.float spawntime;
+.float health;
+.float build_started;
+.float build_starthealth;
+.float build_finished;
+
+const float SPRITE_HEALTHBAR_WIDTH = 144;
+const float SPRITE_HEALTHBAR_HEIGHT = 9;
+const float SPRITE_HEALTHBAR_MARGIN = 6;
+const float SPRITE_HEALTHBAR_BORDER = 2;
+const float SPRITE_HEALTHBAR_BORDERALPHA = 1;
+const float SPRITE_HEALTHBAR_HEALTHALPHA = 0.5;
+const float SPRITE_ARROW_SCALE = 1.0;
+const float SPRITE_HELPME_BLINK = 2;
+
+float waypointsprite_count, waypointsprite_newcount;
+
+void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f);
+
+void drawquad(vector o, vector ri, vector up, string pic, vector rgb, float a, float f);
+
+void drawhealthbar(vector org, float rot, float h, vector sz, vector hotspot, float width, float height, float margin, float border, float align, vector rgb, float a, vector hrgb, float ha, float f);
+
+// returns location of sprite text
+vector drawspritearrow(vector o, float ang, vector rgb, float a, float t);
+
+// returns location of sprite healthbar
+vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, vector fontsize, string s);
+
+float spritelookupblinkvalue(string s);
+vector spritelookupcolor(string s, vector def);
+string spritelookuptext(string s);
+
+vector fixrgbexcess_move(vector rgb, vector src, vector dst);
+vector fixrgbexcess(vector rgb);
+
+void Draw_WaypointSprite();
+
 // they are drawn using a .draw function
-void Ent_WaypointSprite();
+
 void Ent_RemoveWaypointSprite();
+void Ent_WaypointSprite();
+
+void WaypointSprite_Load_Frames(string ext);
+
+void WaypointSprite_Load();
+
 #endif
\ No newline at end of file
index fe7df5d79bec6fd0c90d5f0562daa252db1c128d..54095e7c4002cd00d8a420497616c48335519f06 100644 (file)
@@ -1,27 +1,4 @@
-#if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
-    #include "../defs.qh"
-    #include "../../common/constants.qh"
-    #include "../../warpzonelib/anglestransform.qh"
-    #include "../../common/util.qh"
-    #include "../../common/nades.qh"
-    #include "../../common/buffs.qh"
-    #include "../autocvars.qh"
-    #include "../../csqcmodellib/interpolate.qh"
-    #include "../movetypes.qh"
-    #include "../main.qh"
-    #include "../../csqcmodellib/cl_model.qh"
-    #include "projectile.qh"
-    #include "../../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-.vector iorigin1, iorigin2;
-.float spawntime;
-.vector trail_oldorigin;
-.float trail_oldtime;
-.float fade_time, fade_rate;
+#include "projectile.qh"
 
 void SUB_Stop()
 {
@@ -29,13 +6,6 @@ void SUB_Stop()
        self.move_movetype = MOVETYPE_NONE;
 }
 
-.float alphamod;
-.int count; // set if clientside projectile
-.int cnt; // sound index
-.float gravity;
-.int snd_looping;
-.bool silent;
-
 void Projectile_ResetTrail(vector to)
 {
        self.trail_oldorigin = to;
index a48ff1ad5077aff4433f8b64d8c088ed5280def2..c6076f2fef94e2eb52019c64b2b6008d348def24 100644 (file)
@@ -2,6 +2,34 @@
 #define PROJECTILE_H
 
 .int traileffect;
+
+.vector iorigin1, iorigin2;
+.float spawntime;
+.vector trail_oldorigin;
+.float trail_oldtime;
+.float fade_time, fade_rate;
+
+.float alphamod;
+.int count; // set if clientside projectile
+.int cnt; // sound index
+.float gravity;
+.int snd_looping;
+.bool silent;
+
+void SUB_Stop();
+
 void Projectile_ResetTrail(vector to);
+
 void Projectile_DrawTrail(vector to);
+
+void Projectile_Draw();
+
+void loopsound(entity e, int ch, string samp, float vol, float attn);
+
+void Ent_RemoveProjectile();
+
+void Ent_Projectile();
+
+void Projectile_Precache();
+
 #endif
\ No newline at end of file
index d1faa250ea409dfbcb4b90b128773e384db6284b..8858ab74f88eff306b90c56368bac1203e6204b6 100644 (file)
@@ -1,11 +1,22 @@
 #ifndef GENERIC_H
 #define GENERIC_H
 
+#include "markup.qh"
+#include "rpn.qh"
+
 // =========================================================
 //  Declarations for common command code, written by Samual
 //  Last updated: December 28th, 2011
 // =========================================================
 
+void GenericCommand_macro_help();
+
+float GenericCommand_macro_command(float argc, string command);
+
+float GenericCommand_macro_usage(float argc);
+
+void GenericCommand_macro_write_aliases(float fh);
+
 // Used by other game command systems for common commands,
 // and it returns true if handled, false if not.
 // Note: It tokenizes its input, so be careful!
index 1b61089e893b2cab16a066b794dbdcce8a015f15..8030f9e0076d9a7f128cabdb2c672d4a02f5152b 100644 (file)
@@ -1,13 +1,4 @@
-#if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
-       #include "../util.qh"
-       #include "markup.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../../dpdefs/dpextensions.qh"
-    #include "../util.qh"
-    #include "markup.qh"
-#endif
+#include "markup.qh"
 
 // =========================================================
 //  Markup chat characters command code, reworked by Samual
index 918d3d3cc967ebba6b1c0a14877dcf30cf0133a0..5f85499a611cbaa9c2cf59c7c43a0026eaf2a72d 100644 (file)
@@ -10,4 +10,6 @@ const int NUM_MARKUPS = 41;
 bool markup_init;
 string markup_from[NUM_MARKUPS];
 string markup_to[NUM_MARKUPS];
+
+string GenericCommand_markup(string s2);
 #endif
\ No newline at end of file
index 1a67b37bb28e78dc774124cffbe1f241c3e327db..bb920d697e91ce9e2dfc10b1bc4f4fd2e1a2c4a5 100644 (file)
@@ -1,20 +1,4 @@
-#if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
-       #include "../../warpzonelib/mathlib.qh"
-       #include "../util.qh"
-       #include "rpn.qh"
-       #include "generic.qh"
-       #include "shared_defs.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-    #include "../../dpdefs/dpextensions.qh"
-    #include "../../warpzonelib/mathlib.qh"
-    #include "../util.qh"
-    #include "rpn.qh"
-    #include "generic.qh"
-    #include "shared_defs.qh"
-#endif
+#include "rpn.qh"
 
 // ========================================
 //  RPN command code, written by divVerent
index e811a78bb3c78fe3f4dc3426e793e6ef5623555b..073223f89404afb664481eb65b793bd34ada4f26 100644 (file)
@@ -11,4 +11,7 @@ int rpn_db;
 int rpn_error;
 int rpn_sp;
 string rpn_stack[MAX_RPN_STACK];
+
+void GenericCommand_rpn(float request, float argc, string command);
+
 #endif
\ No newline at end of file
index ddc7b1477e23eaeb11dd06f7bf354455708415e2..0e6336af60f884d7c7f61a891f45db5e511619d4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef DEATHTYPES_H
 #define DEATHTYPES_H
 
+#include "notifications.qh"
+
 // ================================
 //  Deathtypes, reworked by Samual
 // ================================
index 946d16673a762febfd8cc242955f871115b80e1e..bc520e59d57005b7547d8ddbeba0a3cd6a5b9584 100644 (file)
@@ -1,15 +1,4 @@
-#if defined(CSQC)
-    #include "../dpdefs/csprogsdefs.qh"
-    #include "../client/defs.qh"
-    #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-    #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
-    #include "constants.qh"
-    #include "net_notice.qh"
-    #include "../server/defs.qh"
-#endif
+#include "net_notice.qh"
 
 #ifdef SVQC
 void sv_notice_join_think()
index 958b89adb98e446ccaa004d3c1226035665cbe29..41820bf0c4783b5ea0c69294a3800aaed7666827 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef NET_NOTICE_H
 #define NET_NOTICE_H
 
-#ifdef CSQC
-void cl_notice_read();
-void sv_notice_to(entity _to, string _notice, float _howlong, float _modal);
-#endif
-
 #ifdef SVQC
 string autocvar_sv_join_notices;
 float  autocvar_sv_join_notices_time;
@@ -14,4 +9,9 @@ void sv_notice_to(entity _to, string _notice, float _howlong, float _modal);
 void sv_notice_toall(string _notice, float _howlong, float _modal);
 void sv_notice_join();
 #endif
+
+#ifdef CSQC
+void cl_notice_read();
+#endif
+
 #endif
\ No newline at end of file
index 76b1d33f3897b7d1e747a2f0fae4354faa62c9e3..24e20aa75296d7f77a735e292f99de272c7c285d 100644 (file)
@@ -1,14 +1,4 @@
 #if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../client/defs.qh"
-       #include "teams.qh"
-       #include "util.qh"
-       #include "buffs.qh"
-       #include "counting.qh"
-       #include "weapons/weapons.qh"
-       #include "../client/autocvars.qh"
-       #include "notifications.qh"
-       #include "../client/main.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
        #include "../dpdefs/progsdefs.qh"
index 4bd519227278e28532617cdc7a804919647ede34..60080b187304df2a1e08c1c91ee8800870e5a00f 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef NOTIFICATIONS_H
 #define NOTIFICATIONS_H
 
+#include "constants.qh"
+#include "teams.qh"
+
 // ================================================
 //  Unified notification system, written by Samual
 //  Last updated: March, 2013
index 0204cd17e9c8dd9fd64d0735d6f9b070b2a70e1c..68547e1b321f5b77d6d234fe41dbad009ec8ded3 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef CL_MODEL_H
 #define CL_MODEL_H
 
+#include "common.qh"
+
 void CSQCModel_Read(float isnew);
 
 #define CSQCMODEL_IF(cond)
index 8b92221e78ec2a017d8c636652b0b20edaf30031..ac460bbabe31b52ddaaf865b44c2463a2964ca8a 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef CSQCMODELLIB_COMMON_H
 #define CSQCMODELLIB_COMMON_H
 
+#include "../common/csqcmodel_settings.qh"
+
 noref string csqcmodel_license = "\
 Copyright (c) 2011 Rudolf Polzer\
 \
index f5e34f287de25d36eeb37397794dd1f5f566dab8..29137c3d32c96beb9caf3e848d222e34df2356af 100644 (file)
@@ -1,11 +1,4 @@
-#if defined(CSQC)
-    #include "../dpdefs/csprogsdefs.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-    #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
-    #include "../csqcmodellib/sv_model.qh"
-#endif
+#include "movelib.qh"
 
 #ifdef SVQC
 .vector moveto;
@@ -62,7 +55,6 @@ vector movelib_inertmove(vector new_vel,float new_bias)
     return new_vel * new_bias + self.velocity * (1-new_bias);
 }
 
-.float  movelib_lastupdate;
 void movelib_move(vector force,float max_velocity,float drag,float theMass,float breakforce)
 {
     float deltatime;
@@ -171,18 +163,6 @@ void movelib_update(vector dir,float force)
 }
 */
 
-/*
-void movelib_move_simple(vector newdir,float velo,float blendrate)
-{
-    self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo;
-}
-*/
-#define movelib_move_simple(newdir,velo,blendrate) \
-    self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo
-
-#define movelib_move_simple_gravity(newdir,velo,blendrate) \
-    if(self.flags & FL_ONGROUND) movelib_move_simple(newdir,velo,blendrate)
-
 void movelib_beak_simple(float force)
 {
     float mspeed;
diff --git a/qcsrc/server/movelib.qh b/qcsrc/server/movelib.qh
new file mode 100644 (file)
index 0000000..3eeb3a5
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef MOVELIB_H
+#define MOVELIB_H
+
+#ifdef SVQC
+.vector moveto;
+
+/**
+    Simulate drag
+    self.velocity = movelib_dragvec(self.velocity,0.02,0.5);
+**/
+vector movelib_dragvec(float drag, float exp_);
+
+/**
+    Simulate drag
+    self.velocity *= movelib_dragflt(somespeed,0.01,0.7);
+**/
+float movelib_dragflt(float fspeed,float drag,float exp_);
+
+/**
+    Do a inertia simulation based on velocity.
+    Basicaly, this allows you to simulate loss of steering with higher speed.
+    self.velocity = movelib_inertmove_byspeed(self.velocity,newvel,1000,0.1,0.9);
+**/
+vector movelib_inertmove_byspeed(vector vel_new, float vel_max,float newmin,float oldmax);
+
+vector movelib_inertmove(vector new_vel,float new_bias);
+
+.float  movelib_lastupdate;
+void movelib_move(vector force,float max_velocity,float drag,float theMass,float breakforce);
+
+/*
+void movelib_move_simple(vector newdir,float velo,float blendrate)
+{
+    self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo;
+}
+*/
+#define movelib_move_simple(newdir,velo,blendrate) \
+    self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo
+
+#define movelib_move_simple_gravity(newdir,velo,blendrate) \
+    if(self.flags & FL_ONGROUND) movelib_move_simple(newdir,velo,blendrate)
+
+void movelib_beak_simple(float force);
+
+/**
+Pitches and rolls the entity to match the gound.
+Yed need to set v_up and v_forward (generally by calling makevectors) before calling this.
+**/
+#endif
+
+void movelib_groundalign4point(float spring_length, float spring_up, float blendrate, float _max);
+
+#endif
\ No newline at end of file
index 1fddc8720350ad1c53cc840cc7a87509c11b4ef6..68733b5b7c30998fbfc4800753149420e794bf95 100644 (file)
@@ -1,98 +1,6 @@
-#if defined(CSQC)
-       #include "../../dpdefs/csprogsdefs.qh"
-       #include "../../client/defs.qh"
-       #include "../../common/buffs.qh"
-       #include "../../client/damage.qh"
-       #include "../../client/movetypes.qh"
-       #include "../../client/main.qh"
-       #include "../../csqcmodellib/cl_model.qh"
-       #include "../../client/weapons/projectile.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
-const float BRG_SETUP = 2;
-const float BRG_START = 4;
-const float BRG_END = 8;
+#include "bumblebee.qh"
 
 #ifdef SVQC
-// Auto cvars
-float autocvar_g_vehicle_bumblebee_speed_forward;
-float autocvar_g_vehicle_bumblebee_speed_strafe;
-float autocvar_g_vehicle_bumblebee_speed_up;
-float autocvar_g_vehicle_bumblebee_speed_down;
-float autocvar_g_vehicle_bumblebee_turnspeed;
-float autocvar_g_vehicle_bumblebee_pitchspeed;
-float autocvar_g_vehicle_bumblebee_pitchlimit;
-float autocvar_g_vehicle_bumblebee_friction;
-
-float autocvar_g_vehicle_bumblebee_energy;
-float autocvar_g_vehicle_bumblebee_energy_regen;
-float autocvar_g_vehicle_bumblebee_energy_regen_pause;
-
-float autocvar_g_vehicle_bumblebee_health;
-float autocvar_g_vehicle_bumblebee_health_regen;
-float autocvar_g_vehicle_bumblebee_health_regen_pause;
-
-float autocvar_g_vehicle_bumblebee_shield;
-float autocvar_g_vehicle_bumblebee_shield_regen;
-float autocvar_g_vehicle_bumblebee_shield_regen_pause;
-
-float autocvar_g_vehicle_bumblebee_cannon_cost;
-float autocvar_g_vehicle_bumblebee_cannon_damage;
-float autocvar_g_vehicle_bumblebee_cannon_radius;
-float autocvar_g_vehicle_bumblebee_cannon_refire;
-float autocvar_g_vehicle_bumblebee_cannon_speed;
-float autocvar_g_vehicle_bumblebee_cannon_spread;
-float autocvar_g_vehicle_bumblebee_cannon_force;
-
-float autocvar_g_vehicle_bumblebee_cannon_ammo;
-float autocvar_g_vehicle_bumblebee_cannon_ammo_regen;
-float autocvar_g_vehicle_bumblebee_cannon_ammo_regen_pause;
-
-float autocvar_g_vehicle_bumblebee_cannon_lock = 0;
-
-float autocvar_g_vehicle_bumblebee_cannon_turnspeed;
-float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down;
-float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up;
-float autocvar_g_vehicle_bumblebee_cannon_turnlimit_in;
-float autocvar_g_vehicle_bumblebee_cannon_turnlimit_out;
-
-
-float autocvar_g_vehicle_bumblebee_raygun_turnspeed;
-float autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down;
-float autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up;
-float autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides;
-
-float autocvar_g_vehicle_bumblebee_raygun_range;
-float autocvar_g_vehicle_bumblebee_raygun_dps;
-float autocvar_g_vehicle_bumblebee_raygun_aps;
-float autocvar_g_vehicle_bumblebee_raygun_fps;
-
-float autocvar_g_vehicle_bumblebee_raygun;
-float autocvar_g_vehicle_bumblebee_healgun_hps;
-float autocvar_g_vehicle_bumblebee_healgun_hmax;
-float autocvar_g_vehicle_bumblebee_healgun_aps;
-float autocvar_g_vehicle_bumblebee_healgun_amax;
-float autocvar_g_vehicle_bumblebee_healgun_sps;
-float autocvar_g_vehicle_bumblebee_healgun_locktime;
-
-float autocvar_g_vehicle_bumblebee_respawntime;
-
-float autocvar_g_vehicle_bumblebee_blowup_radius;
-float autocvar_g_vehicle_bumblebee_blowup_coredamage;
-float autocvar_g_vehicle_bumblebee_blowup_edgedamage;
-float autocvar_g_vehicle_bumblebee_blowup_forceintensity;
-vector autocvar_g_vehicle_bumblebee_bouncepain;
-
-float autocvar_g_vehicle_bumblebee = 0;
-
-
-float bumble_raygun_send(entity to, float sf);
-
-const vector BUMB_MIN = '-130 -130 -130';
-const vector BUMB_MAX = '130 130 130';
-
 void bumb_fire_cannon(entity _gun, string _tagname, entity _owner)
 {
        vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
diff --git a/qcsrc/server/vehicles/bumblebee.qh b/qcsrc/server/vehicles/bumblebee.qh
new file mode 100644 (file)
index 0000000..132f1f0
--- /dev/null
@@ -0,0 +1,142 @@
+#ifndef BUMBLEBEE_H
+#define BUMBLEBEE_H
+
+const float BRG_SETUP = 2;
+const float BRG_START = 4;
+const float BRG_END = 8;
+
+#ifdef SVQC
+// Auto cvars
+float autocvar_g_vehicle_bumblebee_speed_forward;
+float autocvar_g_vehicle_bumblebee_speed_strafe;
+float autocvar_g_vehicle_bumblebee_speed_up;
+float autocvar_g_vehicle_bumblebee_speed_down;
+float autocvar_g_vehicle_bumblebee_turnspeed;
+float autocvar_g_vehicle_bumblebee_pitchspeed;
+float autocvar_g_vehicle_bumblebee_pitchlimit;
+float autocvar_g_vehicle_bumblebee_friction;
+
+float autocvar_g_vehicle_bumblebee_energy;
+float autocvar_g_vehicle_bumblebee_energy_regen;
+float autocvar_g_vehicle_bumblebee_energy_regen_pause;
+
+float autocvar_g_vehicle_bumblebee_health;
+float autocvar_g_vehicle_bumblebee_health_regen;
+float autocvar_g_vehicle_bumblebee_health_regen_pause;
+
+float autocvar_g_vehicle_bumblebee_shield;
+float autocvar_g_vehicle_bumblebee_shield_regen;
+float autocvar_g_vehicle_bumblebee_shield_regen_pause;
+
+float autocvar_g_vehicle_bumblebee_cannon_cost;
+float autocvar_g_vehicle_bumblebee_cannon_damage;
+float autocvar_g_vehicle_bumblebee_cannon_radius;
+float autocvar_g_vehicle_bumblebee_cannon_refire;
+float autocvar_g_vehicle_bumblebee_cannon_speed;
+float autocvar_g_vehicle_bumblebee_cannon_spread;
+float autocvar_g_vehicle_bumblebee_cannon_force;
+
+float autocvar_g_vehicle_bumblebee_cannon_ammo;
+float autocvar_g_vehicle_bumblebee_cannon_ammo_regen;
+float autocvar_g_vehicle_bumblebee_cannon_ammo_regen_pause;
+
+float autocvar_g_vehicle_bumblebee_cannon_lock = 0;
+
+float autocvar_g_vehicle_bumblebee_cannon_turnspeed;
+float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down;
+float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up;
+float autocvar_g_vehicle_bumblebee_cannon_turnlimit_in;
+float autocvar_g_vehicle_bumblebee_cannon_turnlimit_out;
+
+
+float autocvar_g_vehicle_bumblebee_raygun_turnspeed;
+float autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down;
+float autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up;
+float autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides;
+
+float autocvar_g_vehicle_bumblebee_raygun_range;
+float autocvar_g_vehicle_bumblebee_raygun_dps;
+float autocvar_g_vehicle_bumblebee_raygun_aps;
+float autocvar_g_vehicle_bumblebee_raygun_fps;
+
+float autocvar_g_vehicle_bumblebee_raygun;
+float autocvar_g_vehicle_bumblebee_healgun_hps;
+float autocvar_g_vehicle_bumblebee_healgun_hmax;
+float autocvar_g_vehicle_bumblebee_healgun_aps;
+float autocvar_g_vehicle_bumblebee_healgun_amax;
+float autocvar_g_vehicle_bumblebee_healgun_sps;
+float autocvar_g_vehicle_bumblebee_healgun_locktime;
+
+float autocvar_g_vehicle_bumblebee_respawntime;
+
+float autocvar_g_vehicle_bumblebee_blowup_radius;
+float autocvar_g_vehicle_bumblebee_blowup_coredamage;
+float autocvar_g_vehicle_bumblebee_blowup_edgedamage;
+float autocvar_g_vehicle_bumblebee_blowup_forceintensity;
+vector autocvar_g_vehicle_bumblebee_bouncepain;
+
+float autocvar_g_vehicle_bumblebee = 0;
+
+
+float bumble_raygun_send(entity to, float sf);
+
+const vector BUMB_MIN = '-130 -130 -130';
+const vector BUMB_MAX = '130 130 130';
+
+void bumb_fire_cannon(entity _gun, string _tagname, entity _owner);
+
+float bumb_gunner_frame();
+
+void bumb_gunner_exit(float _exitflag);
+
+float bumb_gunner_enter();
+
+float vehicles_valid_pilot();
+
+void bumb_touch();
+
+void bumb_regen();
+
+float bumb_pilot_frame();
+
+void bumb_think();
+
+void bumb_enter();
+
+void bumb_exit(float eject);
+
+void bumb_blowup();
+
+void bumb_diethink();
+
+void bumb_die();
+
+void bumb_impact();
+
+void bumb_spawn(float _f);
+
+void spawnfunc_vehicle_bumblebee();
+
+float bumble_raygun_send(entity to, float sf);
+#endif // SVQC
+
+#ifdef CSQC
+/*
+.vector raygun_l1
+.vector raygun_l2;
+.vector raygun_l3;
+*/
+
+void bumble_raygun_draw();
+
+void bumble_raygun_read(float bIsNew);
+
+void bumblebee_draw();
+
+void bumblebee_draw2d();
+
+void bumblebee_read_extra();
+
+void vehicle_bumblebee_assemble();
+#endif //CSQC
+#endif
\ No newline at end of file
index 892d326bf7cc233b6dcc7d09e9994aac7457eff1..c6ebb8b2d0e7e72dce7966c00736675698d663d4 100644 (file)
@@ -19,6 +19,7 @@ float warpzone_cameras_exist;
 .float warpzone_fadestart;
 .float warpzone_fadeend;
 void WarpZone_SetUp(entity e, vector my_org, vector my_ang, vector other_org, vector other_ang);
+void WarpZone_Camera_SetUp(entity e, vector my_org, vector my_ang);
 
 float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig);
 vector WarpZoneLib_NearestPointOnBox(vector mi, vector ma, vector org);