From: Lyberta Date: Mon, 19 Mar 2018 12:36:45 +0000 (+0300) Subject: Small fixes. X-Git-Tag: xonotic-v0.8.5~2207^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04aec1ffa81f9e803f7da4bfd99e497ed5c358ca;p=xonotic%2Fxonotic-data.pk3dir.git Small fixes. --- diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 22f291f6b..e59152076 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -8,7 +8,6 @@ #endif #ifdef SVQC -#include #include #endif @@ -57,7 +56,7 @@ const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FU { \ if (!Item_IsDefinitionAllowed(item)) \ { \ - /*startitem_failed = true;*/ \ + startitem_failed = true; \ delete(this); \ return; \ } \ diff --git a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qh b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qh index 575336301..9ac738ca6 100644 --- a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qh +++ b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qh @@ -9,12 +9,12 @@ bool autocvar_g_random_items; ///< Whether to enable random items. enum { - RANDOM_ITEM_TYPE_HEALTH = BIT(1), - RANDOM_ITEM_TYPE_ARMOR = BIT(2), - RANDOM_ITEM_TYPE_RESOURCE = BIT(3), - RANDOM_ITEM_TYPE_WEAPON = BIT(4), - RANDOM_ITEM_TYPE_POWERUP = BIT(5), - RANDOM_ITEM_TYPE_ALL = BITS(6) + RANDOM_ITEM_TYPE_HEALTH = BIT(0), + RANDOM_ITEM_TYPE_ARMOR = BIT(1), + RANDOM_ITEM_TYPE_RESOURCE = BIT(2), + RANDOM_ITEM_TYPE_WEAPON = BIT(3), + RANDOM_ITEM_TYPE_POWERUP = BIT(4), + RANDOM_ITEM_TYPE_ALL = BITS(5) }; /// \brief Returns a random classname of the item. diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 4b600e3fc..138752f13 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -182,8 +182,6 @@ float default_weapon_alpha; string gamemode_name; -float startitem_failed; - string W_Apply_Weaponreplace(string in); void FixIntermissionClient(entity e); diff --git a/qcsrc/server/items.qh b/qcsrc/server/items.qh index d8703370c..b52449e71 100644 --- a/qcsrc/server/items.qh +++ b/qcsrc/server/items.qh @@ -4,6 +4,8 @@ /// \brief Header file that describes the functions related to game items. /// \copyright GNU GPLv2 or any later version. +bool startitem_failed; + /// \brief Returns the item definition corresponding to the given class name. /// \param[in] class_name Class name to search for. /// \return Item definition corresponding to the given class name or NULL is not