X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_items.qc;h=9f0075afa53756b1f278443e979f7d37bde3c424;hb=78c8c5ce2c81599cde866c96db13ef896c691387;hp=c291e79a009f715fb67e0decc66d0cde175fb809;hpb=6206caf97a69286b25226a8287583e4a4598d19a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index c291e79a0..9f0075afa 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -233,8 +233,13 @@ void Item_ScheduleRespawnIn(entity e, float t) void Item_ScheduleRespawn(entity e) { - Item_Show(e, 0); - Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e)); + if(e.respawntime > 0) + { + Item_Show(e, 0); + Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e)); + } + else // if respawntime is -1, this item does not respawn + Item_Show(e, -1); } void Item_ScheduleInitialRespawn(entity e) @@ -484,6 +489,8 @@ void Item_Touch (void) if(!Item_GiveTo(self, other)) return; + other.last_pickup = time; + pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1); if (self.classname == "droppedweapon") @@ -1047,7 +1054,7 @@ void weapon_defaultspawnfunc(float wpn) { ammofield = Item_CounterField(j); if(!self.ammofield) - self.ammofield = cvar(strcat("g_pickup_", Item_CounterFieldName(j))); + self.ammofield = cvar(strcat("g_pickup_", Item_CounterFieldName(j), "_weapon")); } } } @@ -1192,7 +1199,7 @@ void spawnfunc_item_armor_small (void) { self.max_armorvalue = g_pickup_armorsmall_max; if(!self.pickup_anyway) self.pickup_anyway = g_pickup_armorsmall_anyway; - StartItem ("models/items/g_a1.md3", "misc/armor1.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW); + StartItem ("models/items/item_armor_small.md3", "misc/armor1.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW); } void spawnfunc_item_armor_medium (void) { @@ -1202,7 +1209,7 @@ void spawnfunc_item_armor_medium (void) { self.max_armorvalue = g_pickup_armormedium_max; if(!self.pickup_anyway) self.pickup_anyway = g_pickup_armormedium_anyway; - StartItem ("models/items/g_armormedium.md3", "misc/armor10.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID); + StartItem ("models/items/item_armor_medium.md3", "misc/armor10.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID); } void spawnfunc_item_armor_big (void) { @@ -1212,7 +1219,7 @@ void spawnfunc_item_armor_big (void) { self.max_armorvalue = g_pickup_armorbig_max; if(!self.pickup_anyway) self.pickup_anyway = g_pickup_armorbig_anyway; - StartItem ("models/items/g_a50.md3", "misc/armor17_5.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "50 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000); + StartItem ("models/items/item_armor_big.md3", "misc/armor17_5.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "50 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000); } void spawnfunc_item_armor_large (void) { @@ -1222,7 +1229,7 @@ void spawnfunc_item_armor_large (void) { self.max_armorvalue = g_pickup_armorlarge_max; if(!self.pickup_anyway) self.pickup_anyway = g_pickup_armorlarge_anyway; - StartItem ("models/items/g_a25.md3", "misc/armor25.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH); + StartItem ("models/items/item_armor_large.md3", "misc/armor25.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH); } void spawnfunc_item_health_small (void) {