-#ifndef __H
-#define __H
+#ifndef CLIENT___H
+#define CLIENT___H
#include "autocvars.qh"
#include "defs.qh"
+++ /dev/null
-// MenuQC redefines world, change define it here to be safe
-#define world world
-
-// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
-const int MASK_ENGINE = 1;
-const int MASK_ENGINEVIEWMODELS = 2;
-const int MASK_NORMAL = 4;
-
-// Renderflag Constants (used for CSQC entities)
-const int RF_VIEWMODEL = 1;
-const int RF_EXTERNALMODEL = 2;
-const int RF_DEPTHHACK = 4;
-const int RF_ADDITIVE = 8;
-const int RF_USEAXIS = 16;
-
-// Viewflag Constants (use with R_SetView)
-const int VF_MIN = 1; //(vector)
-const int VF_MIN_X = 2; //(float)
-const int VF_MIN_Y = 3; //(float)
-const int VF_SIZE = 4; //(vector) (viewport size)
-const int VF_SIZE_Y = 5; //(float)
-const int VF_SIZE_X = 6; //(float)
-const int VF_VIEWPORT = 7; //(vector, vector)
-const int VF_FOV = 8; //(vector)
-const int VF_FOVX = 9; //(float)
-const int VF_FOVY = 10; //(float)
-const int VF_ORIGIN = 11; //(vector)
-const int VF_ORIGIN_X = 12; //(float)
-const int VF_ORIGIN_Y = 13; //(float)
-const int VF_ORIGIN_Z = 14; //(float)
-const int VF_ANGLES = 15; //(vector)
-const int VF_ANGLES_X = 16; //(float)
-const int VF_ANGLES_Y = 17; //(float)
-const int VF_ANGLES_Z = 18; //(float)
-const int VF_DRAWWORLD = 19; //(float)
-const int VF_DRAWENGINEHUD = 20; //(float)
-const int VF_DRAWCROSSHAIR = 21; //(float)
-const int VF_PERSPECTIVE = 200; //(float)
-
-const int VF_CL_VIEWANGLES = 33; //(vector)
-const int VF_CL_VIEWANGLES_X = 34; //(float)
-const int VF_CL_VIEWANGLES_Y = 35; //(float)
-const int VF_CL_VIEWANGLES_Z = 36; //(float)
-
-// Quake-style Point Contents
-const int CONTENT_EMPTY = -1;
-const int CONTENT_SOLID = -2;
-const int CONTENT_WATER = -3;
-const int CONTENT_SLIME = -4;
-const int CONTENT_LAVA = -5;
-const int CONTENT_SKY = -6;
-
-// Vector / Hull Constants
-const vector VEC_1 = '1 1 1';
-const vector VEC_0 = '0 0 0';
-const vector VEC_M1 = '-1 -1 -1';
-
-const vector VEC_HULL_MIN = '-16 -16 -24';
-const vector VEC_HULL_MAX = '16 16 32';
-
-// Effect Constants
-const int EF_NODRAW = 16;
-const int EF_ADDITIVE = 32;
-const int EF_BLUE = 64;
-const int EF_RED = 128;
-const int EF_FULLBRIGHT = 512;
-const int EF_FLAME = 1024;
-const int EF_STARDUST = 2048;
-const int EF_NOSHADOW = 4096;
-const int EF_NODEPTHTEST = 8192;
-
-// Quake Player Flag Constants
-const int PFL_ONGROUND = 1;
-const int PFL_CROUCH = 2;
-const int PFL_DEAD = 4;
-const int PFL_GIBBED = 8;
-
-// Quake Temporary Entity Constants
-const int TE_SPIKE = 0;
-const int TE_SUPERSPIKE = 1;
-const int TE_GUNSHOT = 2;
-const int TE_EXPLOSION = 3;
-const int TE_TAREXPLOSION = 4;
-const int TE_LIGHTNING1 = 5;
-const int TE_LIGHTNING2 = 6;
-const int TE_WIZSPIKE = 7;
-const int TE_KNIGHTSPIKE = 8;
-const int TE_LIGHTNING3 = 9;
-const int TE_LAVASPLASH = 10;
-const int TE_TELEPORT = 11;
-const int TE_EXPLOSION2 = 12;
-// Darkplaces Additions
-const int TE_EXPLOSIONRGB = 53;
-const int TE_GUNSHOTQUAD = 57;
-const int TE_EXPLOSIONQUAD = 70;
-
-// Math Constants
-const int EXTRA_LOW = -99999999;
-const int EXTRA_HIGH = 99999999;
-
-// Frik File Constants
-const int FILE_READ = 0;
-const int FILE_APPEND = 1;
-const int FILE_WRITE = 2;
-
-// Button values used by input_buttons
-const int BUTTON_ATTACK = 1;
-const int BUTTON_JUMP = 2;
-const int BUTTON_3 = 4;
-const int BUTTON_4 = 8;
-const int BUTTON_5 = 16;
-const int BUTTON_6 = 32;
-const int BUTTON7 = 64;
-const int BUTTON8 = 128;
-const int BUTTON_USE = 256;
-const int BUTTON_CHAT = 512;
-const int BUTTON_PRYDONCURSOR = 1024;
-const int BUTTON_9 = 2048;
-const int BUTTON_10 = 4096;
-const int BUTTON_11 = 8192;
-const int BUTTON_12 = 16384;
-const int BUTTON_13 = 32768;
-const int BUTTON_14 = 65536;
-const int BUTTON_15 = 131072;
-const int BUTTON_16 = 262144;
-
-const int SOLID_NOT = 0; // no interaction with other objects
-const int SOLID_TRIGGER = 1; // touch on edge, but not blocking
-const int SOLID_BBOX = 2; // touch on edge, block
-const int SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
-const int SOLID_BSP = 4; // bsp clip, touch on edge, block
-const int SOLID_CORPSE = 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
-
-const int MOVE_NORMAL = 0; // same as false
-const int MOVE_NOMONSTERS = 1; // same as true
-const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
-const int MOVE_HITMODEL = 4;
-const int MOVE_WORLDONLY = 3;
-
-const int CAMERA_FREE = 1;
-const int CAMERA_CHASE = 2;
-
-const int EF_NOMODELFLAGS = 8388608;
--- /dev/null
+#ifndef CSQC_CONSTANTS
+#define CSQC_CONSTANTS
+
+// MenuQC redefines world, change define it here to be safe
+#define world world
+
+// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
+const int MASK_ENGINE = 1;
+const int MASK_ENGINEVIEWMODELS = 2;
+const int MASK_NORMAL = 4;
+
+// Renderflag Constants (used for CSQC entities)
+const int RF_VIEWMODEL = 1;
+const int RF_EXTERNALMODEL = 2;
+const int RF_DEPTHHACK = 4;
+const int RF_ADDITIVE = 8;
+const int RF_USEAXIS = 16;
+
+// Viewflag Constants (use with R_SetView)
+const int VF_MIN = 1; //(vector)
+const int VF_MIN_X = 2; //(float)
+const int VF_MIN_Y = 3; //(float)
+const int VF_SIZE = 4; //(vector) (viewport size)
+const int VF_SIZE_Y = 5; //(float)
+const int VF_SIZE_X = 6; //(float)
+const int VF_VIEWPORT = 7; //(vector, vector)
+const int VF_FOV = 8; //(vector)
+const int VF_FOVX = 9; //(float)
+const int VF_FOVY = 10; //(float)
+const int VF_ORIGIN = 11; //(vector)
+const int VF_ORIGIN_X = 12; //(float)
+const int VF_ORIGIN_Y = 13; //(float)
+const int VF_ORIGIN_Z = 14; //(float)
+const int VF_ANGLES = 15; //(vector)
+const int VF_ANGLES_X = 16; //(float)
+const int VF_ANGLES_Y = 17; //(float)
+const int VF_ANGLES_Z = 18; //(float)
+const int VF_DRAWWORLD = 19; //(float)
+const int VF_DRAWENGINEHUD = 20; //(float)
+const int VF_DRAWCROSSHAIR = 21; //(float)
+const int VF_PERSPECTIVE = 200; //(float)
+
+const int VF_CL_VIEWANGLES = 33; //(vector)
+const int VF_CL_VIEWANGLES_X = 34; //(float)
+const int VF_CL_VIEWANGLES_Y = 35; //(float)
+const int VF_CL_VIEWANGLES_Z = 36; //(float)
+
+// Quake-style Point Contents
+const int CONTENT_EMPTY = -1;
+const int CONTENT_SOLID = -2;
+const int CONTENT_WATER = -3;
+const int CONTENT_SLIME = -4;
+const int CONTENT_LAVA = -5;
+const int CONTENT_SKY = -6;
+
+// Vector / Hull Constants
+const vector VEC_1 = '1 1 1';
+const vector VEC_0 = '0 0 0';
+const vector VEC_M1 = '-1 -1 -1';
+
+const vector VEC_HULL_MIN = '-16 -16 -24';
+const vector VEC_HULL_MAX = '16 16 32';
+
+// Effect Constants
+const int EF_NODRAW = 16;
+const int EF_ADDITIVE = 32;
+const int EF_BLUE = 64;
+const int EF_RED = 128;
+const int EF_FULLBRIGHT = 512;
+const int EF_FLAME = 1024;
+const int EF_STARDUST = 2048;
+const int EF_NOSHADOW = 4096;
+const int EF_NODEPTHTEST = 8192;
+
+// Quake Player Flag Constants
+const int PFL_ONGROUND = 1;
+const int PFL_CROUCH = 2;
+const int PFL_DEAD = 4;
+const int PFL_GIBBED = 8;
+
+// Quake Temporary Entity Constants
+const int TE_SPIKE = 0;
+const int TE_SUPERSPIKE = 1;
+const int TE_GUNSHOT = 2;
+const int TE_EXPLOSION = 3;
+const int TE_TAREXPLOSION = 4;
+const int TE_LIGHTNING1 = 5;
+const int TE_LIGHTNING2 = 6;
+const int TE_WIZSPIKE = 7;
+const int TE_KNIGHTSPIKE = 8;
+const int TE_LIGHTNING3 = 9;
+const int TE_LAVASPLASH = 10;
+const int TE_TELEPORT = 11;
+const int TE_EXPLOSION2 = 12;
+// Darkplaces Additions
+const int TE_EXPLOSIONRGB = 53;
+const int TE_GUNSHOTQUAD = 57;
+const int TE_EXPLOSIONQUAD = 70;
+
+// Math Constants
+const int EXTRA_LOW = -99999999;
+const int EXTRA_HIGH = 99999999;
+
+// Frik File Constants
+const int FILE_READ = 0;
+const int FILE_APPEND = 1;
+const int FILE_WRITE = 2;
+
+// Button values used by input_buttons
+const int BUTTON_ATTACK = 1;
+const int BUTTON_JUMP = 2;
+const int BUTTON_3 = 4;
+const int BUTTON_4 = 8;
+const int BUTTON_5 = 16;
+const int BUTTON_6 = 32;
+const int BUTTON7 = 64;
+const int BUTTON8 = 128;
+const int BUTTON_USE = 256;
+const int BUTTON_CHAT = 512;
+const int BUTTON_PRYDONCURSOR = 1024;
+const int BUTTON_9 = 2048;
+const int BUTTON_10 = 4096;
+const int BUTTON_11 = 8192;
+const int BUTTON_12 = 16384;
+const int BUTTON_13 = 32768;
+const int BUTTON_14 = 65536;
+const int BUTTON_15 = 131072;
+const int BUTTON_16 = 262144;
+
+const int SOLID_NOT = 0; // no interaction with other objects
+const int SOLID_TRIGGER = 1; // touch on edge, but not blocking
+const int SOLID_BBOX = 2; // touch on edge, block
+const int SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
+const int SOLID_BSP = 4; // bsp clip, touch on edge, block
+const int SOLID_CORPSE = 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
+
+const int MOVE_NORMAL = 0; // same as false
+const int MOVE_NOMONSTERS = 1; // same as true
+const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+const int MOVE_HITMODEL = 4;
+const int MOVE_WORLDONLY = 3;
+
+const int CAMERA_FREE = 1;
+const int CAMERA_CHASE = 2;
+
+const int EF_NOMODELFLAGS = 8388608;
+
+#endif
#ifndef BUFFS_H
#define BUFFS_H
+#include "teams.qh"
#include "util.qh"
entity Buff_Type_first;
#ifndef NOTIFICATIONS_H
#define NOTIFICATIONS_H
-#include "autocvars.qh"
#include "constants.qh"
#include "teams.qh"
#include "util.qh"
//const float M_PI = 3.14159265358979323846;
-vector VEC_HULL_MIN = '-16 -16 -24';
-vector VEC_HULL_MAX = '16 16 32';
+const vector VEC_HULL_MIN = '-16 -16 -24';
+const vector VEC_HULL_MAX = '16 16 32';
// Quake Temporary Entity Constants
const int TE_SPIKE = 0;
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//constant definitions:
-float MOVE_WORLDONLY = 3;
+const float MOVE_WORLDONLY = 3;
//description:
//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//constant definitions:
-float MOVE_WORLDONLY = 3;
+const float MOVE_WORLDONLY = 3;
//description:
//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions
--- /dev/null
+#ifndef SERVER___H
+#define SERVER___H
+
+#include "autocvars.qh"
+#include "constants.qh"
+#include "defs.qh"
+#include "miscfunctions.qh"
+
+#include "../dpdefs/progsdefs.qh"
+#include "../dpdefs/dpextensions.qh"
+
+#endif
+#include "aim.qh"
+#include "../_.qh"
+
+#include "bot.qh"
+
+#include "../mutators/mutators_include.qh"
// traces multiple trajectories to find one that will impact the target
// 'end' vector is the place it aims for,
* Functions
*/
+float lag_additem(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
void lag_update();
void bot_lagfunc(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../warpzonelib/common.qh"
- #include "../../warpzonelib/util_server.qh"
- #include "../../common/constants.qh"
- #include "../../common/teams.qh"
- #include "../../common/util.qh"
- #include "../../common/weapons/weapons.qh"
- #include "../weapons/accuracy.qh"
- #include "../t_items.qh"
- #include "../autocvars.qh"
- #include "../constants.qh"
- #include "../defs.qh"
- #include "../mutators/mutators_include.qh"
- #include "../campaign.qh"
- #include "../../common/mapinfo.qh"
- #include "../../csqcmodellib/sv_model.qh"
- #include "../antilag.qh"
-#endif
-
#include "bot.qh"
+#include "../_.qh"
+
#include "aim.qh"
#include "navigation.qh"
+#include "scripting.qh"
#include "waypoints.qh"
-#include "aim.qc"
-#include "navigation.qc"
-#include "waypoints.qc"
-#include "scripting.qc"
+#include "havocbot/havocbot.qh"
+#include "havocbot/scripting.qh"
+
+#include "../antilag.qh"
+#include "../autocvars.qh"
+#include "../campaign.qh"
+#include "../cl_client.qh"
+#include "../constants.qh"
+#include "../defs.qh"
+#include "../race.qh"
+#include "../t_items.qh"
+
+#include "../mutators/mutators_include.qh"
+
+#include "../weapons/accuracy.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/mapinfo.qh"
+#include "../../common/teams.qh"
+#include "../../common/util.qh"
+
+#include "../../common/weapons/weapons.qh"
+
+#include "../../csqcmodellib/sv_model.qh"
+
+#include "../../dpdefs/dpextensions.qh"
+#include "../../dpdefs/progsdefs.qh"
-#include "havocbot/havocbot.qc"
+#include "../../warpzonelib/common.qh"
+#include "../../warpzonelib/util_server.qh"
entity bot_spawn()
{
*/
entity bot_spawn();
+float bot_fixcount();
void bot_think();
void bot_setnameandstuff();
#include "havocbot.qh"
+#include "../../_.qh"
-#include "role_onslaught.qc"
-#include "role_keyhunt.qc"
-#include "roles.qc"
+#include "../aim.qh"
+#include "../bot.qh"
+#include "../navigation.qh"
+#include "../scripting.qh"
+#include "../waypoints.qh"
+
+#include "../../../common/constants.qh"
+
+#include "../../../warpzonelib/common.qh"
void havocbot_ai()
{
+#include "role_keyhunt.qh"
+#include "../../_.qh"
+
+#include "havocbot.qh"
+
+#include "../bot.qh"
+#include "../navigation.qh"
+
+#include "../../mutators/mutators_include.qh"
+
void() havocbot_role_kh_carrier;
void() havocbot_role_kh_defense;
void() havocbot_role_kh_offense;
void() havocbot_role_kh_freelancer;
-entity kh_worldkeylist;
-.entity kh_worldkeynext;
void havocbot_goalrating_kh(float ratingscale_team, float ratingscale_dropped, float ratingscale_enemy)
{
--- /dev/null
+#ifndef ROLE_KEYHUNT_H
+#define ROLE_KEYHUNT_H
+
+entity kh_worldkeylist;
+.entity kh_worldkeynext;
+
+void havocbot_chooserole_kh();
+#endif
+#include "../../_.qh"
+
+#include "havocbot.qh"
+
+#include "../bot.qh"
+#include "../navigation.qh"
+#include "../waypoints.qh"
+
+#include "../../mutators/mutators_include.qh"
+
+#include "../../../common/teams.qh"
+
const int HAVOCBOT_ONS_ROLE_NONE = 0;
const int HAVOCBOT_ONS_ROLE_DEFENSE = 2;
const int HAVOCBOT_ONS_ROLE_ASSISTANT = 4;
--- /dev/null
+#ifndef ROLE_ONSLAUGHT_H
+#define ROLE_ONSLAUGHT_H
+void havocbot_chooserole_ons();
+#endif
+#include "../../_.qh"
+
+#include "havocbot.qh"
+#include "role_keyhunt.qh"
+#include "role_onslaught.qh"
+
+#include "../bot.qh"
+#include "../navigation.qh"
.float max_armorvalue;
.float havocbot_role_timeout;
--- /dev/null
+#ifndef ROLES_H
+#define ROLES_H
+void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius);
+#endif
--- /dev/null
+#ifndef HAVOCBOT_SCRIPTING_H
+#define HAVOCBOT_SCRIPTING_H
+
+void bot_clearqueue(entity bot);
+#endif
+#include "navigation.qh"
+#include "../_.qh"
+
+#include "bot.qh"
+#include "waypoints.qh"
+
+#include "../t_items.qh"
+
+#include "../../common/constants.qh"
+
void bot_debug(string input)
{
switch(autocvar_bot_debug)
void botframe_updatedangerousobjects(float maxupdate);
entity navigation_findnearestwaypoint(entity ent, float walkfromwp);
+float navigation_waypoint_will_link(vector v, vector org, entity ent, float walkfromwp, float bestdist);
#endif
+#include "scripting.qh"
+#include "../_.qh"
+
+#include "bot.qh"
+
.float bot_cmdqueuebuf_allocated;
.float bot_cmdqueuebuf;
.float bot_cmdqueuebuf_start;
}
-// NOTE: New commands should be added here. Do not forget to update BOT_CMD_COUNTER
-const int BOT_CMD_NULL = 0;
-const int BOT_CMD_PAUSE = 1;
-const int BOT_CMD_CONTINUE = 2;
-const int BOT_CMD_WAIT = 3;
-const int BOT_CMD_TURN = 4;
-const int BOT_CMD_MOVETO = 5;
-const int BOT_CMD_RESETGOAL = 6; // Not implemented yet
-const int BOT_CMD_CC = 7;
-const int BOT_CMD_IF = 8;
-const int BOT_CMD_ELSE = 9;
-const int BOT_CMD_FI = 10;
-const int BOT_CMD_RESETAIM = 11;
-const int BOT_CMD_AIM = 12;
-const int BOT_CMD_PRESSKEY = 13;
-const int BOT_CMD_RELEASEKEY = 14;
-const int BOT_CMD_SELECTWEAPON = 15;
-const int BOT_CMD_IMPULSE = 16;
-const int BOT_CMD_WAIT_UNTIL = 17;
-const int BOT_CMD_MOVETOTARGET = 18;
-const int BOT_CMD_AIMTARGET = 19;
-const int BOT_CMD_BARRIER = 20;
-const int BOT_CMD_CONSOLE = 21;
-const int BOT_CMD_SOUND = 22;
-const int BOT_CMD_DEBUG_ASSERT_CANFIRE = 23;
-const int BOT_CMD_WHILE = 24; // TODO: Not implemented yet
-const int BOT_CMD_WEND = 25; // TODO: Not implemented yet
-const int BOT_CMD_CHASE = 26; // TODO: Not implemented yet
-
-const int BOT_CMD_COUNTER = 24; // Update this value if you add/remove a command
-
-// NOTE: Following commands should be implemented on the bot ai
-// If a new command should be handled by the target ai(s) please declare it here
-.float(vector) cmd_moveto;
-.float() cmd_resetgoal;
-
-//
-const int BOT_CMD_PARAMETER_NONE = 0;
-const int BOT_CMD_PARAMETER_FLOAT = 1;
-const int BOT_CMD_PARAMETER_STRING = 2;
-const int BOT_CMD_PARAMETER_VECTOR = 3;
-
-float bot_cmds_initialized;
-int bot_cmd_parm_type[BOT_CMD_COUNTER];
-string bot_cmd_string[BOT_CMD_COUNTER];
-
-// Bots command queue
-entity bot_cmd; // global current command
-.entity bot_cmd_current; // current command of this bot
-
-.float is_bot_cmd; // Tells if the entity is a bot command
-.float bot_cmd_index; // Position of the command in the queue
-.int bot_cmd_type; // If of command (see the BOT_CMD_* defines)
-.float bot_cmd_parm_float; // Field to store a float parameter
-.string bot_cmd_parm_string; // Field to store a string parameter
-.vector bot_cmd_parm_vector; // Field to store a vector parameter
-
-float bot_barriertime;
-.float bot_barrier;
-
-.float bot_cmd_execution_index; // Position in the queue of the command to be executed
-
// Initialize global commands list
// NOTE: New commands should be initialized here
void bot_commands_init()
// Commands code
.int bot_exec_status;
-#define BOT_EXEC_STATUS_IDLE 0
-#define BOT_EXEC_STATUS_PAUSED 1
-#define BOT_EXEC_STATUS_WAITING 2
-
-#define CMD_STATUS_EXECUTING 0
-#define CMD_STATUS_FINISHED 1
-#define CMD_STATUS_ERROR 2
-
void SV_ParseClientCommand(string s);
float bot_cmd_cc()
{
--- /dev/null
+#ifndef BOT_SCRIPTING_H
+#define BOT_SCRIPTING_H
+
+#define BOT_EXEC_STATUS_IDLE 0
+#define BOT_EXEC_STATUS_PAUSED 1
+#define BOT_EXEC_STATUS_WAITING 2
+
+#define CMD_STATUS_EXECUTING 0
+#define CMD_STATUS_FINISHED 1
+#define CMD_STATUS_ERROR 2
+
+
+// NOTE: New commands should be added here. Do not forget to update BOT_CMD_COUNTER
+const int BOT_CMD_NULL = 0;
+const int BOT_CMD_PAUSE = 1;
+const int BOT_CMD_CONTINUE = 2;
+const int BOT_CMD_WAIT = 3;
+const int BOT_CMD_TURN = 4;
+const int BOT_CMD_MOVETO = 5;
+const int BOT_CMD_RESETGOAL = 6; // Not implemented yet
+const int BOT_CMD_CC = 7;
+const int BOT_CMD_IF = 8;
+const int BOT_CMD_ELSE = 9;
+const int BOT_CMD_FI = 10;
+const int BOT_CMD_RESETAIM = 11;
+const int BOT_CMD_AIM = 12;
+const int BOT_CMD_PRESSKEY = 13;
+const int BOT_CMD_RELEASEKEY = 14;
+const int BOT_CMD_SELECTWEAPON = 15;
+const int BOT_CMD_IMPULSE = 16;
+const int BOT_CMD_WAIT_UNTIL = 17;
+const int BOT_CMD_MOVETOTARGET = 18;
+const int BOT_CMD_AIMTARGET = 19;
+const int BOT_CMD_BARRIER = 20;
+const int BOT_CMD_CONSOLE = 21;
+const int BOT_CMD_SOUND = 22;
+const int BOT_CMD_DEBUG_ASSERT_CANFIRE = 23;
+const int BOT_CMD_WHILE = 24; // TODO: Not implemented yet
+const int BOT_CMD_WEND = 25; // TODO: Not implemented yet
+const int BOT_CMD_CHASE = 26; // TODO: Not implemented yet
+
+const int BOT_CMD_COUNTER = 24; // Update this value if you add/remove a command
+
+// NOTE: Following commands should be implemented on the bot ai
+// If a new command should be handled by the target ai(s) please declare it here
+.float(vector) cmd_moveto;
+.float() cmd_resetgoal;
+
+//
+const int BOT_CMD_PARAMETER_NONE = 0;
+const int BOT_CMD_PARAMETER_FLOAT = 1;
+const int BOT_CMD_PARAMETER_STRING = 2;
+const int BOT_CMD_PARAMETER_VECTOR = 3;
+
+float bot_cmds_initialized;
+int bot_cmd_parm_type[BOT_CMD_COUNTER];
+string bot_cmd_string[BOT_CMD_COUNTER];
+
+// Bots command queue
+entity bot_cmd; // global current command
+.entity bot_cmd_current; // current command of this bot
+
+.float is_bot_cmd; // Tells if the entity is a bot command
+.float bot_cmd_index; // Position of the command in the queue
+.int bot_cmd_type; // If of command (see the BOT_CMD_* defines)
+.float bot_cmd_parm_float; // Field to store a float parameter
+.string bot_cmd_parm_string; // Field to store a string parameter
+.vector bot_cmd_parm_vector; // Field to store a vector parameter
+
+float bot_barriertime;
+.float bot_barrier;
+
+.float bot_cmd_execution_index; // Position in the queue of the command to be executed
+
+
+void bot_resetqueues();
+void bot_queuecommand(entity bot, string cmdstring);
+void bot_cmdhelp(string scmd);
+void bot_list_commands();
+float bot_execute_commands();
+entity find_bot_by_name(string name);
+entity find_bot_by_number(float number);
+#endif
+#include "waypoints.qh"
+#include "../_.qh"
+
+#include "bot.qh"
+#include "navigation.qh"
+
+#include "../antilag.qh"
+
+#include "../../common/constants.qh"
+
+#include "../../warpzonelib/util_server.qh"
+
// create a new spawnfunc_waypoint and automatically link it to other waypoints, and link
// them back to it as well
// (suitable for spawnfunc_waypoint editor)
#include "cheats.qh"
+#include "_.qh"
+
#include "g_damage.qh"
#include "race.qh"
#include "t_teleporters.qh"
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/anglestransform.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/monsters/monsters.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/tracing.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "../csqcmodellib/sv_model.qh"
-#endif
+#include "mutators/mutators_include.qh"
+
+#include "weapons/tracing.qh"
+
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/util.qh"
+
+#include "../common/monsters/monsters.qh"
+
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/sv_model.qh"
+
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/util_server.qh"
void CopyBody(float keepvelocity);
.float maycheat;
float gamestart_sv_cheats;
-const float CHIMPULSE_SPEEDRUN_INIT = 30;
-const float CHIMPULSE_GIVE_ALL = 99;
-const float CHIMPULSE_CLONE_MOVING = 140;
-const float CHIMPULSE_SPEEDRUN = 141;
-const float CHIMPULSE_CLONE_STANDING = 142;
-const float CHIMPULSE_TELEPORT = 143;
-const float CHIMPULSE_R00T = 148;
-const float CHRAME_DRAG = 8;
void CheatInit()
{
float CheatCommand(float argc);
float CheatFrame();
+const float CHIMPULSE_SPEEDRUN_INIT = 30;
+const float CHIMPULSE_GIVE_ALL = 99;
+const float CHIMPULSE_CLONE_MOVING = 140;
+const float CHIMPULSE_SPEEDRUN = 141;
+const float CHIMPULSE_CLONE_STANDING = 142;
+const float CHIMPULSE_TELEPORT = 143;
+const float CHIMPULSE_R00T = 148;
+
+const float CHRAME_DRAG = 8;
+
void Drag_MoveDrag(entity from, entity to); // call this from CopyBody
#endif
+#include "cl_client.qh"
+
#include "waypointsprites.qh"
+#include "anticheat.qh"
#include "cl_impulse.qh"
#include "cl_player.qh"
#include "ent_cs.qh"
#include "teamplay.qh"
#include "playerdemo.qh"
#include "secret.qh"
+#include "spawnpoints.qh"
+#include "g_damage.qh"
+#include "g_hook.qh"
+#include "t_teleporters.qh"
+#include "command/common.qh"
+#include "cheats.qh"
+#include "g_world.qh"
+#include "race.qh"
+#include "antilag.qh"
+#include "campaign.qh"
+#include "command/common.qh"
#include "bot/bot.qh"
#include "bot/navigation.qh"
+#include "vehicles/vehicles_def.qh"
+
#include "weapons/hitplot.qh"
#include "weapons/weaponsystem.qh"
#include "../warpzonelib/server.qh"
-float c1, c2, c3, c4;
void send_CSQC_teamnagger() {
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
--- /dev/null
+#ifndef CL_CLIENT_H
+#define CL_CLIENT_H
+float c1, c2, c3, c4;
+
+void play_countdown(float finished, string samp);
+
+float CalcRotRegen(float current, float regenstable, float regenfactor, float regenlinear, float regenframetime, float rotstable, float rotfactor, float rotlinear, float rotframetime, float limit);
+
+float Spectate(entity pl);
+
+void CTS_ClientKill (entity e);
+
+#endif
+#include "_.qh"
#include "round_handler.qh"
#include "bot/waypoints.qh"
#include "weapons/throwing.qh"
+#include "command/common.qh"
+#include "cheats.qh"
+#include "bot/navigation.qh"
+#include "weapons/selection.qh"
+#include "weapons/tracing.qh"
+#include "weapons/weaponsystem.qh"
+#include "vehicles/vehicles_def.qh"
+#include "waypointsprites.qh"
#include "../common/weapons/weapons.qh"
+#include "_.qh"
+#include "bot/bot.qh"
+#include "g_damage.qh"
+
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
#endif
}
-float speedaward_speed;
-string speedaward_holder;
-string speedaward_uid;
-void race_send_speedaward(float msg)
-{
- // send the best speed of the round
- WriteByte(msg, SVC_TEMPENTITY);
- WriteByte(msg, TE_CSQC_RACE);
- WriteByte(msg, RACE_NET_SPEED_AWARD);
- WriteInt24_t(msg, floor(speedaward_speed+0.5));
- WriteString(msg, speedaward_holder);
-}
-
-float speedaward_alltimebest;
-string speedaward_alltimebest_holder;
-string speedaward_alltimebest_uid;
-void race_send_speedaward_alltimebest(float msg)
-{
- // send the best speed
- WriteByte(msg, SVC_TEMPENTITY);
- WriteByte(msg, TE_CSQC_RACE);
- WriteByte(msg, RACE_NET_SPEED_AWARD_BEST);
- WriteInt24_t(msg, floor(speedaward_alltimebest+0.5));
- WriteString(msg, speedaward_alltimebest_holder);
-}
-
string GetMapname(void);
float speedaward_lastupdate;
float speedaward_lastsent;
#include "cl_player.qh"
+#include "_.qh"
+
+#include "bot/bot.qh"
+#include "cheats.qh"
+#include "g_damage.qh"
+#include "g_subs.qh"
#include "g_triggers.qh"
#include "g_violence.qh"
#include "miscfunctions.qh"
+#include "portals.qh"
+#include "teamplay.qh"
+#include "waypointsprites.qh"
+#include "weapons/throwing.qh"
+#include "command/common.qh"
+#include "../common/animdecide.qh"
+#include "../common/csqcmodel_settings.qh"
+#include "../common/deathtypes.qh"
+#include "../common/playerstats.qh"
+#include "../csqcmodellib/sv_model.qh"
#include "weapons/weaponstats.qh"
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/util.qh"
- #include "../../common/command/shared_defs.qh"
- #include "../autocvars.qh"
- #include "common.qh"
- #include "banning.qh"
- #include "../ipban.qh"
-#endif
+#include "../_.qh"
+#include "../cl_player.qh"
+
+#include "banning.qh"
+#include "common.qh"
+
+#include "../ipban.qh"
+
+#include "../../common/command/shared_defs.qh"
+
+#include "../../common/util.qh"
// =====================================================
// Banning and kicking command code, written by Samual
// Last updated: December 29th, 2011
// used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
void BanCommand_macro_write_aliases(float fh);
+
+void BanCommand_macro_help();
+float BanCommand_macro_usage(float argc);
+
#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../warpzonelib/common.qh"
- #include "../../common/constants.qh"
- #include "../../common/teams.qh"
- #include "../../common/util.qh"
- #include "../../common/command/shared_defs.qh"
- #include "../../common/monsters/monsters.qh"
- #include "../../common/monsters/sv_monsters.qh"
- #include "../../common/monsters/spawn.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../../common/notifications.qh"
- #include "../../common/deathtypes.qh"
- #include "../mutators/mutators_include.qh"
- #include "../vehicles/vehicles_def.qh"
- #include "../campaign.qh"
- #include "../../common/mapinfo.qh"
- #include "common.qh"
- #include "vote.qh"
- #include "cmd.qh"
- #include "../cheats.qh"
- #include "../scores.qh"
- #include "../ipban.qh"
-#endif
+#include "cmd.qh"
+#include "../_.qh"
+
+#include "common.qh"
+#include "vote.qh"
+
+#include "../campaign.qh"
+#include "../cheats.qh"
+#include "../cl_player.qh"
+#include "../g_triggers.qh"
+#include "../ipban.qh"
+#include "../mapvoting.qh"
+#include "../scores.qh"
+#include "../teamplay.qh"
+
+#include "../mutators/mutators_include.qh"
+
+#include "../vehicles/vehicles_def.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/deathtypes.qh"
+#include "../../common/mapinfo.qh"
+#include "../../common/notifications.qh"
+#include "../../common/teams.qh"
+#include "../../common/util.qh"
+
+#include "../../common/monsters/monsters.qh"
+#include "../../common/monsters/spawn.qh"
+#include "../../common/monsters/sv_monsters.qh"
+
+#include "../../common/command/shared_defs.qh"
+
+#include "../../dpdefs/dpextensions.qh"
+#include "../../dpdefs/progsdefs.qh"
+
+#include "../../warpzonelib/common.qh"
+
+void ClientKill_TeamChange (float targetteam); // 0 = don't change, -1 = auto, -2 = spec
// =========================================================
// Server side networked commands code, reworked by Samual
#include "common.qh"
+#include "../_.qh"
+#include "../scores.qh"
+
+#include "../../common/notifications.qh"
#include "../../common/counting.qh"
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/counting.qh"
- #include "../../common/monsters/monsters.qh"
- #include "../defs.qh"
- #include "../../common/mapinfo.qh"
- #include "getreplies.qh"
- #include "../race.qh"
-#endif
+#include "getreplies.qh"
+#include "../_.qh"
+
+#include "../race.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/counting.qh"
+#include "../../common/mapinfo.qh"
+#include "../../common/util.qh"
+
+#include "../../common/monsters/monsters.qh"
// =========================================================
// Reply messages for common commands, re-worked by Samual
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/util.qh"
- #include "../defs.qh"
- #include "radarmap.qh"
- #include "../../csqcmodellib/sv_model.qh"
-#endif
+#include "radarmap.qh"
+#include "../_.qh"
+
+#include "../g_subs.qh"
+#include "../g_world.qh"
+
+#include "../../common/util.qh"
+
+#include "../../csqcmodellib/sv_model.qh"
// ===============================================
// Generates radar map images for use in the HUD
string doublehex = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFFFF";
// FF is contained twice, to map 256 to FF too
// removes the need to bound()
+
+float RadarMap_Make(float argc);
+
+
#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../warpzonelib/mathlib.qh"
- #include "../../common/constants.qh"
- #include "../../common/teams.qh"
- #include "../../common/util.qh"
- #include "../../common/command/shared_defs.qh"
- #include "../../common/monsters/sv_monsters.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../../common/notifications.qh"
- #include "../mutators/mutators_include.qh"
- #include "../../common/mapinfo.qh"
- #include "common.qh"
- #include "cmd.qh"
- #include "sv_cmd.qh"
- #include "../anticheat.qh"
- #include "../playerdemo.qh"
-#endif
+#include "sv_cmd.qh"
+#include "../_.qh"
+
+#include "banning.qh"
+#include "cmd.qh"
+#include "common.qh"
+#include "getreplies.qh"
+#include "radarmap.qh"
+
+#include "../anticheat.qh"
+#include "../campaign.qh"
+#include "../cl_client.qh"
+#include "../cl_player.qh"
+#include "../g_world.qh"
+#include "../ipban.qh"
+#include "../playerdemo.qh"
+#include "../teamplay.qh"
+
+#include "../bot/bot.qh"
+#include "../bot/navigation.qh"
+#include "../bot/scripting.qh"
+
+#include "../mutators/mutators_include.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/mapinfo.qh"
+#include "../../common/notifications.qh"
+#include "../../common/teams.qh"
+#include "../../common/util.qh"
+
+#include "../../common/command/shared_defs.qh"
+
+#include "../../common/monsters/sv_monsters.qh"
+
+#include "../../warpzonelib/mathlib.qh"
+
+void PutObserverInServer (void);
// =====================================================
// Server side game commands code, reworked by Samual
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/command/shared_defs.qh"
- #include "../autocvars.qh"
- #include "../constants.qh"
- #include "../defs.qh"
- #include "../../common/notifications.qh"
- #include "../mutators/mutators_include.qh"
- #include "../../common/mapinfo.qh"
- #include "common.qh"
- #include "vote.qh"
- #include "../../common/playerstats.qh"
- #include "../scores.qh"
- #include "../race.qh"
- #include "../round_handler.qh"
-#endif
+#include "vote.qh"
+#include "../_.qh"
+
+#include "common.qh"
+
+#include "../g_damage.qh"
+#include "../g_world.qh"
+#include "../race.qh"
+#include "../round_handler.qh"
+#include "../scores.qh"
+
+#include "../mutators/mutators_include.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/mapinfo.qh"
+#include "../../common/notifications.qh"
+#include "../../common/playerstats.qh"
+#include "../../common/util.qh"
+
+#include "../../common/command/shared_defs.qh"
// =============================================
// Server side voting code, reworked by Samual
.float ready; // flag for if a player is ready
void reset_map(float dorespawn);
void ReadyCount();
+void ReadyRestart_force();
#endif
--- /dev/null
+#ifndef CSQCEFFECTS_H
+#define CSQCEFFECTS_H
+void te_csqc_lightningarc(vector from,vector to);
+#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/constants.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "mutators/mutators_include.qh"
-#endif
+#include "_.qh"
+
+#include "defs.qh"
+#include "mutators/mutators_include.qh"
/**
* The point of these entities is to avoid the problems
+#include "_.qh"
+
+#include "g_subs.qh"
+#include "waypointsprites.qh"
+#include "g_damage.qh"
+#include "bot/bot.qh"
+#include "../common/csqcmodel_settings.qh"
+#include "../csqcmodellib/sv_model.qh"
#include "weapons/common.qh"
.entity sprite;
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "constants.qh"
- #include "defs.qh"
-#endif
+#include "_.qh"
+
+#include "../common/util.qh"
float Casing_SendEntity(entity to, int sf)
{
#include "g_damage.qh"
-
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../warpzonelib/common.qh"
- #include "../common/constants.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/accuracy.qh"
- #include "weapons/csqcprojectile.qh"
- #include "weapons/selection.qh"
- #include "t_items.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "tturrets/include/turrets_early.qh"
- #include "vehicles/vehicles_def.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "../common/playerstats.qh"
- #include "g_hook.qh"
- #include "scores.qh"
- #include "spawnpoints.qh"
-#endif
+#include "_.qh"
+
+#include "g_hook.qh"
+#include "mutators/mutators_include.qh"
+#include "scores.qh"
+#include "waypointsprites.qh"
+#include "spawnpoints.qh"
+#include "tturrets/include/turrets_early.qh"
+#include "t_items.qh"
+#include "vehicles/vehicles_def.qh"
+#include "weapons/accuracy.qh"
+#include "weapons/csqcprojectile.qh"
+#include "weapons/selection.qh"
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/notifications.qh"
+#include "../common/playerstats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/sv_model.qh"
+#include "../warpzonelib/common.qh"
float Damage_DamageInfo_SendEntity(entity to, int sf)
{
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "vehicles/vehicles_def.qh"
- #include "command/common.qh"
- #include "g_hook.qh"
- #include "round_handler.qh"
-#endif
+#include "g_hook.qh"
+#include "_.qh"
+
+#include "weapons/common.qh"
+#include "weapons/weaponsystem.qh"
+#include "weapons/selection.qh"
+#include "weapons/tracing.qh"
+#include "cl_player.qh"
+#include "t_teleporters.qh"
+#include "command/common.qh"
+#include "round_handler.qh"
+#include "vehicles/vehicles_def.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/server.qh"
/*============================================
+#include "_.qh"
+
+void train_next();
+
const float LOOP = 1;
const float DNOSHADOW = 2;
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/constants.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../csqcmodellib/sv_model.qh"
-#endif
+#include "_.qh"
+
+#include "g_subs.qh"
+#include "g_triggers.qh"
+
+#include "../common/constants.qh"
+#include "../csqcmodellib/sv_model.qh"
.float modelscale;
#include "g_subs.qh"
+#include "_.qh"
+
+#include "antilag.qh"
+#include "command/common.qh"
+#include "../warpzonelib/common.qh"
void SUB_NullThink(void) { }
#include "g_triggers.qh"
+#include "_.qh"
+
+#include "weapons/csqcprojectile.qh"
+#include "../common/deathtypes.qh"
+#include "../warpzonelib/util_server.qh"
+#include "g_subs.qh"
#include "t_jumppads.qh"
void SUB_DontUseTargets()
#include "g_violence.qh"
+#include "_.qh"
float Violence_GibSplash_SendEntity(entity to, int sf)
{
#include "g_world.qh"
-
+#include "_.qh"
+
+#include "anticheat.qh"
+#include "antilag.qh"
+#include "bot/bot.qh"
+#include "campaign.qh"
+#include "cheats.qh"
+#include "cl_client.qh"
+#include "command/common.qh"
+#include "command/getreplies.qh"
+#include "command/sv_cmd.qh"
+#include "command/vote.qh"
+#include "g_hook.qh"
+#include "ipban.qh"
+#include "mapvoting.qh"
+#include "mutators/mutators_include.qh"
+#include "race.qh"
+#include "scores.qh"
+#include "secret.qh"
+#include "teamplay.qh"
+#include "waypointsprites.qh"
+#include "weapons/weaponstats.qh"
#include "../common/buffs.qh"
-
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../common/constants.qh"
- #include "../common/stats.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/monsters/sv_monsters.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/weaponstats.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "mutators/mutators_include.qh"
- #include "campaign.qh"
- #include "../common/mapinfo.qh"
- #include "command/common.qh"
- #include "command/vote.qh"
- #include "command/getreplies.qh"
- #include "command/sv_cmd.qh"
- #include "anticheat.qh"
- #include "cheats.qh"
- #include "../common/playerstats.qh"
- #include "g_hook.qh"
- #include "scores.qh"
- #include "mapvoting.qh"
- #include "ipban.qh"
- #include "race.qh"
- #include "antilag.qh"
- #include "secret.qh"
-#endif
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/monsters/monsters.qh"
+#include "../common/monsters/sv_monsters.qh"
+#include "../common/notifications.qh"
+#include "../common/playerstats.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
const float LATENCY_THINKRATE = 10;
.float latency_sum;
float world_initialized;
string GetGametype();
-void GotoNextMap(float reinit);
void ShuffleMaplist();
-float(float reinit) DoNextMapOverride;
void SetDefaultAlpha()
{
Exit deathmatch games upon conditions
============
*/
-void ReadyRestart();
void CheckRules_World()
{
float timelimit;
void CheckRules_Player();
void IntermissionThink();
+void GotoNextMap(float reinit);
+void ReadyRestart();
+
+void DumpStats(float final);
+float Map_IsRecent(string m);
+string GetNextMap();
+void ShuffleMaplist();
+void Map_Goto_SetStr(string nextmapname);
+void Map_Goto(float reinit);
+float DoNextMapOverride(float reinit);
+void CheckRules_World();
#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "command/banning.qh"
- #include "ipban.qh"
-#endif
+#include "ipban.qh"
+#include "_.qh"
+
+#include "autocvars.qh"
+#include "command/banning.qh"
+#include "defs.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+#include "../dpdefs/dpextensions.qh"
+#include "../dpdefs/progsdefs.qh"
/*
* Protocol of online ban list:
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/util.qh"
- #include "../common/monsters/monsters.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "item_key.qh"
-#endif
+#include "item_key.qh"
+#include "_.qh"
+
+#include "../common/monsters/monsters.qh"
+#include "../common/notifications.qh"
+#include "../common/util.qh"
+#include "../warpzonelib/util_server.qh"
/*
TODO:
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/mapinfo.qh"
- #include "command/getreplies.qh"
- #include "command/cmd.qh"
- #include "../common/playerstats.qh"
- #include "mapvoting.qh"
-#endif
+#include "mapvoting.qh"
+#include "_.qh"
+
+#include "g_world.qh"
+#include "command/cmd.qh"
+#include "command/getreplies.qh"
+#include "../common/constants.qh"
+#include "../common/mapinfo.qh"
+#include "../common/playerstats.qh"
+#include "../common/util.qh"
float GameTypeVote_AvailabilityStatus(string gtname)
{
#ifndef MAPVOTING_H
#define MAPVOTING_H
+#include "../common/constants.qh"
+
// definitions for functions used outside mapvoting.qc
void MapVote_Start();
void MapVote_Spawn();
void MapVote_Think();
+void MapVote_SendPicture(float id);
float GameTypeVote_Start();
float GameTypeVote_Finished(float pos);
string GameTypeVote_MapInfo_FixName(string m);
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "miscfunctions.qh"
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/playerstats.qh"
- #include "../warpzonelib/anglestransform.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/urllib.qh"
- #include "../common/command/generic.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/accuracy.qh"
- #include "weapons/csqcprojectile.qh"
- #include "weapons/selection.qh"
- #include "t_items.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "tturrets/include/turrets_early.qh"
- #include "../common/mapinfo.qh"
- #include "command/common.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "ipban.qh"
-#endif
+#include "miscfunctions.qh"
+#include "_.qh"
+
+#include "antilag.qh"
+#include "command/common.qh"
+#include "constants.qh"
+#include "ipban.qh"
+#include "mutators/mutators_include.qh"
+#include "tturrets/include/turrets_early.qh"
+#include "t_items.qh"
+#include "weapons/accuracy.qh"
+#include "weapons/csqcprojectile.qh"
+#include "weapons/selection.qh"
+#include "../common/command/generic.qh"
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/notifications.qh"
+#include "../common/playerstats.qh"
+#include "../common/teams.qh"
+#include "../common/urllib.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/sv_model.qh"
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/server.qh"
void crosshair_trace(entity pl)
{
}
-entity eliminatedPlayers;
.float(entity) isEliminated;
float EliminatedPlayers_SendEntity(entity to, float sendflags)
{
.float uncustomizeentityforclient_set;
.float nottargeted;
+entity eliminatedPlayers;
+void EliminatedPlayers_Init(float(entity) isEliminated_func);
+
+string admin_name(void);
+
+void write_recordmarker(entity pl, float tstart, float dt);
+
+void play2all(string samp);
+
+void DistributeEvenly_Init(float amount, float totalweight);
+float DistributeEvenly_Get(float weight);
+
+void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2);
+
+void shockwave_spawn(string m, vector org, float sz, float t1, float t2);
+
+vector randompos(vector m1, vector m2);
+
+void play2team(float t, string filename);
+
+void GetCvars_handleFloat(string thisname, float f, .float field, string name);
+
+float spamsound(entity e, float chan, string samp, float vol, float _atten);
+
+void GetCvars_handleString(string thisname, float f, .string field, string name);
+
+void precache_all_playermodels(string pattern);
+
+void soundat(entity e, vector o, float chan, string samp, float vol, float _atten);
+
+void defer(float fdelay, void() func);
+
+void UncustomizeEntitiesRun();
+void InitializeEntitiesRun();
+
+void stopsoundto(float _dest, entity e, float chan);
float DistributeEvenly_amount;
float DistributeEvenly_totalweight;
float LostMovetypeFollow(entity ent);
+string uid2name(string myuid);
+
float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance);
string NearestLocation(vector p);
+#include "base.qh"
+#include "../_.qh"
+
.float() cbc_func;
.entity cbc_next;
.float cbc_order;
--- /dev/null
+#ifndef GAMEMODE_H
+#define GAMEMODE_H
+
+#include "mutator_nades.qh"
+
+#include "../cl_client.qh"
+#include "../cl_player.qh"
+#include "../cl_impulse.qh"
+#include "../cheats.qh"
+#include "../g_damage.qh"
+#include "../g_subs.qh"
+#include "../t_teleporters.qh"
+#include "../round_handler.qh"
+#include "../scores.qh"
+#include "../scores_rules.qh"
+#include "../waypointsprites.qh"
+
+#include "../bot/bot.qh"
+#include "../bot/navigation.qh"
+#include "../bot/waypoints.qh"
+#include "../bot/havocbot/roles.qh"
+#include "../bot/havocbot/role_keyhunt.qh"
+
+#include "../bot/havocbot/havocbot.qh"
+
+#include "../command/vote.qh"
+
+#include "../../common/monsters/monsters.qh"
+
+#include "../command/common.qh"
+
+#include "../weapons/tracing.qh"
+#include "../weapons/weaponsystem.qh"
+
+#include "../../common/deathtypes.qh"
+#include "../../common/notifications.qh"
+#include "../../common/stats.qh"
+#include "../../common/teams.qh"
+
+#include "../../warpzonelib/mathlib.qh"
+#include "../../warpzonelib/server.qh"
+#include "../../warpzonelib/util_server.qh"
+
+.float lastground;
+float total_players;
+float redalive, bluealive, yellowalive, pinkalive;
+.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
+
+#endif
+#include "gamemode_assault.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+.entity sprite;
+
// random functions
void assault_objective_use()
{
-float total_players;
-float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
+#include "gamemode_ca.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
float ca_teams;
float allowed_to_spawn;
+#include "gamemode_ctf.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../vehicles/vehicles_def.qh"
+
+#include "../../warpzonelib/common.qh"
+#include "../../warpzonelib/mathlib.qh"
+
// ================================================================
// Official capture the flag game mode coding, reworked by Samual
// Last updated: September, 2012
const float RETURN_SPEEDRUN = 4;
const float RETURN_NEEDKILL = 5;
+void ctf_Handle_Throw(entity player, entity receiver, float droptype);
+
// flag properties
#define ctf_spawnorigin dropped_origin
float ctf_stalemate; // indicates that a stalemate is active
+#include "gamemode_cts.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../race.qh"
+
// legacy bot roles
.float race_checkpoint;
void havocbot_role_cts()
+#include "gamemode_domination.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
void dom_EventLog(string mode, float team_before, entity actor) // use an alias for easy changing and quick editing later
{
if(autocvar_sv_eventlog)
-.float freezetag_frozen_time;
-.float freezetag_frozen_timeout;
-const float ICE_MAX_ALPHA = 1;
-const float ICE_MIN_ALPHA = 0.1;
-float freezetag_teams;
+#include "gamemode_freezetag.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
const float SP_FREEZETAG_REVIVALS = 4;
void freezetag_ScoreRules(float teams)
return 1;
}
-.float reviving; // temp var
MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
{
float n;
--- /dev/null
+#ifndef GAMEMODE_FREEZETAG_H
+#define GAMEMODE_FREEZETAG_H
+.float freezetag_frozen_time;
+.float freezetag_frozen_timeout;
+const float ICE_MAX_ALPHA = 1;
+const float ICE_MIN_ALPHA = 0.1;
+float freezetag_teams;
+
+.float reviving; // temp var
+
+#endif
+#include "gamemode_invasion.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../../common/monsters/spawn.qh"
+#include "../../common/monsters/sv_monsters.qh"
+
void spawnfunc_invasion_spawnpoint()
{
if(!g_invasion) { remove(self); return; }
+#include "gamemode_keepaway.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
// ===========================================================
// Keepaway game mode coding, written by Samual and Diabolik
// Last updated: September, 2012
void() havocbot_role_ka_carrier;
void() havocbot_role_ka_collector;
+
+void ka_DropEvent(entity plyr);
+
#endif
-#define FOR_EACH_KH_KEY(v) for(v = kh_worldkeylist; v; v = v.kh_worldkeynext )
+#include "gamemode_keyhunt.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
// #define KH_PLAYER_USE_ATTACHMENT
// #define KH_PLAYER_USE_CARRIEDMODEL
#ifndef GAMEMODE_KEYHUNT_H
#define GAMEMODE_KEYHUNT_H
+#define FOR_EACH_KH_KEY(v) for(v = kh_worldkeylist; v; v = v.kh_worldkeynext )
+
// ALL OF THESE should be removed in the future, as other code should not have to care
// used by bots:
typedef void(void) kh_Think_t;
void kh_StartRound();
void kh_Controller_SetThink(float t, kh_Think_t func);
+
+void kh_Key_DropAll(entity player, float suicide);
+
#endif
+#include "gamemode_lms.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../campaign.qh"
+#include "../command/cmd.qh"
+
// main functions
float LMS_NewPlayerLives()
{
+#include "gamemode_nexball.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../t_jumppads.qh"
+
float autocvar_g_nexball_safepass_turnrate;
float autocvar_g_nexball_safepass_maxdist;
float autocvar_g_nexball_safepass_holdtime;
+#include "../_.qh"
+
+#include "gamemode.qh"
+
float autocvar_g_onslaught_spawn_at_controlpoints;
float autocvar_g_onslaught_spawn_at_generator;
float autocvar_g_onslaught_cp_proxydecap;
+#include "gamemode_race.qh"
+#include "../_.qh"
+
+#include "gamemode.qh"
+
+#include "../race.qh"
+
// legacy bot roles
.float race_checkpoint;
void havocbot_role_race()
+#include "../_.qh"
+
+#include "gamemode.qh"
+
/*QUAKED spawnfunc_tdm_team (0 .5 .8) (-16 -16 -24) (16 16 32)
Team declaration for TDM gameplay, this allows you to decide what team names and control point models are used in your map.
Note: If you use spawnfunc_tdm_team entities you must define at least 2! However, unlike domination, you don't need to make a blank one too.
--- /dev/null
+#ifndef MUTATOR_H
+#define MUTATOR_H
+
+#include "base.qh"
+#include "mutator_nades.qh"
+
+#include "../cl_client.qh"
+#include "../cl_player.qh"
+#include "../cl_impulse.qh"
+#include "../cheats.qh"
+#include "../g_damage.qh"
+#include "../g_subs.qh"
+#include "../t_teleporters.qh"
+#include "../round_handler.qh"
+#include "../scores.qh"
+#include "../scores_rules.qh"
+#include "../waypointsprites.qh"
+
+#include "../bot/bot.qh"
+#include "../bot/navigation.qh"
+#include "../bot/waypoints.qh"
+
+#include "../bot/havocbot/havocbot.qh"
+#include "../bot/havocbot/roles.qh"
+#include "../bot/havocbot/role_keyhunt.qh"
+
+#include "../command/vote.qh"
+#include "../command/common.qh"
+
+#include "../weapons/common.qh"
+#include "../weapons/tracing.qh"
+#include "../weapons/throwing.qh"
+#include "../weapons/weaponsystem.qh"
+
+#include "../../common/deathtypes.qh"
+#include "../../common/notifications.qh"
+#include "../../common/stats.qh"
+#include "../../common/teams.qh"
+
+#include "../../common/monsters/monsters.qh"
+
+#include "../../warpzonelib/anglestransform.qh"
+#include "../../warpzonelib/mathlib.qh"
+#include "../../warpzonelib/server.qh"
+#include "../../warpzonelib/util_server.qh"
+
+#endif
+#include "../_.qh"
+
+#include "mutator.qh"
+
.float bloodloss_timer;
MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink)
+#include "mutator_buffs.qh"
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "../../common/buffs.qh"
+
+.float lifetime;
+
float buffs_BuffModel_Customize()
{
entity player, myowner;
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "../campaign.qh"
+
.float campcheck_nextcheck;
.float campcheck_traveled_distance;
+#include "mutator_dodging.qh"
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "../../common/animdecide.qh"
.float cvar_cl_dodging_timeout;
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "../cl_client.qh"
+#include "../../common/buffs.qh"
+
void spawnfunc_item_minst_cells (void)
{
if (!g_instagib) { remove(self); return; }
+#include "../_.qh"
+
+#include "mutator.qh"
+
MUTATOR_HOOKFUNCTION(invincibleprojectiles_EditProjectile)
{
if(other.health)
+#include "../_.qh"
+
+#include "mutator.qh"
+
MUTATOR_HOOKFUNCTION(melee_SetStartItems)
{
start_ammo_shells = warmup_start_ammo_shells = 0;
+#include "../_.qh"
+
+#include "mutator.qh"
+
.float midair_shieldtime;
MUTATOR_HOOKFUNCTION(midair_PlayerDamage)
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "../antilag.qh"
+
.float multijump_count;
.float multijump_ready;
+#include "mutator_nades.qh"
+#include "../_.qh"
+
+#include "mutator.qh"
+
+#include "gamemode_keyhunt.qh"
+#include "gamemode_freezetag.qh"
+#include "../../common/nades.qh"
+#include "../../common/monsters/spawn.qh"
+#include "../../common/monsters/sv_monsters.qh"
+
+.float lifetime;
+
.entity nade_spawnloc;
void nade_timer_think()
+#include "../_.qh"
+
+#include "mutator.qh"
+
/*
CORE laser vortex lg rl cry gl elec hagar fireb hook
+#include "../_.qh"
+
+#include "mutator.qh"
+
float g_nix_with_blaster;
// WEAPONTODO
int nix_weapon;
+#include "mutator_overkill.qh"
+#include "../_.qh"
+
+#include "mutator.qh"
+
+void W_Blaster_Attack(float, float, float, float, float, float, float, float, float, float);
+void spawnfunc_weapon_hmg();
+void spawnfunc_weapon_rpc();
+
void ok_DecreaseCharge(entity ent, int wep)
{
if(!ent.ok_use_ammocharge) return;
+#include "../_.qh"
+
+#include "mutator.qh"
+
.vector spawn_origin, spawn_angles;
void physical_item_think()
+#include "../_.qh"
+
+#include "mutator.qh"
+
MUTATOR_HOOKFUNCTION(pinata_PlayerDies)
{
float j;
+#include "../_.qh"
+
+#include "mutator.qh"
+
// Random Gravity
//
// Mutator by Mario
+#include "../_.qh"
+
+#include "mutator.qh"
+
MUTATOR_HOOKFUNCTION(rocketflying_EditProjectile)
{
if(other.classname == "rocket" || other.classname == "mine")
+#include "../_.qh"
+
+#include "mutator.qh"
+
.entity msnt_lookat;
.float msnt_timer;
+#include "../_.qh"
+
+#include "mutator.qh"
+
#define _SSMAGIX "SUPERSPEC_OPTIONSFILE_V1"
#define _ISLOCAL ((edict_num(1) == self) ? true : false)
+#include "../_.qh"
+
+#include "mutator.qh"
+
.float touchexplode_time;
void PlayerTouchExplode(entity p1, entity p2)
+#include "../_.qh"
+
+#include "mutator.qh"
+
MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
{
if(time >= frag_target.spawnshieldtime)
+#include "../_.qh"
+
+#include "mutator.qh"
+
const float MAX_STORAGE_ATTACHMENTS = 16;
float object_count;
.float object_flood;
-//#define PATHLIB_RDFIELDS
-#ifdef PATHLIB_RDFIELDS
- #define path_next swampslug
- #define path_prev lasertarget
-#else
- .entity path_next;
- .entity path_prev;
-#endif
+#include "pathlib.qh"
+#include "_.qh"
+
+#include "g_subs.qh"
#define medium spawnshieldtime
//#define DEBUGPATHING
-
-entity openlist;
-entity closedlist;
-entity scraplist;
-
-.float pathlib_node_g;
-.float pathlib_node_h;
-.float pathlib_node_f;
-
-float pathlib_open_cnt;
-float pathlib_closed_cnt;
-float pathlib_made_cnt;
-float pathlib_merge_cnt;
-float pathlib_recycle_cnt;
-float pathlib_searched_cnt;
-
-#ifdef DEBUGPATHING
-
-#endif
-
-float pathlib_bestopen_seached;
-float pathlib_bestcash_hits;
-float pathlib_bestcash_saved;
-
-float pathlib_gridsize;
-
-float pathlib_movecost;
-float pathlib_movecost_diag;
-float pathlib_movecost_waterfactor;
-
-float pathlib_edge_check_size;
-
-float pathlib_foundgoal;
-entity goal_node;
-
-entity best_open_node;
-.float is_path_node;
-
-
#ifdef DEBUGPATHING
float edge_show(vector point,float fsize);
void mark_error(vector where,float lifetime);
return 0;
}
-#define inwater(point) (pointcontents(point) == CONTENT_WATER)
-/*
-float inwater(vector point)
-{
- if(pointcontents(point) == CONTENT_WATER)
- return 1;
- return 0;
-}
-*/
-
#define _pcheck(p) traceline(p+z_up,p-z_down,MOVE_WORLDONLY,self); if (!floor_ok(trace_endpos)) return 1
float edge_check(vector point,float fsize)
{
end.y = fsnap(end.y, pathlib_gridsize);
if(pointcontents(end) == CONTENT_EMPTY)
- return pathlib_wateroutnode( start, end);
+ return pathlib_wateroutnode( start, end, doedge);
tracebox(start, walknode_boxmin,walknode_boxmax, end, MOVE_WORLDONLY, self);
if(trace_fraction == 1)
return h;
}
-//#define PATHLIB_USE_NODESCRAP
const float PATHLIB_NODEEXPIRE = 0.05;
float pathlib_scraplist_cnt;
entity newnode()
#endif
++pathlib_made_cnt;
n = spawn();
-#ifdef PATHLIB_NODEEXPIRE
n.think = SUB_Remove;
n.nextthink = time + PATHLIB_NODEEXPIRE;
return n;
{
vector point;
vector where;
- float nodecnt;
+ float nodecnt = 0;
where = node.origin;
return world;
}
-
-
-
--- /dev/null
+#ifndef PATHLIB_H
+#define PATHLIB_H
+
+//#define PATHLIB_RDFIELDS
+#ifdef PATHLIB_RDFIELDS
+ #define path_next swampslug
+ #define path_prev lasertarget
+#else
+ .entity path_next;
+ .entity path_prev;
+#endif
+
+entity openlist;
+entity closedlist;
+entity scraplist;
+
+.float pathlib_node_g;
+.float pathlib_node_h;
+.float pathlib_node_f;
+
+float pathlib_open_cnt;
+float pathlib_closed_cnt;
+float pathlib_made_cnt;
+float pathlib_merge_cnt;
+float pathlib_recycle_cnt;
+float pathlib_searched_cnt;
+
+float pathlib_bestopen_seached;
+float pathlib_bestcash_hits;
+float pathlib_bestcash_saved;
+
+float pathlib_gridsize;
+
+float pathlib_movecost;
+float pathlib_movecost_diag;
+float pathlib_movecost_waterfactor;
+
+float pathlib_edge_check_size;
+
+float pathlib_foundgoal;
+entity goal_node;
+
+entity best_open_node;
+.float is_path_node;
+
+#define inwater(point) (pointcontents(point) == CONTENT_WATER)
+
+#endif
+#include "../pathlib.qh"
+
float pathlib_g_static(entity parent,vector to, float static_cost)
{
return parent.pathlib_node_g + static_cost;
+#include "../pathlib.qh"
#ifdef TURRET_DEBUG
void mark_error(vector where,float lifetime);
}
}
+void SUB_Remove();
+
void pathlib_showsquare(vector where,float goodsquare,float _lifetime)
{
entity s;
+#include "pathlib.qh"
+#include "utility.qh"
+
vector plib_points2[8];
vector plib_points[8];
float plib_fvals[8];
+#include "../_.qh"
+
+#include "pathlib.qh"
+#include "utility.qh"
+#include "../command/common.qh"
+
void pathlib_deletepath(entity start)
{
entity e;
--- /dev/null
+#ifndef PATHLIB_MAIN_H
+#define PATHLIB_MAIN_H
+float buildpath_nodefilter_none(vector n,vector c,vector p);
+entity path_build(entity next, vector where, entity prev, entity start);
+#endif
+#include "../_.qh"
+
+#include "pathlib.qh"
+#include "utility.qh"
+
vector pathlib_wateroutnode(vector start,vector end, float doedge)
{
vector surface;
+#include "../bot/waypoints.qh"
+
+#include "pathlib.qh"
+#include "main.qh"
+
var float pathlib_wpp_open(entity wp, entity child, float cost);
void pathlib_wpp_close(entity wp)
#include "debug.qc"
#endif
-#include "utility.qc"
-#include "movenode.qc"
-#include "costs.qc"
-#include "expandnode.qc"
-#include "main.qc"
-#include "path_waypoint.qc"
#endif
+#include "utility.qh"
+
+#include "pathlib.qh"
+
float fsnap(float val,float fsize)
{
return rint(val / fsize) * fsize;
--- /dev/null
+#ifndef PATHLIB_UTILITY
+#define PATHLIB_UTILITY
+float fsnap(float val,float fsize);
+entity pathlib_nodeatpoint(vector where);
+float tile_check_plus2(vector where);
+#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/anglestransform.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "portals.qh"
- #include "g_hook.qh"
-#endif
+#include "portals.qh"
+#include "_.qh"
+
+#include "g_hook.qh"
+#include "g_subs.qh"
+#include "mutators/mutators_include.qh"
+#include "t_teleporters.qh"
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/notifications.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/sv_model.qh"
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/util_server.qh"
#define PORTALS_ARE_NOT_SOLID
t_teleporters.qc
waypointsprites.qc
+bot/aim.qc
bot/bot.qc
+bot/navigation.qc
+bot/scripting.qc
+bot/waypoints.qc
+
+bot/havocbot/havocbot.qc
+bot/havocbot/role_keyhunt.qc
+bot/havocbot/role_onslaught.qc
+bot/havocbot/roles.qc
command/banning.qc
command/cmd.qc
mutators/mutators_include.qc
mutators/mutators.qc
+pathlib/costs.qc
+pathlib/expandnode.qc
+pathlib/main.qc
+pathlib/movenode.qc
+pathlib/path_waypoint.qc
+pathlib/utility.qc
+
weapons/accuracy.qc
weapons/common.qc
weapons/csqcprojectile.qc // TODO
#include "race.qh"
+#include "_.qh"
+
+#include "cl_client.qh"
+#include "portals.qh"
+#include "scores.qh"
+#include "spawnpoints.qh"
+#include "waypointsprites.qh"
+#include "bot/waypoints.qh"
+#include "bot/navigation.qh"
+#include "command/getreplies.qh"
+#include "../common/deathtypes.qh"
+#include "../common/notifications.qh"
+#include "../common/mapinfo.qh"
+#include "../warpzonelib/util_server.qh"
void W_Porto_Fail(float failhard);
.float race_penalty_accumulator;
.string race_penalty_reason;
.float race_checkpoint; // player: next checkpoint that has to be reached
-.float race_laptime;
.entity race_lastpenalty;
.entity sprite;
WriteInt24_t(msg, race_readTime(GetMapname(), 1));
}
+
+void race_send_speedaward(float msg)
+{
+ // send the best speed of the round
+ WriteByte(msg, SVC_TEMPENTITY);
+ WriteByte(msg, TE_CSQC_RACE);
+ WriteByte(msg, RACE_NET_SPEED_AWARD);
+ WriteInt24_t(msg, floor(speedaward_speed+0.5));
+ WriteString(msg, speedaward_holder);
+}
+
+void race_send_speedaward_alltimebest(float msg)
+{
+ // send the best speed
+ WriteByte(msg, SVC_TEMPENTITY);
+ WriteByte(msg, TE_CSQC_RACE);
+ WriteByte(msg, RACE_NET_SPEED_AWARD_BEST);
+ WriteInt24_t(msg, floor(speedaward_alltimebest+0.5));
+ WriteString(msg, speedaward_alltimebest_holder);
+}
+
void race_SendRankings(float pos, float prevpos, float del, float msg)
{
WriteByte(msg, SVC_TEMPENTITY);
.float race_place;
.float race_started;
.float race_completed;
+.float race_laptime;
float race_completing;
.float race_movetime; // for reading
float race_readTime(string map, float pos);
string race_readUID(string map, float pos);
string race_readName(string map, float pos);
+void race_ClearRecords();
+void race_SendNextCheckpoint(entity e, float spec);
+void race_PreparePlayer();
+void race_send_recordtime(float msg);
+void race_send_speedaward(float msg);
+
+float speedaward_speed;
+string speedaward_holder;
+string speedaward_uid;
+
+float speedaward_alltimebest;
+string speedaward_alltimebest_holder;
+string speedaward_alltimebest_uid;
+
+void race_send_speedaward(float msg);
+
+void race_send_speedaward_alltimebest(float msg);
+
+void race_SendRankings(float pos, float prevpos, float del, float msg);
+
+void race_RetractPlayer();
+
#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/util.qh"
- #include "defs.qh"
- #include "round_handler.qh"
-#endif
+#include "round_handler.qh"
+#include "_.qh"
+
+#include "command/vote.qh"
+#include "../common/util.qh"
void round_handler_Think()
{
#include "scores.qh"
+#include "_.qh"
+
+#include "command/common.qh"
+#include "mutators/mutators_include.qh"
+#include "../common/playerstats.qh"
+#include "../common/teams.qh"
.entity scorekeeper;
entity teamscorekeepers[16];
#ifndef SCORES_H
#define SCORES_H
+#include "../common/constants.qh"
+
entity scores_initialized; // non-world when scores labels/rules have been set
.float scores[MAX_SCORE];
.float teamscores[MAX_TEAMSCORE];
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../common/constants.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "scores.qh"
-#endif
-
-//float c1, c2, c3, c4;
+#include "scores_rules.qh"
+#include "_.qh"
+
+#include "cl_client.qh"
+#include "scores.qh"
+
void CheckAllowedTeams (entity for_whom);
// NOTE: SP_ constants may not be >= MAX_SCORE; ST_constants may not be >= MAX_TEAMSCORE
--- /dev/null
+#ifndef SCORES_RULES_H
+#define SCORES_RULES_H
+
+void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabled);
+void ScoreRules_basics_end();
+void ScoreRules_generic();
+
+#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../common/util.qh"
- #include "defs.qh"
- #include "secret.qh"
-#endif
+#include "secret.qh"
+#include "_.qh"
+
+#include "g_triggers.qh"
+#include "../common/util.qh"
void secrets_setstatus() {
self.stat_secrets_total = secrets_total;
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/constants.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "mutators/mutators_include.qh"
- #include "spawnpoints.qh"
- #include "race.qh"
-#endif
+#include "spawnpoints.qh"
+#include "_.qh"
+
+#include "mutators/mutators_include.qh"
+#include "g_world.qh"
+#include "race.qh"
+#include "../common/constants.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "../warpzonelib/util_server.qh"
float SpawnPoint_Send(entity to, int sf)
{
#include "../dpdefs/dpextensions.qh"
#endif
-.vector steerto;
-
/**
Uniform pull towards a point
**/
--- /dev/null
+#ifndef STEERLIB_H
+#define STEERLIB_H
+
+.vector steerto;
+
+vector steerlib_arrive(vector point,float maximal_distance);
+vector steerlib_attract2(vector point, float min_influense,float max_distance,float max_influense);
+vector steerlib_pull(vector point);
+
+#endif
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/csqcprojectile.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "vehicles/vehicles_def.qh"
- #include "../common/mapinfo.qh"
- #include "command/common.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "anticheat.qh"
- #include "g_hook.qh"
-#endif
+#include "_.qh"
+
+#include "anticheat.qh"
+#include "g_hook.qh"
+#include "g_world.qh"
+
+#include "bot/bot.qh"
+#include "bot/waypoints.qh"
+
+#include "command/common.qh"
+
+#include "mutators/mutators_include.qh"
+#include "vehicles/vehicles_def.qh"
+#include "weapons/csqcprojectile.qh"
+
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/util.qh"
+
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/sv_model.qh"
+
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/server.qh"
+
+.float lastground;
void CreatureFrame (void)
{
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../warpzonelib/util_server.qh"
- #include "defs.qh"
- #include "vehicles/vehicles_def.qh"
-#endif
+#include "_.qh"
+
+#include "../warpzonelib/util_server.qh"
+#include "vehicles/vehicles_def.qh"
+
+.float ladder_time;
+.entity ladder_entity;
.float roomtype;
.float radius;
#include "t_items.qh"
#if defined(SVQC)
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
+ #include "_.qh"
+
+ #include "g_subs.qh"
+ #include "waypointsprites.qh"
+
+ #include "bot/bot.qh"
+ #include "bot/waypoints.qh"
#include "mutators/mutators_include.qh"
+ #include "weapons/common.qh"
+ #include "weapons/selection.qh"
#include "weapons/weaponsystem.qh"
#include "../common/constants.qh"
#include "../common/weapons/weapons.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../dpdefs/progsdefs.qh"
-
#include "../warpzonelib/util_server.qh"
#endif
.int ItemStatus;
+void spawnfunc_item_strength();
+void spawnfunc_item_invincible();
+void spawnfunc_item_armor_small();
+
#ifdef CSQC
float autocvar_cl_animate_items = 1;
#include "t_jumppads.qh"
+#include "_.qh"
+
+#include "g_subs.qh"
+
+#include "bot/navigation.qh"
+#include "bot/waypoints.qh"
+
+#include "weapons/csqcprojectile.qh"
+
+#include "../common/animdecide.qh"
+
+#include "../warpzonelib/util_server.qh"
void trigger_push_use()
{
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/mathlib.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "command/common.qh"
- #include "../csqcmodellib/sv_model.qh"
-#endif
+#include "_.qh"
+
+#include "bot/bot.qh"
+
+#include "command/common.qh"
+
+#include "g_damage.qh"
+#include "g_subs.qh"
+#include "item_key.qh"
+
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/notifications.qh"
+#include "../common/util.qh"
+
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/sv_model.qh"
+
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
+#include "../warpzonelib/util_server.qh"
+
+.float height;
.float dmgtime2;
void generic_plat_blocked()
+#include "_.qh"
+
#include "../common/weapons/weapons.qc"
//***********************
+#include "_.qh"
+
#include "../common/weapons/weapons.qc"
//***********************
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
+ #include "_.qh"
+
#include "../warpzonelib/util_server.qh"
#include "../common/weapons/weapons.qh"
- #include "defs.qh"
#include "../common/deathtypes.qh"
#endif
#include "t_teleporters.qh"
+#include "_.qh"
#if defined(CSQC)
#elif defined(MENUQC)
#include "../common/constants.qh"
#include "../common/util.qh"
#include "weapons/csqcprojectile.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
#include "../common/deathtypes.qh"
#include "tturrets/include/turrets_early.qh"
#include "vehicles/vehicles_def.qh"
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/constants.qh"
- #include "constants.qh"
- #include "defs.qh"
-#endif
+#include "_.qh"
+.float volume;
.float lifetime;
// values:
// volume
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../common/util.qh"
- #include "defs.qh"
-#endif
+#include "_.qh"
+
+.entity pusher;
+.float pushltime;
// spawner entity
// "classname" "target_spawn"
#include "teamplay.qh"
+#include "_.qh"
+
+#include "cl_client.qh"
+#include "race.qh"
+#include "scores.qh"
+#include "scores_rules.qh"
+
+#include "bot/bot.qh"
+
+#include "command/vote.qh"
+
+#include "mutators/mutators_include.qh"
+
+#include "../common/deathtypes.qh"
+#include "../common/teams.qh"
void TeamchangeFrags(entity e)
{
+#include "../../_.qh"
+
+#include "../../g_damage.qh"
+#include "../../bot/bot.qh"
+
#define cvar_base "g_turrets_unit_"
.float clientframe;
void turrets_setframe(float _frame, float client_only)
+#include "../../bot/navigation.qh"
+
const float ewheel_amin_stop = 0;
const float ewheel_amin_fwd_slow = 1;
const float ewheel_amin_fwd_fast = 2;
+void W_MachineGun_MuzzleFlash(void);
+
void spawnfunc_turret_machinegun();
void turret_machinegun_std_init();
void turret_machinegun_attack();
+#include "../../_.qh"
+
void spawnfunc_turret_phaser();
void turret_phaser_dinit();
void turret_phaser_attack();
+#include "../../g_subs.qh"
+
void spawnfunc_turret_targettrigger();
void turret_targettrigger_touch();
+#include "../../csqceffects.qh"
+
void spawnfunc_turret_tesla();
void turret_tesla_dinit();
void turret_tesla_fire();
+#include "../../_.qh"
+
+#include "../../movelib.qh"
+#include "../../steerlib.qh"
+#include "../../t_teleporters.qh"
+
const float ANIM_NO = 0;
const float ANIM_TURN = 1;
const float ANIM_WALK = 2;
}
+.vector hook_start, hook_end;
float bumb_pilot_frame()
{
entity pilot, vehic;
return 1;
}
+.float lastpushtime;
+
void racer_think()
{
self.nextthink = time;
+#include "vehicles.qh"
+
+#include "../cl_player.qh"
+#include "../waypointsprites.qh"
+
+#include "../bot/waypoints.qh"
+
+.float() PlayerPhysplug;
+
float autocvar_g_vehicles_crush_dmg;
float autocvar_g_vehicles_crush_force;
float autocvar_g_vehicles_delayspawn;
cd "$(dirname "$0")"
cd ..
+declare -a NOWARN=(
+ '-Wno-field-redeclared'
+ '-Wno-unused-variable'
+ '-Wno-implicit-function-pointer'
+)
declare QCC=../../../gmqcc/gmqcc
function check() {
declare -la predefs=("${!2}")
find "$base" -type f -name '*.qc' -print0 | sort -z | while IFS= read -r -d '' file; do
echo "$file"
- ${QCC} -std=gmqcc -fftepp -fftepp-predefs -futf8 -O3 "${predefs[@]}" "$file" >/dev/null
+ ${QCC} -std=gmqcc -fftepp -fftepp-predefs -Werror -Wall "${NOWARN[@]}" -futf8 -O3 "${predefs[@]}" "$file" >/dev/null
done
}
clientdefs=("-DCSQC" "common/util-pre.qh" "dpdefs/csprogsdefs.qh")
check "client" clientdefs[@]
-# serverdefs=("-DSVQC" "common/util-pre.qh" "server/sys-pre.qh" "dpdefs/progsdefs.qh" "dpdefs/dpextensions.qh" "server/sys-post.qh" "server/defs.qh" "server/autocvars.qh")
-# check "server" serverdefs[@]
+serverdefs=("-DSVQC" "common/util-pre.qh" "server/sys-pre.qh" "dpdefs/progsdefs.qh" "dpdefs/dpextensions.qh" "server/sys-post.qh" "server/defs.qh" "server/autocvars.qh")
+check "server" serverdefs[@]
# menudefs=("-DMENUQC" "common/util-pre.qh" "dpdefs/menudefs.qh" "menu/oo/interface.qc" "menu/oo/implementation.qc")
# check "menu" menudefs[@]