]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/t_items.qc
Use pow() for all scale differences, which should make them much more correct, and...
[voretournament/voretournament.git] / data / qcsrc / server / t_items.qc
index 89e2b808fe7b183a8b3494ce24b1e6ed85aa00b7..d99ff79fe285114d60b1ebf099b5790ab6aa80b0 100644 (file)
@@ -46,7 +46,7 @@ float Item_Customize()
        }\r
        else\r
        {\r
-               if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn\r
+               if(g_ghost_items)\r
                {\r
                        self.colormod = stov(cvar_string("g_ghost_items_color"));\r
                        self.glowmod = self.colormod;\r
@@ -97,7 +97,7 @@ void Item_Show (entity e, float mode)
 \r
                e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon\r
        }\r
-       else if(g_ghost_items && self.respawntime > 0) // if respawntime is -1, this item does not respawn\r
+       else if(g_ghost_items)\r
        {\r
                // make the item translucent green and not touchable\r
                e.model = e.mdl;\r
@@ -144,7 +144,6 @@ void Item_Respawn (void)
                sound (self, CHAN_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);        // play respawn sound\r
        setorigin (self, self.origin);\r
 \r
-       //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);\r
        pointparticles(particleeffectnum("item_respawn"), self.origin + 0.5 * (self.mins + self.maxs), '0 0 0', 1);\r
 }\r
 \r
@@ -210,6 +209,8 @@ void Item_ScheduleRespawn(entity e)
        Item_Show(e, 0);\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
@@ -353,6 +354,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
@@ -623,7 +626,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
@@ -880,7 +883,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
@@ -1326,9 +1329,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