Item_ScheduleRespawnIn(e, max(0, game_starttime - time) + ((e.respawntimestart) ? e.respawntimestart : ITEM_RESPAWNTIME_INITIAL(e)));
}
+void GivePlayerHealth(entity player, float amount)
+{
+ if (amount == 0)
+ {
+ return;
+ }
+ player.health = bound(player.health, player.health + amount,
+ g_pickup_healthmega_max);
+ player.pauserothealth_finished = max(player.pauserothealth_finished, time +
+ autocvar_g_balance_pause_health_rot);
+}
+
+void GivePlayerArmor(entity player, float amount)
+{
+ if (amount == 0)
+ {
+ return;
+ }
+ player.armorvalue = bound(player.armorvalue, player.armorvalue + amount,
+ g_pickup_armormega_max);
+ player.pauserotarmor_finished = max(player.pauserotarmor_finished, time +
+ autocvar_g_balance_pause_armor_rot);
+}
+
void GivePlayerShells(entity player, float amount)
{
player.ammo_shells = bound(player.ammo_shells, player.ammo_shells + amount,
void Item_ScheduleInitialRespawn(entity e);
-/// \brief Gives player shells.
+/// \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 shells to the player.
/// \param[in,out] player Player to give shells to.
/// \param[in] amount Amount of shells to give.
/// \return No return.
void GivePlayerShells(entity player, float amount);
-/// \brief Gives player bullets.
+/// \brief Gives bullets to the player.
/// \param[in,out] player Player to give bullets to.
/// \param[in] amount Amount of bullets to give.
/// \return No return.
void GivePlayerBullets(entity player, float amount);
-/// \brief Gives player rockets.
+/// \brief Gives rockets to the player.
/// \param[in,out] player Player to give rockets to.
/// \param[in] amount Amount of rockets to give.
/// \return No return.
void GivePlayerRockets(entity player, float amount);
-/// \brief Gives player cells.
+/// \brief Gives cells to the player.
/// \param[in,out] player Player to give cells to.
/// \param[in] amount Amount of cells to give.
/// \return No return.