]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/t_items.qc
Offset player sound volume based on player scale by default
[voretournament/voretournament.git] / data / qcsrc / server / t_items.qc
index f37e3a2dccd215de5c27a31e3c790a4fbd817aff..2ad8336226f2e9f8c01c1efa7cb470087605a8cd 100644 (file)
@@ -208,7 +208,10 @@ void Item_ScheduleRespawnIn(entity e, float t)
 void Item_ScheduleRespawn(entity e)\r
 {\r
        Item_Show(e, 0);\r
-       Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));\r
+       if(e.respawntime > 0) // if respawntime is -1, this item does not respawn\r
+               Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));\r
+       else\r
+               remove(e);\r
 }\r
 \r
 void Item_ScheduleInitialRespawn(entity e)\r
@@ -352,6 +355,8 @@ void Item_Touch (void)
        if(!Item_GiveTo(self, other))\r
                return;\r
 \r
+       other.last_pickup = time;\r
+\r
        pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);\r
 \r
        if (self.classname == "droppedweapon")\r
@@ -622,7 +627,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
 \r
                weaponsInMap |= weaponid;\r
 \r
-               if(g_lms || g_ca)\r
+               if(g_lms)\r
                {\r
                        startitem_failed = TRUE;\r
                        remove(self);\r
@@ -879,7 +884,7 @@ void spawnfunc_item_health_large (void) {
                self.max_health = g_pickup_healthlarge_max;\r
        if(!self.health)\r
                self.health = g_pickup_healthlarge;\r
-       StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);\r
+       StartItem ("models/items/g_h50.md3", "misc/largehealth.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);\r
 }\r
 \r
 void spawnfunc_item_health_mega (void) {\r
@@ -1325,9 +1330,9 @@ float GiveItems(entity e, float beginarg, float endarg)
        }\r
        POSTGIVE_VALUE(e, strength_finished, 1, "misc/powerup.wav", "misc/poweroff.wav");\r
        POSTGIVE_VALUE(e, invincible_finished, 1, "misc/powerup_shield.wav", "misc/poweroff.wav");\r
-       POSTGIVE_VALUE_ROT(e, ammo_fuel, 1, pauserotfuel_finished, cvar("g_balance_pause_fuel_rot"), pauseregen_finished, cvar("g_balance_pause_fuel_regen"), "misc/itempickup.wav", string_null);\r
-       POSTGIVE_VALUE_ROT(e, armorvalue, 1, pauserotarmor_finished, cvar("g_balance_pause_armor_rot"), pauseregen_finished, cvar("g_balance_pause_health_regen"), "misc/armor25.wav", string_null);\r
-       POSTGIVE_VALUE_ROT(e, health, 1, pauserothealth_finished, cvar("g_balance_pause_health_rot"), pauseregen_finished, cvar("g_balance_pause_health_regen"), "misc/megahealth.wav", string_null);\r
+       POSTGIVE_VALUE_ROT(e, ammo_fuel, 1, pauserotfuel_finished, cvar("g_balance_pause_fuel_rot"), pauseregenhealth_finished, cvar("g_balance_pause_fuel_regen"), "misc/itempickup.wav", string_null);\r
+       POSTGIVE_VALUE_ROT(e, armorvalue, 1, pauserotarmor_finished, cvar("g_balance_pause_armor_rot"), pauseregenarmor_finished, cvar("g_balance_pause_armor_regen"), "misc/armor25.wav", string_null);\r
+       POSTGIVE_VALUE_ROT(e, health, 1, pauserothealth_finished, cvar("g_balance_pause_health_rot"), pauseregenhealth_finished, cvar("g_balance_pause_health_regen"), "misc/megahealth.wav", string_null);\r
 \r
        if(e.strength_finished <= 0)\r
                e.strength_finished = 0;\r