From: Mario Date: Thu, 13 Jul 2017 02:12:43 +0000 (+1000) Subject: Split projectiles and scores out of constants.qh and remove lib definitions from... X-Git-Tag: xonotic-v0.8.5~2643 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=71963d96e2432f053ed6048dc40f0bc51458d804;p=xonotic%2Fxonotic-data.pk3dir.git Split projectiles and scores out of constants.qh and remove lib definitions from util.qh --- diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 8eaef9068..1418dff83 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -1,6 +1,7 @@ #pragma once #include +#include void Hud_Dynamic_Frame(); diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index 065e632f1..e8464cc14 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -2,6 +2,7 @@ #include #include +#include #include // TODO: remove // Mod icons (#10) diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index 24be15432..2f0f9909c 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -3,6 +3,7 @@ #include "scoreboard.qh" #include #include +#include // Score (#7) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index e6e5f3649..3872197c7 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 87f3a1bb4..bf82ccb34 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 98710d25b..6fd6fe9c7 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -34,194 +34,8 @@ const int HUD_BUMBLEBEE_GUN = 25; // # of maps, I'll use arrays for them :P const int MAPVOTE_COUNT = 30; -/** - * Lower scores are better (e.g. suicides) - */ -const int SFL_LOWER_IS_BETTER = BIT(0); - -/** - * Don't show zero values as scores - */ -const int SFL_HIDE_ZERO = BIT(1); - -/** - * Allow a column to be hidden (do not automatically add it even if it is a sorting key) - */ -const int SFL_ALLOW_HIDE = BIT(4); - -/** - * Display as a rank (with st, nd, rd, th suffix) - */ -const int SFL_RANK = BIT(5); - -/** - * Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!) - */ -const int SFL_TIME = BIT(6); - -// not an extra constant yet -#define SFL_ZERO_IS_WORST SFL_TIME - -/** - * Scoring priority (NOTE: PRIMARY is used for fraglimit) - */ -const int SFL_SORT_PRIO_SECONDARY = 4; -const int SFL_SORT_PRIO_PRIMARY = 8; -const int SFL_SORT_PRIO_MASK = 12; - -/* - * Score indices - */ - -#ifdef GAMEQC - -#define IS_INCREASING(x) ( (x) & SFL_LOWER_IS_BETTER ) -#define IS_DECREASING(x) ( !((x) & SFL_LOWER_IS_BETTER) ) - - -#define MAX_SCORE 64 - -#define REGISTER_SP(id) REGISTER(Scores, SP, id, m_id, new_pure(PlayerScoreField)) -REGISTRY(Scores, MAX_SCORE); -#define Scores_from(i) _Scores_from(i, NULL) -REGISTER_REGISTRY(Scores) -REGISTRY_SORT(Scores); -REGISTRY_CHECK(Scores); -STATIC_INIT(Scores_renumber) { FOREACH(Scores, true, it.m_id = i); } - -USING(PlayerScoreField, entity); -.int _scores[MAX_SCORE]; -.string m_name; -.int m_flags; - -#define scores(this) _scores[(this).m_id] -#define scores_label(this) ((this).m_name) -#define scores_flags(this) ((this).m_flags) - -REGISTER_SP(END); - -REGISTER_SP(PING); -REGISTER_SP(PL); -REGISTER_SP(NAME); -REGISTER_SP(KDRATIO); -REGISTER_SP(SUM); - -REGISTER_SP(SEPARATOR); - -REGISTER_SP(SCORE); - -REGISTER_SP(DMG); -REGISTER_SP(DMGTAKEN); - -REGISTER_SP(KILLS); -REGISTER_SP(DEATHS); -REGISTER_SP(SUICIDES); -REGISTER_SP(FRAGS); - -REGISTER_SP(ELO); - -// TODO: move to common mutators - -REGISTER_SP(RACE_TIME); -REGISTER_SP(RACE_LAPS); -REGISTER_SP(RACE_FASTEST); - -//REGISTER_SP(CTS_TIME); -//REGISTER_SP(CTS_LAPS); -//REGISTER_SP(CTS_FASTEST); - -REGISTER_SP(ASSAULT_OBJECTIVES); - -REGISTER_SP(CTF_PICKUPS); -REGISTER_SP(CTF_FCKILLS); -REGISTER_SP(CTF_RETURNS); -REGISTER_SP(CTF_CAPS); -REGISTER_SP(CTF_CAPTIME); -REGISTER_SP(CTF_DROPS); - -REGISTER_SP(DOM_TAKES); -REGISTER_SP(DOM_TICKS); - -REGISTER_SP(FREEZETAG_REVIVALS); - -REGISTER_SP(KEEPAWAY_PICKUPS); -REGISTER_SP(KEEPAWAY_BCTIME); -REGISTER_SP(KEEPAWAY_CARRIERKILLS); - -REGISTER_SP(KH_PICKUPS); -REGISTER_SP(KH_CAPS); -REGISTER_SP(KH_KCKILLS); -REGISTER_SP(KH_PUSHES); -REGISTER_SP(KH_DESTROYS); -REGISTER_SP(KH_LOSSES); - -REGISTER_SP(LMS_RANK); -REGISTER_SP(LMS_LIVES); - -REGISTER_SP(NEXBALL_GOALS); -REGISTER_SP(NEXBALL_FAULTS); - -REGISTER_SP(ONS_TAKES); -REGISTER_SP(ONS_CAPS); - -#define MAX_TEAMSCORE 2 -USING(ScoreTeam, string); -.int _teamscores[MAX_TEAMSCORE]; -#define teamscores(i) _teamscores[i] -string _teamscores_label[MAX_TEAMSCORE]; -#define teamscores_label(i) _teamscores_label[i] -int _teamscores_flags[MAX_TEAMSCORE]; -#define teamscores_flags(i) _teamscores_flags[i] - -#endif - -const int ST_SCORE = 0; - // game mode specific indices are not in common/, but in server/scores_rules.qc! -// WEAPONTODO: move this into separate/new projectile handling code // this sets sounds and other properties of the projectiles in csqc -const int PROJECTILE_ELECTRO = 1; -const int PROJECTILE_ROCKET = 2; -const int PROJECTILE_TAG = 3; -const int PROJECTILE_CRYLINK = 5; -const int PROJECTILE_ELECTRO_BEAM = 6; -const int PROJECTILE_GRENADE = 7; -const int PROJECTILE_GRENADE_BOUNCING = 8; -const int PROJECTILE_MINE = 9; -const int PROJECTILE_BLASTER = 10; -const int PROJECTILE_HLAC = 11; -const int PROJECTILE_SEEKER = 12; -const int PROJECTILE_FLAC = 13; -const int PROJECTILE_PORTO_RED = 14; -const int PROJECTILE_PORTO_BLUE = 15; -const int PROJECTILE_HOOKBOMB = 16; -const int PROJECTILE_HAGAR = 17; -const int PROJECTILE_HAGAR_BOUNCING = 18; -const int PROJECTILE_CRYLINK_BOUNCING = 20; -const int PROJECTILE_FIREBALL = 21; -const int PROJECTILE_FIREMINE = 22; - -const int PROJECTILE_RAPTORCANNON = 24; -const int PROJECTILE_RAPTORBOMB = 25; -const int PROJECTILE_RAPTORBOMBLET = 26; -const int PROJECTILE_SPIDERROCKET = 27; -const int PROJECTILE_WAKIROCKET = 28; -const int PROJECTILE_WAKICANNON = 29; - -const int PROJECTILE_BUMBLE_GUN = 30; -const int PROJECTILE_BUMBLE_BEAM = 31; - -const int PROJECTILE_MAGE_SPIKE = 32; -const int PROJECTILE_SHAMBLER_LIGHTNING = 33; - -const int PROJECTILE_ROCKETMINSTA_LASER = 34; - -const int PROJECTILE_ARC_BOLT = 35; - -// projectile IDs 40-50 reserved - -const int PROJECTILE_RPC = 60; - const int SPECIES_HUMAN = 0; const int SPECIES_ROBOT_SOLID = 1; const int SPECIES_ALIEN = 2; diff --git a/qcsrc/common/scores.qh b/qcsrc/common/scores.qh new file mode 100644 index 000000000..0451fd9c2 --- /dev/null +++ b/qcsrc/common/scores.qh @@ -0,0 +1,144 @@ +#pragma once + +#define MAX_SCORE 64 + +#define REGISTER_SP(id) REGISTER(Scores, SP, id, m_id, new_pure(PlayerScoreField)) +REGISTRY(Scores, MAX_SCORE); +#define Scores_from(i) _Scores_from(i, NULL) +REGISTER_REGISTRY(Scores) +REGISTRY_SORT(Scores); +REGISTRY_CHECK(Scores); +STATIC_INIT(Scores_renumber) { FOREACH(Scores, true, it.m_id = i); } + +/* + * Score indices + */ + +#ifdef GAMEQC +REGISTER_SP(END); + +REGISTER_SP(PING); +REGISTER_SP(PL); +REGISTER_SP(NAME); +REGISTER_SP(KDRATIO); +REGISTER_SP(SUM); + +REGISTER_SP(SEPARATOR); + +REGISTER_SP(SCORE); + +REGISTER_SP(DMG); +REGISTER_SP(DMGTAKEN); + +REGISTER_SP(KILLS); +REGISTER_SP(DEATHS); +REGISTER_SP(SUICIDES); +REGISTER_SP(FRAGS); + +REGISTER_SP(ELO); + +// TODO: move to common mutators + +REGISTER_SP(RACE_TIME); +REGISTER_SP(RACE_LAPS); +REGISTER_SP(RACE_FASTEST); + +//REGISTER_SP(CTS_TIME); +//REGISTER_SP(CTS_LAPS); +//REGISTER_SP(CTS_FASTEST); + +REGISTER_SP(ASSAULT_OBJECTIVES); + +REGISTER_SP(CTF_PICKUPS); +REGISTER_SP(CTF_FCKILLS); +REGISTER_SP(CTF_RETURNS); +REGISTER_SP(CTF_CAPS); +REGISTER_SP(CTF_CAPTIME); +REGISTER_SP(CTF_DROPS); + +REGISTER_SP(DOM_TAKES); +REGISTER_SP(DOM_TICKS); + +REGISTER_SP(FREEZETAG_REVIVALS); + +REGISTER_SP(KEEPAWAY_PICKUPS); +REGISTER_SP(KEEPAWAY_BCTIME); +REGISTER_SP(KEEPAWAY_CARRIERKILLS); + +REGISTER_SP(KH_PICKUPS); +REGISTER_SP(KH_CAPS); +REGISTER_SP(KH_KCKILLS); +REGISTER_SP(KH_PUSHES); +REGISTER_SP(KH_DESTROYS); +REGISTER_SP(KH_LOSSES); + +REGISTER_SP(LMS_RANK); +REGISTER_SP(LMS_LIVES); + +REGISTER_SP(NEXBALL_GOALS); +REGISTER_SP(NEXBALL_FAULTS); + +REGISTER_SP(ONS_TAKES); +REGISTER_SP(ONS_CAPS); +#endif + + +// the stuff you don't need to see + +/** + * Lower scores are better (e.g. suicides) + */ +const int SFL_LOWER_IS_BETTER = BIT(0); + +/** + * Don't show zero values as scores + */ +const int SFL_HIDE_ZERO = BIT(1); + +/** + * Allow a column to be hidden (do not automatically add it even if it is a sorting key) + */ +const int SFL_ALLOW_HIDE = BIT(4); + +/** + * Display as a rank (with st, nd, rd, th suffix) + */ +const int SFL_RANK = BIT(5); + +/** + * Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!) + */ +const int SFL_TIME = BIT(6); + +// not an extra constant yet +#define SFL_ZERO_IS_WORST SFL_TIME + +/** + * Scoring priority (NOTE: PRIMARY is used for fraglimit) + */ +const int SFL_SORT_PRIO_SECONDARY = 4; +const int SFL_SORT_PRIO_PRIMARY = 8; +const int SFL_SORT_PRIO_MASK = 12; + +#define IS_INCREASING(x) ( (x) & SFL_LOWER_IS_BETTER ) +#define IS_DECREASING(x) ( !((x) & SFL_LOWER_IS_BETTER) ) + +USING(PlayerScoreField, entity); +.int _scores[MAX_SCORE]; +.string m_name; +.int m_flags; + +#define scores(this) _scores[(this).m_id] +#define scores_label(this) ((this).m_name) +#define scores_flags(this) ((this).m_flags) + +#define MAX_TEAMSCORE 2 +USING(ScoreTeam, string); +.int _teamscores[MAX_TEAMSCORE]; +#define teamscores(i) _teamscores[i] +string _teamscores_label[MAX_TEAMSCORE]; +#define teamscores_label(i) _teamscores_label[i] +int _teamscores_flags[MAX_TEAMSCORE]; +#define teamscores_flags(i) _teamscores_flags[i] + +const int ST_SCORE = 0; diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 91d68f1ba..6340c007a 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1,20 +1,19 @@ #include "util.qh" #if defined(CSQC) - #include "../client/defs.qh" #include "constants.qh" #include "../client/mutators/events.qh" #include "mapinfo.qh" #include "notifications/all.qh" + #include "scores.qh" #include #elif defined(MENUQC) #elif defined(SVQC) #include "constants.qh" - #include "../server/autocvars.qh" - #include "../server/defs.qh" #include "../server/mutators/events.qh" #include "notifications/all.qh" #include + #include "scores.qh" #include "mapinfo.qh" #endif @@ -183,6 +182,7 @@ void depthfirst(entity start, .entity up, .entity downleft, .entity right, void( } } +#ifdef GAMEQC string ScoreString(int pFlags, float pValue) { string valstr; @@ -214,6 +214,7 @@ string ScoreString(int pFlags, float pValue) return valstr; } +#endif // compressed vector format: // like MD3, just even shorter diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index da86bf22e..d74275a9c 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,10 +1,12 @@ #pragma once #ifdef GAMEQC - vector real_origin(entity ent); #endif +.string netname; +.string message; + IntrusiveList g_saved_cvars; STATIC_INIT(g_saved_cvars) { g_saved_cvars = IL_NEW(); } @@ -25,38 +27,11 @@ string draw_UseSkinFor(string pic); // for each element, funcPre is called first, then funcPre and funcPost for all its children, and funcPost last void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass); -float median(float a, float b, float c); - -// converts a number to a string with the indicated number of decimals -string ftos_decimals(float number, float decimals); -string ftos_mindecimals(float number); - -bool fexists(string f); - -// unzone the string, and return it as tempstring. Safe to be called on string_null -string fstrunzone(string s); - -// database (NOTE: keys are case sensitive) -void db_save(int db, string filename); -void db_dump(int db, string pFilename); -int db_create(); -int db_load(string filename); -void db_close(int db); -string db_get(int db, string key); -void db_put(int db, string key, string value); - -// stringbuffer loading/saving -int buf_load(string filename); -void buf_save(int buf, string filename); - // adding just 0.4 for race times so it rounds down in the .5 case (matching the timer display) // FIXME it doesn't round properly #define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4) -string format_time(float seconds); -string mmsss(float t); -string mmssss(float t); -const float TIME_DECIMALS = 2; +const int TIME_DECIMALS = 2; const float TIME_FACTOR = 100; #define TIME_ENCODED_TOSTRING(n) mmssss(n) #define RACE_RECORD "/race100record/" @@ -65,7 +40,9 @@ const float TIME_FACTOR = 100; #define TIME_ENCODE(t) TIME_TO_NTHS(t, TIME_FACTOR) #define TIME_DECODE(n) ((n) / TIME_FACTOR) +#ifdef GAMEQC string ScoreString(float vflags, float value); +#endif vector decompressShortVector(float data); float compressShortVector(vector vec); @@ -78,8 +55,6 @@ string fixPriorityList(string pl, float from, float to, float subtract, float co string mapPriorityList(string order, string(string) mapfunc); string swapInPriorityList(string order, float i, float j); -float cvar_value_issafe(string s); - float cvar_settemp(string pKey, string pValue); float cvar_settemp_restore(); @@ -102,12 +77,6 @@ vector mi_pictexcoord3; // texcoords of the image corners (after transforming, t void get_mi_min_max_texcoords(float mode); #endif -float almost_equals(float a, float b); -float almost_in_bounds(float a, float b, float c); - -float boxesoverlap(vector m1, vector m2, vector m3, vector m4); -float boxinsidebox(vector smins, vector smaxs, vector bmins, vector bmaxs); - USING(textLengthUpToWidth_widthFunction_t, float(string s, vector size)); USING(textLengthUpToLength_lenFunction_t, float(string s)); float textLengthUpToWidth(string theText, float maxWidth, vector size, textLengthUpToWidth_widthFunction_t tw); @@ -121,17 +90,6 @@ string getWrappedLineLen(float w, textLengthUpToLength_lenFunction_t tw); float isGametypeInFilter(entity gt, float tp, float ts, string pattern); -string swapwords(string str, float i, float j); -string shufflewords(string str); - -string substring_range(string s, float b, float e); - -vector solve_quadratic(float a, float b, float c); -// solution 1 -> x -// solution 2 -> y -// z = 1 if a real solution exists, 0 if not -// if no real solution exists, x contains the real part and y the imaginary part of the complex solutions x+iy and x-iy - vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style); vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma); @@ -150,11 +108,6 @@ vector healtharmor_applydamage(float a, float armorblock, int deathtype, float d string getcurrentmod(); -float float2range11(float f); -float float2range01(float f); - -float gsl_ran_gaussian(float sigma); - float matchacl(string acl, string str); // matches str against ACL acl (with entries +foo*, +foo, +*foo, +*foo*, and same with - for forbidding) string get_model_datafilename(string mod, float skn, string fil); // skin -1 will return wildcard, mod string_null will also put wildcard there @@ -176,14 +129,6 @@ float get_model_parameters_fixbone; string get_model_parameters_desc; float get_model_parameters(string mod, float skn); // call with string_null to clear; skin -1 means mod is the filename of the txt file and is to be split -#ifdef GAMEQC -vector NearestPointOnBox(entity box, vector org); -#endif - -float vercmp(string v1, string v2); - -float u8_strsize(string s); - // x-encoding (encoding as zero length invisible string) // encodes approx. 14 bits into 5 bytes of color code string const float XENCODE_MAX = 21295; // 2*22*22*22-1 @@ -195,8 +140,6 @@ float xdecode(string s); string strtolower(string s); #endif -string MakeConsoleSafe(string input); - // generic shutdown handler void Shutdown(); @@ -206,29 +149,11 @@ void Skeleton_SetBones(entity e); // loops through the tags of model v using counter tagnum #define FOR_EACH_TAG(v) float tagnum; Skeleton_SetBones(v); for(tagnum = 0; tagnum < v.skeleton_bones; tagnum++, gettaginfo(v, tagnum)) #endif -#ifdef SVQC -void WriteApproxPastTime(float dst, float t); -#endif -#ifdef CSQC -float ReadApproxPastTime(); -#endif // execute-stuff-next-frame subsystem void execute_next_frame(); void queue_to_execute_next_frame(string s); -// a function f with: -// f(0) = 0 -// f(1) = 1 -// f'(0) = startspeedfactor -// f'(1) = endspeedfactor -float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float spd); - -// checks whether f'(x) = 0 anywhere from 0 to 1 -// because if this is the case, the function is not usable for platforms -// as it may exceed 0..1 bounds, or go in reverse -float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor); - USING(findNextEntityNearFunction_t, entity(entity cur, entity near, entity pass)); USING(isConnectedFunction_t, float(entity a, entity b, entity pass)); void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass); @@ -240,10 +165,6 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t #define fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__)) #define bprintf(...) bprint(sprintf(__VA_ARGS__)) -#ifdef GAMEQC -string CCR(string input); -#endif - #ifdef GAMEQC #ifdef CSQC #define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages) @@ -258,13 +179,13 @@ vector animfixfps(entity e, vector a, vector b); #endif #ifdef GAMEQC -const float CNT_NORMAL = 1; -const float CNT_GAMESTART = 2; -const float CNT_IDLE = 3; -const float CNT_KILL = 4; -const float CNT_RESPAWN = 5; -const float CNT_ROUNDSTART = 6; -entity Announcer_PickNumber(float type, float num); +const int CNT_NORMAL = 1; +const int CNT_GAMESTART = 2; +const int CNT_IDLE = 3; +const int CNT_KILL = 4; +const int CNT_RESPAWN = 5; +const int CNT_ROUNDSTART = 6; +entity Announcer_PickNumber(int type, int num); #endif #ifdef GAMEQC @@ -272,10 +193,6 @@ int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents); int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents); #endif -// Quadratic splines (bezier) -vector bezier_quadratic_getpoint(vector a, vector p, vector b, float t); -vector bezier_quadratic_getderivative(vector a, vector p, vector b, float t); - #define APPEND_TO_STRING(list,sep,add) ((list) = (((list) != "") ? strcat(list, sep, add) : (add))) // Returns the correct difference between two always increasing numbers diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 22d0e294e..83fe0c196 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -20,6 +20,7 @@ WepSet ReadWepSet(); #ifdef GAMEQC #include "calculations.qh" +#include "projectiles.qh" #include #endif diff --git a/qcsrc/common/weapons/projectiles.qh b/qcsrc/common/weapons/projectiles.qh new file mode 100644 index 000000000..73cd00d6c --- /dev/null +++ b/qcsrc/common/weapons/projectiles.qh @@ -0,0 +1,43 @@ +#pragma once + +const int PROJECTILE_ELECTRO = 1; +const int PROJECTILE_ROCKET = 2; +const int PROJECTILE_TAG = 3; +const int PROJECTILE_CRYLINK = 5; +const int PROJECTILE_ELECTRO_BEAM = 6; +const int PROJECTILE_GRENADE = 7; +const int PROJECTILE_GRENADE_BOUNCING = 8; +const int PROJECTILE_MINE = 9; +const int PROJECTILE_BLASTER = 10; +const int PROJECTILE_HLAC = 11; +const int PROJECTILE_SEEKER = 12; +const int PROJECTILE_FLAC = 13; +const int PROJECTILE_PORTO_RED = 14; +const int PROJECTILE_PORTO_BLUE = 15; +const int PROJECTILE_HOOKBOMB = 16; +const int PROJECTILE_HAGAR = 17; +const int PROJECTILE_HAGAR_BOUNCING = 18; +const int PROJECTILE_CRYLINK_BOUNCING = 20; +const int PROJECTILE_FIREBALL = 21; +const int PROJECTILE_FIREMINE = 22; + +const int PROJECTILE_RAPTORCANNON = 24; +const int PROJECTILE_RAPTORBOMB = 25; +const int PROJECTILE_RAPTORBOMBLET = 26; +const int PROJECTILE_SPIDERROCKET = 27; +const int PROJECTILE_WAKIROCKET = 28; +const int PROJECTILE_WAKICANNON = 29; + +const int PROJECTILE_BUMBLE_GUN = 30; +const int PROJECTILE_BUMBLE_BEAM = 31; + +const int PROJECTILE_MAGE_SPIKE = 32; +const int PROJECTILE_SHAMBLER_LIGHTNING = 33; + +const int PROJECTILE_ROCKETMINSTA_LASER = 34; + +const int PROJECTILE_ARC_BOLT = 35; + +// projectile IDs 40-50 reserved + +const int PROJECTILE_RPC = 60; diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 958566ac4..bc09d7a8c 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -801,7 +801,7 @@ MUTATOR_HOOKABLE(CheckRules_World, EV_CheckRules_World); MUTATOR_HOOKABLE(WantWeapon, EV_WantWeapon); #define EV_AddPlayerScore(i, o) \ - /** score field */ i(PlayerScoreField, MUTATOR_ARGV_0_entity) \ + /** score field */ i(entity, MUTATOR_ARGV_0_entity) \ /** score */ i(float, MUTATOR_ARGV_1_float) \ /**/ o(float, MUTATOR_ARGV_1_float) \ /** player */ i(entity, MUTATOR_ARGV_2_entity) \ diff --git a/qcsrc/server/mutators/gamemode.qh b/qcsrc/server/mutators/gamemode.qh index 9a473affd..05e1d3d38 100644 --- a/qcsrc/server/mutators/gamemode.qh +++ b/qcsrc/server/mutators/gamemode.qh @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 7854b875e..6bfb09cc9 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -5,6 +5,7 @@ #include #include "../common/playerstats.qh" #include "../common/teams.qh" +#include .entity scorekeeper; entity teamscorekeepers[16]; diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 2f9c07872..fc4c19602 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -1,6 +1,6 @@ #pragma once -#include +#include entity scores_initialized; // non-NULL when scores labels/rules have been set .float scoreboard_pos;