X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ft_items.qh;h=fa78ff4b334ea9ede118f7817c81f02de9c0387d;hb=c89e099b706d9c07b2ce49fd267c0f35f06f2146;hp=331d3ac8c3edf342571aae9204e14cc7b5ed932c;hpb=2183056a5b6e75d2e025aa6c718eeb6f87de31b6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/t_items.qh b/qcsrc/common/t_items.qh index 331d3ac8c..fa78ff4b3 100644 --- a/qcsrc/common/t_items.qh +++ b/qcsrc/common/t_items.qh @@ -67,8 +67,6 @@ bool have_pickup_item(entity this); const float ITEM_RESPAWN_TICKS = 10; -#define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter) - // range: respawntime - respawntimejitter .. respawntime + respawntimejitter #define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS)) // range: 10 .. respawntime + respawntimejitter @@ -86,30 +84,7 @@ void Item_ScheduleRespawn(entity e); void Item_ScheduleInitialRespawn(entity e); -/// \brief Gives health to the player. -/// \param[in,out] player Player to give health to. -/// \param[in] amount Amount of health to give. -/// \return No return. -void GivePlayerHealth(entity player, float amount); - -/// \brief Gives armor to the player. -/// \param[in,out] player Player to give armor to. -/// \param[in] amount Amount of armor to give. -/// \return No return. -void GivePlayerArmor(entity player, float amount); - -/// \brief Gives ammo of the specified type to the player. -/// \param[in,out] player Player to give ammo to. -/// \param[in] type Ammo type property. -/// \param[in] amount Amount of ammo to give. -/// \return No return. -void GivePlayerAmmo(entity player, .float ammotype, float amount); - -float ITEM_MODE_NONE = 0; -float ITEM_MODE_HEALTH = 1; -float ITEM_MODE_ARMOR = 2; -float ITEM_MODE_FUEL = 3; -float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax, float mode); +float Item_GiveAmmoTo(entity item, entity player, int resource_type, float ammomax); float Item_GiveTo(entity item, entity player);