From: TimePath Date: Sun, 3 May 2015 06:16:26 +0000 (+1000) Subject: Cleanup weapons #includes X-Git-Tag: xonotic-v0.8.1~61^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2f8cc3b296b4b591227862bffc2f04dd4e0e6a0;p=xonotic%2Fxonotic-data.pk3dir.git Cleanup weapons #includes --- diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index b8d1fc533..a8a9117d5 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -68,6 +68,10 @@ void UncustomizeEntitiesRun(); void InitializeEntitiesRun(); void stopsoundto(float _dest, entity e, float chan); +void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten); +float ExponentialFalloff(float mindist, float maxdist, float halflifedist, float d); + +vector shotorg_adjust(vector vecs, float y_is_right, float visual); float DistributeEvenly_amount; float DistributeEvenly_totalweight; diff --git a/qcsrc/server/t_quake.qc b/qcsrc/server/t_quake.qc index 43ead3b1f..136a7612b 100644 --- a/qcsrc/server/t_quake.qc +++ b/qcsrc/server/t_quake.qc @@ -1,6 +1,6 @@ #include "_.qh" -#include "../common/weapons/weapons.qc" +#include "../common/weapons/weapons.qh" void spawnfunc_weapon_electro(); void spawnfunc_weapon_hagar(); diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 7da5b95b9..d2a1b2fe3 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -1,6 +1,7 @@ #include "_.qh" -#include "../common/weapons/weapons.qc" +#include "../common/weapons/weapons.qh" +#include "../common/buffs.qh" void spawnfunc_weapon_crylink(); void spawnfunc_weapon_electro(); diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index 2557d10d1..3d97c19e7 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,17 +1,11 @@ -#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/weapons/weapons.qh" - #include "accuracy.qh" - #include "../autocvars.qh" - #include "../constants.qh" - #include "../defs.qh" - #include "../mutators/mutators_include.qh" -#endif +#include "accuracy.qh" +#include "../_.qh" + +#include "../mutators/mutators_include.qh" +#include "../../common/constants.qh" +#include "../../common/teams.qh" +#include "../../common/util.qh" +#include "../../common/weapons/weapons.qh" float accuracy_byte(float n, float d) { diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 5125410b9..5a152267e 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -1,17 +1,12 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../common/constants.qh" - #include "../../common/util.qh" - #include "../../common/weapons/weapons.qh" - #include "common.qh" - #include "../t_items.qh" - #include "../autocvars.qh" - #include "../defs.qh" - #include "../../common/notifications.qh" - #include "../../common/deathtypes.qh" -#endif +#include "common.qh" +#include "../_.qh" + +#include "../t_items.qh" +#include "../../common/constants.qh" +#include "../../common/deathtypes.qh" +#include "../../common/notifications.qh" +#include "../../common/util.qh" +#include "../../common/weapons/weapons.qh" void W_GiveWeapon (entity e, float wep) { diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 133e92d3f..db50704d0 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,15 +1,12 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../common/constants.qh" - #include "../../common/weapons/weapons.qh" - #include "csqcprojectile.qh" - #include "../t_items.qh" - #include "../constants.qh" - #include "../defs.qh" - #include "../command/common.qh" -#endif +#include "csqcprojectile.qh" +#include "../_.qh" + +#include "../t_items.qh" + +#include "../command/common.qh" + +#include "../../common/constants.qh" +#include "../../common/weapons/weapons.qh" .float csqcprojectile_type; diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index ec1004cd1..72da16a52 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -1,14 +1,9 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../dpdefs/dpextensions.qh" - #include "../../common/weapons/weapons.qh" - #include "hitplot.qh" - #include "../autocvars.qh" - #include "../defs.qh" - #include "../antilag.qh" -#endif +#include "hitplot.qh" +#include "../_.qh" + +#include "../antilag.qh" +#include "../g_subs.qh" +#include "../../common/weapons/weapons.qh" vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v) { diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 5ea0a5d9d..9bc587c03 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -1,17 +1,12 @@ -#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/weapons/weapons.qh" - #include "selection.qh" - #include "weaponsystem.qh" - #include "../t_items.qh" - #include "../autocvars.qh" - #include "../defs.qh" -#endif +#include "selection.qh" +#include "../_.qh" + +#include "weaponsystem.qh" +#include "../t_items.qh" +#include "../waypointsprites.qh" +#include "../../common/constants.qh" +#include "../../common/util.qh" +#include "../../common/weapons/weapons.qh" // switch between weapons void Send_WeaponComplain(entity e, float wpn, float type) diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index ea62fcf19..9b2099aaf 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -1,17 +1,10 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../dpdefs/dpextensions.qh" - #include "../../common/weapons/weapons.qh" - #include "spawning.qh" - #include "weaponsystem.qh" - #include "../t_items.qh" - #include "../autocvars.qh" - #include "../constants.qh" - #include "../defs.qh" - #include "../mutators/mutators_include.qh" -#endif +#include "spawning.qh" +#include "../_.qh" + +#include "weaponsystem.qh" +#include "../mutators/mutators_include.qh" +#include "../t_items.qh" +#include "../../common/weapons/weapons.qh" string W_Apply_Weaponreplace(string in) { diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 0b0cb503a..37ca67ccd 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -1,20 +1,15 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../dpdefs/dpextensions.qh" - #include "../../common/util.qh" - #include "../../common/weapons/weapons.qh" - #include "throwing.qh" - #include "weaponsystem.qh" - #include "../t_items.qh" - #include "../autocvars.qh" - #include "../constants.qh" - #include "../defs.qh" - #include "../../common/notifications.qh" - #include "../mutators/mutators_include.qh" - #include "../../common/mapinfo.qh" -#endif +#include "throwing.qh" +#include "../_.qh" + +#include "weaponsystem.qh" +#include "../mutators/mutators_include.qh" +#include "../t_items.qh" +#include "../g_damage.qh" +#include "../g_subs.qh" +#include "../../common/mapinfo.qh" +#include "../../common/notifications.qh" +#include "../../common/util.qh" +#include "../../common/weapons/weapons.qh" void thrown_wep_think() { diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 1621f8e8e..8bbdb976f 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -1,17 +1,20 @@ -#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/util.qh" - #include "../../common/weapons/weapons.qh" - #include "tracing.qh" - #include "../autocvars.qh" - #include "../defs.qh" - #include "../antilag.qh" -#endif +#include "tracing.qh" +#include "../_.qh" + +#include "accuracy.qh" +#include "common.qh" +#include "hitplot.qh" + +#include "../g_damage.qh" +#include "../g_subs.qh" +#include "../antilag.qh" + +#include "../../common/constants.qh" +#include "../../common/util.qh" + +#include "../../common/weapons/weapons.qh" + +#include "../../warpzonelib/common.qh" // this function calculates w_shotorg and w_shotdir based on the weapon model // offset, trueaim and antilag, and won't put w_shotorg inside a wall. diff --git a/qcsrc/server/weapons/weaponstats.qc b/qcsrc/server/weapons/weaponstats.qc index 64fdc5bb3..027ff405f 100644 --- a/qcsrc/server/weapons/weaponstats.qc +++ b/qcsrc/server/weapons/weaponstats.qc @@ -1,14 +1,10 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" - #include "../../dpdefs/dpextensions.qh" - #include "../../common/urllib.qh" - #include "../../common/weapons/weapons.qh" - #include "weaponstats.qh" - #include "../autocvars.qh" - #include "../defs.qh" -#endif +#include "weaponstats.qh" +#include "../_.qh" + +#include "../g_world.qh" + +#include "../../common/urllib.qh" +#include "../../common/weapons/weapons.qh" void WeaponStats_Init() { diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index ab85389c5..ec536b38f 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -1,23 +1,19 @@ -#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/animdecide.qh" - #include "../../common/monsters/monsters.qh" - #include "../../common/weapons/weapons.qh" - #include "weaponsystem.qh" - #include "../t_items.qh" - #include "../autocvars.qh" - #include "../defs.qh" - #include "../../common/notifications.qh" - #include "../mutators/mutators_include.qh" - #include "../command/common.qh" - #include "../../csqcmodellib/sv_model.qh" - #include "../round_handler.qh" -#endif +#include "weaponsystem.qh" +#include "../_.qh" + +#include "selection.qh" + +#include "../command/common.qh" +#include "../mutators/mutators_include.qh" +#include "../round_handler.qh" +#include "../t_items.qh" +#include "../../common/animdecide.qh" +#include "../../common/constants.qh" +#include "../../common/monsters/monsters.qh" +#include "../../common/notifications.qh" +#include "../../common/util.qh" +#include "../../common/weapons/weapons.qh" +#include "../../csqcmodellib/sv_model.qh" /* ===========================================================================