From: TimePath Date: Sun, 2 Jun 2019 05:18:24 +0000 (+1000) Subject: Run the consistency scripts X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FTimePath%2Fmaster;p=xonotic%2Fxonotic-data.pk3dir.git Run the consistency scripts --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index a06419556..d00eac9db 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -713,7 +713,7 @@ void CSQCModel_Hook_PreUpdate(entity this, bool isnew, bool isplayer, bool isloc void CSQCModel_Hook_PostUpdate(entity this, bool isnew, bool isplayer, bool islocalplayer) { // is it a player model? (shared state) - bool is_playermodel = (substring(this.model, 0, 14) == "models/player/" || substring(this.model, 0, 17) == "models/ok_player/" || + bool is_playermodel = (substring(this.model, 0, 14) == "models/player/" || substring(this.model, 0, 17) == "models/ok_player/" || (substring(this.model, 0, 16) == "models/monsters/" && (this.isplayermodel & BIT(1)))); this.isplayermodel = BITSET(this.isplayermodel, ISPLAYER_MODEL, is_playermodel); diff --git a/qcsrc/common/mapobjects/trigger/swamp.qc b/qcsrc/common/mapobjects/trigger/swamp.qc index 0717f4bea..87e653b1f 100644 --- a/qcsrc/common/mapobjects/trigger/swamp.qc +++ b/qcsrc/common/mapobjects/trigger/swamp.qc @@ -18,7 +18,7 @@ .float swamp_interval; //Hurt players in swamp with this interval .float swamp_slowdown; //Players in swamp get slowd down by this mutch 0-1 is slowdown 1-~ is speedup (!?) -.float swamp_lifetime; // holds the points remaining until slug dies (not quite health!) +.float swamp_lifetime; // holds the points remaining until slug dies (not quite health!) .entity swampslug; #ifdef SVQC diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index fc571678b..0a76a633d 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -18,7 +18,7 @@ int autocvar_g_instagib_extralives; float autocvar_g_instagib_speed_highspeed; IntrusiveList g_instagib_items; -STATIC_INIT() +STATIC_INIT(g_instagib_items) { g_instagib_items = IL_NEW(); IL_PUSH(g_instagib_items, ITEM_VaporizerCells); diff --git a/qcsrc/common/mutators/mutator/overkill/_mod.inc b/qcsrc/common/mutators/mutator/overkill/_mod.inc index 017cc2082..227be4626 100644 --- a/qcsrc/common/mutators/mutator/overkill/_mod.inc +++ b/qcsrc/common/mutators/mutator/overkill/_mod.inc @@ -1,15 +1,16 @@ // generated file; do not modify +#include +#include +#include +#include +#include +#include #ifdef CSQC #include #endif #ifdef SVQC #include #endif -#include -#include -#include -#include -#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/overkill/_mod.qh b/qcsrc/common/mutators/mutator/overkill/_mod.qh index 7731f17e1..c652f5a37 100644 --- a/qcsrc/common/mutators/mutator/overkill/_mod.qh +++ b/qcsrc/common/mutators/mutator/overkill/_mod.qh @@ -1,12 +1,16 @@ // generated file; do not modify +#include +#include +#include +#include +#include +#include #ifdef CSQC #include #endif #ifdef SVQC #include #endif -#include -#include -#include -#include -#include +#ifdef SVQC + #include +#endif diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qc b/qcsrc/common/mutators/mutator/overkill/overkill.qc new file mode 100644 index 000000000..3cb64ce92 --- /dev/null +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qc @@ -0,0 +1 @@ +#include "overkill.qh" diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qh b/qcsrc/common/mutators/mutator/overkill/overkill.qh new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qh @@ -0,0 +1 @@ +#pragma once diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index 15a2fc2e0..c8e07a473 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -11,7 +11,7 @@ bool autocvar_g_overkill_itemwaypoints = true; .Weapon ok_lastwep[MAX_WEAPONSLOTS]; IntrusiveList g_overkill_items; -STATIC_INIT() +STATIC_INIT(g_overkill_items) { g_overkill_items = IL_NEW(); IL_PUSH(g_overkill_items, ITEM_HealthMega); diff --git a/qcsrc/common/mutators/mutator/overkill/sv_weapons.qc b/qcsrc/common/mutators/mutator/overkill/sv_weapons.qc index 4a131e3f0..5952a25c2 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_weapons.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_weapons.qc @@ -1,3 +1,4 @@ +#include "sv_weapons.qh" string autocvar_g_overkill_weapons; REGISTER_MUTATOR(ok_weapons, expr_evaluate(autocvar_g_overkill_weapons) || MUTATOR_IS_ENABLED(ok)) diff --git a/qcsrc/common/mutators/mutator/overkill/sv_weapons.qh b/qcsrc/common/mutators/mutator/overkill/sv_weapons.qh new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/qcsrc/common/mutators/mutator/overkill/sv_weapons.qh @@ -0,0 +1 @@ +#pragma once diff --git a/qcsrc/common/mutators/mutator/weaponarena_random/sv_weaponarena_random.qc b/qcsrc/common/mutators/mutator/weaponarena_random/sv_weaponarena_random.qc index 32b6f3930..6a296b812 100644 --- a/qcsrc/common/mutators/mutator/weaponarena_random/sv_weaponarena_random.qc +++ b/qcsrc/common/mutators/mutator/weaponarena_random/sv_weaponarena_random.qc @@ -9,7 +9,7 @@ MUTATOR_HOOKFUNCTION(weaponarena_random, SetStartItems) g_weaponarena_random = cvar("g_weaponarena_random"); else g_weaponarena_random = 0; - + g_weaponarena_random_with_blaster = cvar("g_weaponarena_random_with_blaster"); } diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 9ea192549..909f34c56 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -624,7 +624,7 @@ float adjust_respawntime(float normal_respawntime) { } } TeamBalance_Destroy(balance); - + if (players >= 2) { return normal_respawntime * (r / (players + o) + l); } else { diff --git a/qcsrc/menu/xonotic/_mod.inc b/qcsrc/menu/xonotic/_mod.inc index 00a9e5403..3f324ba39 100644 --- a/qcsrc/menu/xonotic/_mod.inc +++ b/qcsrc/menu/xonotic/_mod.inc @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -70,7 +71,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/menu/xonotic/_mod.qh b/qcsrc/menu/xonotic/_mod.qh index 5d72a5617..1b3e09081 100644 --- a/qcsrc/menu/xonotic/_mod.qh +++ b/qcsrc/menu/xonotic/_mod.qh @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -70,7 +71,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 8261f36b3..93c8134b2 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1592,7 +1592,7 @@ void player_regen(entity this) limith = limith * limit_mod; limita = limita * limit_mod; - SetResource(this, RES_ARMOR, CalcRotRegen(GetResource(this, RES_ARMOR), mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, + SetResource(this, RES_ARMOR, CalcRotRegen(GetResource(this, RES_ARMOR), mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, regen_mod * frametime * (time > this.pauseregen_finished), maxa, autocvar_g_balance_armor_rot, autocvar_g_balance_armor_rotlinear, rot_mod * frametime * (time > this.pauserotarmor_finished), limita)); SetResource(this, RES_HEALTH, CalcRotRegen(GetResource(this, RES_HEALTH), regen_health_stable, regen_health, regen_health_linear, @@ -1618,7 +1618,7 @@ void player_regen(entity this) minf = autocvar_g_balance_fuel_regenstable; limitf = GetResourceLimit(this, RES_FUEL); - SetResource(this, RES_FUEL, CalcRotRegen(GetResource(this, RES_FUEL), minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, + SetResource(this, RES_FUEL, CalcRotRegen(GetResource(this, RES_FUEL), minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > this.pauseregen_finished) * ((this.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > this.pauserotfuel_finished), limitf)); } diff --git a/qcsrc/server/clientkill.qh b/qcsrc/server/clientkill.qh index 5b26adf91..a0f198179 100644 --- a/qcsrc/server/clientkill.qh +++ b/qcsrc/server/clientkill.qh @@ -1,3 +1,4 @@ +#pragma once // set when showing a kill countdown .entity killindicator; diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index e8fc1b13f..1e3d9b096 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -608,7 +608,7 @@ void GameCommand_delrec(int request, int argc) // perhaps merge later with reco } void print_Effect_Index(int d, string effect_name) -{ +{ // this is inside a function to avoid expanding it on compilation everytime LOG_INFO("effect ", effect_name, " is ", ftos(_particleeffectnum(effect_name)), "\n"); db_put(d, effect_name, "1");