1 #define ITEM_RESPAWN_TICKS 10
3 #define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter)
4 // range: respawntime - respawntimejitter .. respawntime + respawntimejitter
5 #define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS))
6 // range: 10 .. respawntime + respawntimejitter
8 floatfield Item_CounterField(float it)
12 case IT_SHELLS: return ammo_shells;
13 case IT_NAILS: return ammo_nails;
14 case IT_ROCKETS: return ammo_rockets;
15 case IT_CELLS: return ammo_cells;
16 case IT_FUEL: return ammo_fuel;
17 case IT_5HP: return health;
18 case IT_25HP: return health;
19 case IT_HEALTH: return health;
20 case IT_ARMOR_SHARD: return armorvalue;
21 case IT_ARMOR: return armorvalue;
22 // add more things here (health, armor)
23 default: error("requested item has no counter field");
27 string Item_CounterFieldName(float it)
31 case IT_SHELLS: return "shells";
32 case IT_NAILS: return "nails";
33 case IT_ROCKETS: return "rockets";
34 case IT_CELLS: return "cells";
35 case IT_FUEL: return "fuel";
37 // add more things here (health, armor)
38 default: error("requested item has no counter field name");
42 .float max_armorvalue;
44 float Item_Customize()
46 if(self.spawnshieldtime)
48 if(self.weapons != (self.weapons & other.weapons))
55 void Item_Show (entity e, float mode)
57 e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT;
60 // make the item look normal, and be touchable
62 e.solid = SOLID_TRIGGER;
63 //e.colormod = '0 0 0';
65 e.customizeentityforclient = func_null;
67 e.spawnshieldtime = 1;
71 // hide the item completely
72 e.model = string_null;
74 //e.colormod = '0 0 0';
76 e.customizeentityforclient = func_null;
78 e.spawnshieldtime = 1;
80 else if((e.flags & FL_WEAPON) && (g_weapon_stay == 3))
82 // make the item translucent green and not touchable
84 e.solid = SOLID_TRIGGER; // can STILL be picked up!
85 e.effects |= EF_STARDUST;
86 //e.colormod = '0.2 1 0.2';
88 e.customizeentityforclient = Item_Customize;
90 e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon
94 // make the item translucent green and not touchable
97 //e.colormod = '0.2 1 0.2';
99 e.customizeentityforclient = func_null;
101 e.spawnshieldtime = 1;
104 if (e.strength_finished || e.invincible_finished)
105 e.effects |= EF_ADDITIVE | EF_FULLBRIGHT;
106 if (cvar("g_fullbrightitems"))
107 e.effects |= EF_FULLBRIGHT;
109 // relink entity (because solid may have changed)
110 setorigin(e, e.origin);
113 void Item_Respawn (void)
116 if(!g_minstagib && self.items == IT_STRENGTH)
117 sound (self, CHAN_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
118 else if(!g_minstagib && self.items == IT_INVINCIBLE)
119 sound (self, CHAN_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
121 sound (self, CHAN_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
122 setorigin (self, self.origin);
124 //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
125 pointparticles(particleeffectnum("item_respawn"), self.origin + 0.5 * (self.mins + self.maxs), '0 0 0', 1);
128 void Item_RespawnCountdown (void)
130 if(self.count >= ITEM_RESPAWN_TICKS)
132 if(self.waypointsprite_attached)
133 WaypointSprite_Kill(self.waypointsprite_attached);
138 self.nextthink = time + 1;
149 case IT_STRENGTH: name = "item-invis"; rgb = '0 0 1'; break;
150 case IT_NAILS: name = "item-extralife"; rgb = '1 0 0'; break;
151 case IT_INVINCIBLE: name = "item-speed"; rgb = '1 0 1'; break;
158 case IT_STRENGTH: name = "item-strength"; rgb = '0 0 1'; break;
159 case IT_INVINCIBLE: name = "item-shield"; rgb = '1 0 1'; break;
164 case IT_FUEL_REGEN: name = "item-fuelregen"; rgb = '1 0.5 0'; break;
165 case IT_JETPACK: name = "item-jetpack"; rgb = '0.5 0.5 0.5'; break;
169 WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE);
170 if(self.waypointsprite_attached)
172 WaypointSprite_UpdateTeamRadar(self.waypointsprite_attached, RADARICON_POWERUP, rgb);
173 //WaypointSprite_UpdateMaxHealth(self.waypointsprite_attached, ITEM_RESPAWN_TICKS + 1);
174 WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS);
178 sound (self, CHAN_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM); // play respawn sound
179 if(self.waypointsprite_attached)
181 WaypointSprite_Ping(self.waypointsprite_attached);
182 //WaypointSprite_UpdateHealth(self.waypointsprite_attached, self.count);
187 void Item_ScheduleRespawnIn(entity e, float t)
189 if(e.flags & FL_POWERUP)
191 e.think = Item_RespawnCountdown;
192 e.nextthink = time + max(0, t - ITEM_RESPAWN_TICKS);
197 e.think = Item_Respawn;
198 e.nextthink = time + t;
202 void Item_ScheduleRespawn(entity e)
205 Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));
208 void Item_ScheduleInitialRespawn(entity e)
211 Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e));
214 float Item_GiveTo(entity item, entity player)
222 // if nothing happens to player, just return without taking the item
224 _switchweapon = FALSE;
228 if(item.spawnshieldtime)
231 if (player.ammo_fuel < g_pickup_fuel_max)
234 player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
235 player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
237 if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
241 sprint (player, strcat("You got the ^2", item.netname, "\n"));
244 _switchweapon = TRUE;
248 // play some cool sounds ;)
249 centerprint(player, "\n");
250 if (clienttype(player) == CLIENTTYPE_REAL)
252 if(player.health <= 5)
253 play2(player, "announcer/robotic/lastsecond.wav");
254 else if(player.health < 50)
255 play2(player, "announcer/robotic/narrowly.wav");
257 // sound not available
258 // else if(item.items == IT_CELLS)
259 // play2(player, "announce/robotic/ammo.wav");
261 if (item.weapons & WEPBIT_MINSTANEX)
262 W_GiveWeapon (player, WEP_MINSTANEX, "Nex");
264 player.ammo_cells = min (player.ammo_cells + cvar("g_minstagib_ammo_drop"), 999);
272 // sound not available
273 // play2(player, "announce/robotic/extra.ogg\nplay2 announce/robotic/_lives.wav");
274 player.armorvalue = player.armorvalue + cvar("g_minstagib_extralives");
275 sprint(player, "^3You picked up some extra lives\n");
279 if (item.strength_finished)
282 // sound not available
283 // play2(player, "announce/robotic/invisible.wav");
284 player.strength_finished = max(player.strength_finished, time) + cvar("g_balance_powerup_strength_time");
288 if (item.invincible_finished)
291 // sound not available
292 // play2(player, "announce/robotic/speed.wav");
293 player.invincible_finished = max(player.invincible_finished, time) + cvar("g_balance_powerup_strength_time");
297 if (player.ammo_fuel < g_pickup_fuel_max)
300 player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
301 player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
307 if (g_weapon_stay == 1)
308 if not(item.flags & FL_NO_WEAPON_STAY)
309 if (item.flags & FL_WEAPON)
311 if(item.classname == "droppedweapon")
313 if (player.weapons & item.weapons) // don't let players stack ammo by tossing weapons
318 if (player.weapons & item.weapons)
323 // in case the player has autoswitch enabled do the following:
324 // if the player is using their best weapon before items are given, they
325 // probably want to switch to an even better weapon after items are given
326 if (player.autoswitch)
327 if (player.switchweapon == w_getbestweapon(player))
328 _switchweapon = TRUE;
330 if not(player.weapons & W_WeaponBit(player.switchweapon))
331 _switchweapon = TRUE;
333 if(item.spawnshieldtime)
335 if (item.ammo_shells)
336 if (player.ammo_shells < g_pickup_shells_max)
339 player.ammo_shells = min (player.ammo_shells + item.ammo_shells, g_pickup_shells_max);
342 if (player.ammo_nails < g_pickup_nails_max)
345 player.ammo_nails = min (player.ammo_nails + item.ammo_nails, g_pickup_nails_max);
347 if (item.ammo_rockets)
348 if (player.ammo_rockets < g_pickup_rockets_max)
351 player.ammo_rockets = min (player.ammo_rockets + item.ammo_rockets, g_pickup_rockets_max);
354 if (player.ammo_cells < g_pickup_cells_max)
357 player.ammo_cells = min (player.ammo_cells + item.ammo_cells, g_pickup_cells_max);
360 if (player.ammo_fuel < g_pickup_fuel_max)
363 player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
364 player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
368 if (item.flags & FL_WEAPON)
369 if ((it = item.weapons - (item.weapons & player.weapons)))
372 for(i = WEP_FIRST; i <= WEP_LAST; ++i)
374 e = get_weaponinfo(i);
376 W_GiveWeapon (player, e.weapon, item.netname);
380 if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
384 sprint (player, strcat("You got the ^2", item.netname, "\n"));
387 if(item.spawnshieldtime)
389 if (item.strength_finished)
392 player.strength_finished = max(player.strength_finished, time) + cvar("g_balance_powerup_strength_time");
394 if (item.invincible_finished)
397 player.invincible_finished = max(player.invincible_finished, time) + cvar("g_balance_powerup_invincible_time");
399 //if (item.speed_finished)
402 // player.speed_finished = max(player.speed_finished, time) + cvar("g_balance_powerup_speed_time");
404 //if (item.slowmo_finished)
407 // player.slowmo_finished = max(player.slowmo_finished, time) + (cvar("g_balance_powerup_slowmo_time") * cvar("g_balance_powerup_slowmo_speed"));
411 if (player.health < item.max_health)
414 player.health = min(player.health + item.health, item.max_health);
415 player.pauserothealth_finished = max(player.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
418 if (player.armorvalue < item.max_armorvalue)
421 player.armorvalue = min(player.armorvalue + item.armorvalue, item.max_armorvalue);
422 player.pauserotarmor_finished = max(player.pauserotarmor_finished, time + cvar("g_balance_pause_armor_rot"));
428 // always eat teamed entities
435 sound (player, CHAN_AUTO, item.item_pickupsound, VOL_BASE, ATTN_NORM);
437 if (player.switchweapon != w_getbestweapon(player))
438 W_SwitchWeapon_Force(player, w_getbestweapon(player));
443 void Item_Touch (void)
447 // remove the item if it's currnetly in a NODROP brush or hits a NOIMPACT surface (such as sky)
448 if (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
453 if (other.classname != "player")
457 if (self.solid != SOLID_TRIGGER)
459 if (self.owner == other)
462 if(!Item_GiveTo(self, other))
465 pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
467 if (self.classname == "droppedweapon")
469 else if not(self.spawnshieldtime)
471 else if((self.flags & FL_WEAPON) && !(self.flags & FL_NO_WEAPON_STAY) && (g_weapon_stay == 1 || g_weapon_stay == 2))
477 RandomSelection_Init();
478 for(head = world; (head = findfloat(head, team, self.team)); )
480 if(head.flags & FL_ITEM)
483 RandomSelection_Add(head, 0, string_null, head.cnt, 0);
486 e = RandomSelection_chosen_ent;
490 Item_ScheduleRespawn(e);
498 if(self.effects & EF_NODRAW)
500 // marker for item team search
501 dprint("Initializing item team ", ftos(self.team), "\n");
502 RandomSelection_Init();
503 for(head = world; (head = findfloat(head, team, self.team)); ) if(head.flags & FL_ITEM)
504 RandomSelection_Add(head, 0, string_null, head.cnt, 0);
505 e = RandomSelection_chosen_ent;
509 for(head = world; (head = findfloat(head, team, self.team)); ) if(head.flags & FL_ITEM)
513 // make it a non-spawned item
515 head.state = 1; // state 1 = initially hidden item
517 head.effects &~= EF_NODRAW;
520 if(e.flags & FL_POWERUP) // do not spawn powerups initially!
521 Item_ScheduleInitialRespawn(e);
527 Item_Show(self, !self.state);
528 setorigin (self, self.origin);
529 self.think = SUB_Null;
532 if(self.flags & FL_POWERUP) // do not spawn powerups initially!
533 Item_ScheduleInitialRespawn(self);
536 // Savage: used for item garbage-collection
537 // TODO: perhaps nice special effect?
538 void RemoveItem(void)
543 // pickup evaluation functions
544 // these functions decide how desirable an item is to the bots
546 float generic_pickupevalfunc(entity player, entity item) {return item.bot_pickupbasevalue;};
548 float weapon_pickupevalfunc(entity player, entity item)
550 float c, i, j, position;
552 // See if I have it already
553 if(player.weapons & item.weapons == item.weapons)
555 // If I can pick it up
556 if(g_weapon_stay == 1 || g_weapon_stay == 2 || !item.spawnshieldtime)
558 else if(player.ammo_cells || player.ammo_shells || player.ammo_nails || player.ammo_rockets)
560 // Skilled bots will grab more
561 c = bound(0, skill / 10, 1) * 0.5;
569 // If custom weapon priorities for bots is enabled rate most wanted weapons higher
570 if( bot_custom_weapon && c )
572 for(i = WEP_FIRST; i < WEP_LAST ; ++i)
575 if( (get_weaponinfo(i)).weapons & item.weapons != item.weapons )
578 // Find the highest position on any range
580 for(j = 0; j < WEP_LAST ; ++j){
582 bot_weapons_far[j] == i ||
583 bot_weapons_mid[j] == i ||
584 bot_weapons_close[j] == i
595 position = WEP_LAST - position;
596 // item.bot_pickupbasevalue is overwritten here
597 return (BOT_PICKUP_RATING_LOW + ( (BOT_PICKUP_RATING_HIGH - BOT_PICKUP_RATING_LOW) * (position / WEP_LAST ))) * c;
602 return item.bot_pickupbasevalue * c;
605 float commodity_pickupevalfunc(entity player, entity item)
607 float c, i, need_shells, need_nails, need_rockets, need_cells;
611 // Detect needed ammo
612 for(i = WEP_FIRST; i < WEP_LAST ; ++i)
614 wi = get_weaponinfo(i);
616 if not(wi.weapons & player.weapons)
619 if(wi.items & IT_SHELLS)
621 else if(wi.items & IT_NAILS)
623 else if(wi.items & IT_ROCKETS)
625 else if(wi.items & IT_CELLS)
629 // TODO: figure out if the player even has the weapon this ammo is for?
630 // may not affect strategy much though...
631 // find out how much more ammo/armor/health the player can hold
633 if (item.ammo_shells)
634 if (player.ammo_shells < g_pickup_shells_max)
635 c = c + max(0, 1 - player.ammo_shells / g_pickup_shells_max);
638 if (player.ammo_nails < g_pickup_nails_max)
639 c = c + max(0, 1 - player.ammo_nails / g_pickup_nails_max);
641 if (item.ammo_rockets)
642 if (player.ammo_rockets < g_pickup_rockets_max)
643 c = c + max(0, 1 - player.ammo_rockets / g_pickup_rockets_max);
646 if (player.ammo_cells < g_pickup_cells_max)
647 c = c + max(0, 1 - player.ammo_cells / g_pickup_cells_max);
649 if (player.armorvalue < item.max_armorvalue*0.5)
650 c = c + max(0, 1 - player.armorvalue / (item.max_armorvalue*0.5));
652 if (player.health < item.max_health*0.5)
653 c = c + max(0, 1 - player.health / (item.max_health*0.5));
655 return item.bot_pickupbasevalue * c;
660 void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, float defaultrespawntimejitter, string itemname, float itemid, float weaponid, float itemflags, float(entity player, entity item) pickupevalfunc, float pickupbasevalue)
662 startitem_failed = FALSE;
664 // is it a dropped weapon?
665 if (self.classname == "droppedweapon")
667 self.reset = SUB_Remove;
668 // it's a dropped weapon
669 self.movetype = MOVETYPE_TOSS;
670 // Savage: remove thrown items after a certain period of time ("garbage collection")
671 self.think = RemoveItem;
672 self.nextthink = time + 60;
673 // don't drop if in a NODROP zone (such as lava)
674 traceline(self.origin, self.origin, MOVE_NORMAL, self);
675 if (trace_dpstartcontents & DPCONTENTS_NODROP)
677 startitem_failed = TRUE;
684 self.reset = Item_Reset;
686 if(self.spawnflags & 1)
689 self.movetype = MOVETYPE_NONE;
691 self.movetype = MOVETYPE_TOSS;
692 // do item filtering according to game mode and other things
695 // first nudge it off the floor a little bit to avoid math errors
696 setorigin(self, self.origin + '0 0 1');
697 // set item size before we spawn a spawnfunc_waypoint
698 if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
699 setsize (self, '-16 -16 0', '16 16 48');
701 setsize (self, '-16 -16 0', '16 16 32');
702 // note droptofloor returns FALSE if stuck/or would fall too far
704 waypoint_spawnforitem(self);
711 print("removed non-teamplay ", self.classname, "\n");
712 startitem_failed = TRUE;
721 print("removed non-FFA ", self.classname, "\n");
722 startitem_failed = TRUE;
730 // We aren't TA or something like that, so we keep the Q3A entities
731 print("removed non-Q3A ", self.classname, "\n");
732 startitem_failed = TRUE;
738 * can't do it that way, as it would break maps
739 * TODO make a target_give like entity another way, that perhaps has
740 * the weapon name in a key
743 // target_give not yet supported; maybe later
744 print("removed targeted ", self.classname, "\n");
745 startitem_failed = TRUE;
751 if(cvar("spawn_debug") >= 2)
754 for(otheritem = findradius(self.origin, 3); otheritem; otheritem = otheritem.chain)
756 if(otheritem.is_item)
758 dprint("XXX Found duplicated item: ", itemname, vtos(self.origin));
759 dprint(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
760 error("Mapper sucks.");
766 weaponsInMap |= weaponid;
770 startitem_failed = TRUE;
774 else if (g_weaponarena && ((weaponid & WEPBIT_ALL) || (itemid & IT_AMMO)))
776 startitem_failed = TRUE;
780 else if (g_minstagib)
782 // don't remove dropped items and powerups
783 if (self.classname != "minstagib")
785 startitem_failed = TRUE;
802 if (cvar("g_nixnex_with_healtharmor"))
807 if (cvar("g_nixnex_with_powerups"))
814 startitem_failed = TRUE;
819 else if (!cvar("g_pickup_items") && itemid != IT_STRENGTH && itemid != IT_INVINCIBLE && itemid != IT_HEALTH)
821 startitem_failed = TRUE;
826 precache_model (itemmodel);
827 precache_sound (pickupsound);
828 precache_sound ("misc/itemrespawn.wav");
829 precache_sound ("misc/itemrespawncountdown.wav");
831 if(itemid == IT_STRENGTH)
832 precache_sound ("misc/strength_respawn.wav");
833 if(itemid == IT_INVINCIBLE)
834 precache_sound ("misc/shield_respawn.wav");
836 if((itemid & (IT_STRENGTH | IT_INVINCIBLE | IT_HEALTH | IT_ARMOR | IT_KEY1 | IT_KEY2)) || (weaponid & WEPBIT_ALL))
837 self.target = "###item###"; // for finding the nearest item using find()
840 self.bot_pickup = TRUE;
841 self.bot_pickupevalfunc = pickupevalfunc;
842 self.bot_pickupbasevalue = pickupbasevalue;
843 self.mdl = itemmodel;
844 self.item_pickupsound = pickupsound;
845 // let mappers override respawntime
846 if(!self.respawntime) // both set
848 self.respawntime = defaultrespawntime;
849 self.respawntimejitter = defaultrespawntimejitter;
851 self.netname = itemname;
853 self.weapons = weaponid;
854 self.flags = FL_ITEM | itemflags;
855 self.touch = Item_Touch;
856 setmodel (self, self.mdl); // precision set below
857 self.effects |= EF_LOWPRECISION;
858 if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
859 setsize (self, '-16 -16 0', '16 16 48');
861 setsize (self, '-16 -16 0', '16 16 32');
862 if(itemflags & FL_WEAPON)
863 self.modelflags |= MF_ROTATE;
865 if (self.classname != "droppedweapon") // if dropped, colormap is already set up nicely
866 if (itemflags & FL_WEAPON)
868 // neutral team color for pickup weapons
869 self.colormap = 1024; // color shirt=0 pants=0 grey
877 self.cnt = 1; // item probability weight
878 self.effects = self.effects | EF_NODRAW; // marker for item team search
879 InitializeEntity(self, Item_FindTeam, INITPRIO_FINDTARGET);
881 else if(self.flags & FL_POWERUP) // do not spawn powerups initially!
882 Item_ScheduleInitialRespawn(self);
885 /* replace items in minstagib
886 * IT_STRENGTH = invisibility
887 * IT_NAILS = extra lives
888 * IT_INVINCIBLE = speed
890 void minstagib_items (float itemid)
892 // we don't want to replace dropped weapons ;)
893 if (self.classname == "droppedweapon")
895 self.ammo_cells = 25;
896 StartItem ("models/weapons/g_nex.md3",
897 "weapons/weaponpickup.wav", 15, 0,
898 "MinstaNex", 0, WEPBIT_MINSTANEX, FL_WEAPON, generic_pickupevalfunc, 1000);
903 self.classname = "minstagib";
905 // replace rocket launchers and nex guns with ammo cells
906 if (itemid == IT_CELLS)
909 StartItem ("models/items/a_cells.md3",
910 "misc/itempickup.wav", 45, 0,
911 "Nex Ammo", IT_CELLS, 0, 0, generic_pickupevalfunc, 100);
918 itemid = IT_STRENGTH;
922 itemid = IT_INVINCIBLE;
924 // replace with invis
925 if (itemid == IT_STRENGTH)
927 self.strength_finished = 30;
928 StartItem ("models/items/g_strength.md3",
929 "misc/powerup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
930 "Invisibility", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_MID);
932 // replace with extra lives
933 if (itemid == IT_NAILS)
936 StartItem ("models/items/g_h100.md3",
937 "misc/megahealth.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
938 "Extralife", IT_NAILS, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
941 // replace with speed
942 if (itemid == IT_INVINCIBLE)
944 self.invincible_finished = 30;
945 StartItem ("models/items/g_invincible.md3",
946 "misc/powerup_shield.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
947 "Speed", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_MID);
952 float minst_no_auto_cells;
953 void minst_remove_item (void) {
954 if(minst_no_auto_cells)
958 float weaponswapping;
961 void weapon_defaultspawnfunc(float wpn)
965 var .float ammofield;
970 // set the respawntime in advance (so replaced weapons can copy it)
972 if(!self.respawntime)
974 e = get_weaponinfo(wpn);
975 if(e.items == IT_SUPERWEAPON)
977 self.respawntime = g_pickup_respawntime_powerup;
978 self.respawntimejitter = g_pickup_respawntimejitter_powerup;
982 self.respawntime = g_pickup_respawntime_weapon;
983 self.respawntimejitter = g_pickup_respawntimejitter_weapon;
987 if(self.classname != "droppedweapon" && self.classname != "replacedweapon")
989 e = get_weaponinfo(wpn);
990 s = cvar_string(strcat("g_weaponreplace_", e.netname));
994 startitem_failed = TRUE;
997 t = tokenize_console(s);
1000 self.team = --internalteam;
1002 for(i = 1; i < t; ++i)
1005 for(j = WEP_FIRST; j <= WEP_LAST; ++j)
1007 e = get_weaponinfo(j);
1011 copyentity(oldself, self);
1012 self.classname = "replacedweapon";
1013 weapon_defaultspawnfunc(j);
1019 print("The weapon replace list for ", oldself.classname, " contains an unknown weapon ", s, ". Skipped.\n");
1028 for(j = WEP_FIRST; j <= WEP_LAST; ++j)
1030 e = get_weaponinfo(j);
1039 print("The weapon replace list for ", self.classname, " contains an unknown weapon ", s, ". Skipped.\n");
1045 startitem_failed = TRUE;
1050 e = get_weaponinfo(wpn);
1052 if(e.items && e.items != IT_SUPERWEAPON)
1054 for(i = 0, j = 1; i < 24; ++i, j *= 2)
1058 ammofield = Item_CounterField(j);
1060 self.ammofield = cvar(strcat("g_pickup_", Item_CounterFieldName(j)));
1066 self.flags |= FL_NO_WEAPON_STAY;
1069 // weapon stay isn't supported for teamed weapons
1071 self.flags |= FL_NO_WEAPON_STAY;
1073 if(g_weapon_stay == 2 && self.classname != "droppedweapon")
1075 self.ammo_shells = 0;
1076 self.ammo_nails = 0;
1077 self.ammo_cells = 0;
1078 self.ammo_rockets = 0;
1079 // weapon stay 2: don't use ammo on weapon pickups; instead
1080 // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*
1083 StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);
1084 if (self.modelindex) // don't precache if self was removed
1085 weapon_action(e.weapon, WR_PRECACHE);
1088 void spawnfunc_weapon_shotgun (void);
1089 void spawnfunc_weapon_uzi (void) {
1090 if(q3acompat_machineshotgunswap)
1091 if(self.classname != "droppedweapon")
1093 weapon_defaultspawnfunc(WEP_SHOTGUN);
1096 weapon_defaultspawnfunc(WEP_UZI);
1099 void spawnfunc_weapon_shotgun (void) {
1100 if(q3acompat_machineshotgunswap)
1101 if(self.classname != "droppedweapon")
1103 weapon_defaultspawnfunc(WEP_UZI);
1106 weapon_defaultspawnfunc(WEP_SHOTGUN);
1109 void spawnfunc_weapon_nex (void)
1113 minstagib_items(IT_CELLS);
1114 self.think = minst_remove_item;
1115 self.nextthink = time;
1118 weapon_defaultspawnfunc(WEP_NEX);
1121 void spawnfunc_weapon_minstanex (void)
1125 minstagib_items(IT_CELLS);
1126 self.think = minst_remove_item;
1127 self.nextthink = time;
1130 weapon_defaultspawnfunc(WEP_MINSTANEX);
1133 void spawnfunc_weapon_rocketlauncher (void)
1137 minstagib_items(IT_CELLS);
1138 self.think = minst_remove_item;
1139 self.nextthink = time;
1142 weapon_defaultspawnfunc(WEP_ROCKET_LAUNCHER);
1145 void spawnfunc_item_rockets (void) {
1146 if(!self.ammo_rockets)
1147 self.ammo_rockets = g_pickup_rockets;
1148 StartItem ("models/items/a_rockets.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "rockets", IT_ROCKETS, 0, 0, commodity_pickupevalfunc, 3000);
1151 void spawnfunc_item_shells (void);
1152 void spawnfunc_item_bullets (void) {
1154 if(q3acompat_machineshotgunswap)
1155 if(self.classname != "droppedweapon")
1157 weaponswapping = TRUE;
1158 spawnfunc_item_shells();
1159 weaponswapping = FALSE;
1163 if(!self.ammo_nails)
1164 self.ammo_nails = g_pickup_nails;
1165 StartItem ("models/items/a_bullets.mdl", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "bullets", IT_NAILS, 0, 0, commodity_pickupevalfunc, 2000);
1168 void spawnfunc_item_cells (void) {
1169 if(!self.ammo_cells)
1170 self.ammo_cells = g_pickup_cells;
1171 StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "cells", IT_CELLS, 0, 0, commodity_pickupevalfunc, 2000);
1174 void spawnfunc_item_shells (void) {
1176 if(q3acompat_machineshotgunswap)
1177 if(self.classname != "droppedweapon")
1179 weaponswapping = TRUE;
1180 spawnfunc_item_bullets();
1181 weaponswapping = FALSE;
1185 if(!self.ammo_shells)
1186 self.ammo_shells = g_pickup_shells;
1187 StartItem ("models/items/a_shells.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "shells", IT_SHELLS, 0, 0, commodity_pickupevalfunc, 500);
1190 void spawnfunc_item_armor_small (void) {
1191 if(!self.armorvalue)
1192 self.armorvalue = g_pickup_armorsmall;
1193 if(!self.max_armorvalue)
1194 self.max_armorvalue = g_pickup_armorsmall_max;
1195 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);
1198 void spawnfunc_item_armor_medium (void) {
1199 if(!self.armorvalue)
1200 self.armorvalue = g_pickup_armormedium;
1201 if(!self.max_armorvalue)
1202 self.max_armorvalue = g_pickup_armormedium_max;
1203 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);
1206 void spawnfunc_item_armor_big (void) {
1207 if(!self.armorvalue)
1208 self.armorvalue = g_pickup_armorbig;
1209 if(!self.max_armorvalue)
1210 self.max_armorvalue = g_pickup_armorbig_max;
1211 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);
1214 void spawnfunc_item_armor_large (void) {
1215 if(!self.armorvalue)
1216 self.armorvalue = g_pickup_armorlarge;
1217 if(!self.max_armorvalue)
1218 self.max_armorvalue = g_pickup_armorlarge_max;
1219 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);
1222 void spawnfunc_item_health_small (void) {
1223 if(!self.max_health)
1224 self.max_health = g_pickup_healthsmall_max;
1226 self.health = g_pickup_healthsmall;
1227 StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Health", IT_5HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
1230 void spawnfunc_item_health_medium (void) {
1231 if(!self.max_health)
1232 self.max_health = g_pickup_healthmedium_max;
1234 self.health = g_pickup_healthmedium;
1235 StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "25 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
1238 void spawnfunc_item_health_large (void) {
1239 if(!self.max_health)
1240 self.max_health = g_pickup_healthlarge_max;
1242 self.health = g_pickup_healthlarge;
1243 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);
1246 void spawnfunc_item_health_mega (void) {
1247 if(!cvar("g_powerup_superhealth"))
1250 if(g_arena && !cvar("g_arena_powerups"))
1254 minstagib_items(IT_NAILS);
1256 if(!self.max_health)
1257 self.max_health = g_pickup_healthmega_max;
1259 self.health = g_pickup_healthmega;
1260 StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
1264 // support old misnamed entities
1265 void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); } // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
1266 void spawnfunc_item_armor25() { spawnfunc_item_armor_large(); }
1267 void spawnfunc_item_health1() { spawnfunc_item_health_small(); }
1268 void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
1269 void spawnfunc_item_health100() { spawnfunc_item_health_mega(); }
1271 void spawnfunc_item_strength (void) {
1272 if(!cvar("g_powerup_strength"))
1275 if(g_arena && !cvar("g_arena_powerups"))
1279 minstagib_items(IT_STRENGTH);
1281 precache_sound("weapons/strength_fire.wav");
1282 self.strength_finished = 30;
1283 StartItem ("models/items/g_strength.md3", "misc/powerup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Strength Powerup", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
1287 void spawnfunc_item_invincible (void) {
1288 if(!cvar("g_powerup_shield"))
1291 if(g_arena && !cvar("g_arena_powerups"))
1295 minstagib_items(IT_INVINCIBLE);
1297 self.invincible_finished = 30;
1298 StartItem ("models/items/g_invincible.md3", "misc/powerup_shield.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Shield", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
1302 void spawnfunc_item_minst_cells (void) {
1305 minst_no_auto_cells = 1;
1306 minstagib_items(IT_CELLS);
1313 void spawnfunc_item_quad (void) {self.classname = "item_strength";spawnfunc_item_strength();}
1315 float target_item_func_set(float a, float b)
1325 float target_item_func_min(float a, float b)
1335 float target_item_func_max(float a, float b)
1340 float target_item_func_bitset(float a, float b)
1345 float target_item_func_and(float a, float b)
1350 float target_item_func_itembitset(float a, float b)
1352 return (a - (a & (IT_PICKUPMASK | IT_STRENGTH | IT_INVINCIBLE))) | b;
1355 float target_item_func_itemand(float a, float b)
1357 return (a - (a & (IT_PICKUPMASK | IT_STRENGTH | IT_INVINCIBLE))) | (a & b);
1360 float target_item_func_or(float a, float b)
1365 float target_item_func_andnot(float a, float b)
1370 float target_item_changed;
1371 void target_item_change(float binary, .float field, float(float a, float b) func, string sound_increase, string sound_decrease)
1374 n = func(activator.field, self.field);
1378 d = n & activator.field;
1379 if(d != n) // bits added?
1381 else if(d != activator.field) // bits removed?
1387 d = n - activator.field;
1391 if(sound_decrease != "")
1392 sound (activator, CHAN_AUTO, sound_decrease, VOL_BASE, ATTN_NORM);
1393 target_item_changed = 1;
1397 if(sound_increase != "")
1398 sound (activator, CHAN_AUTO, sound_increase, VOL_BASE, ATTN_NORM);
1399 target_item_changed = 1;
1401 activator.field = n;
1404 void target_items_use (void)
1408 if(activator.classname == "droppedweapon")
1415 if(activator.classname != "player")
1417 if(activator.deadflag != DEAD_NO)
1422 for(e = world; (e = find(e, classname, "droppedweapon")); )
1423 if(e.enemy == activator)
1426 float _switchweapon;
1427 _switchweapon = FALSE;
1428 if (activator.autoswitch)
1429 if (activator.switchweapon == w_getbestweapon(activator))
1430 _switchweapon = TRUE;
1432 a0 = activator.armorvalue;
1433 h0 = activator.health;
1434 f0 = activator.ammo_fuel;
1435 target_item_changed = 0;
1437 if(self.spawnflags == 0) // SET
1439 target_item_change(0, ammo_shells, target_item_func_set, "misc/itempickup.wav", "");
1440 target_item_change(0, ammo_nails, target_item_func_set, "misc/itempickup.wav", "");
1441 target_item_change(0, ammo_rockets, target_item_func_set, "misc/itempickup.wav", "");
1442 target_item_change(0, ammo_cells, target_item_func_set, "misc/itempickup.wav", "");
1443 target_item_change(0, ammo_fuel, target_item_func_set, "misc/itempickup.wav", "");
1444 target_item_change(0, health, target_item_func_set, "misc/megahealth.wav", "");
1445 target_item_change(0, armorvalue, target_item_func_set, "misc/armor25.wav", "");
1446 target_item_change(1, items, target_item_func_itembitset, "misc/powerup.wav", "misc/poweroff.wav");
1447 target_item_change(1, weapons, target_item_func_bitset, "weapons/weaponpickup.wav", "");
1449 if((self.items & activator.items) & IT_STRENGTH)
1450 activator.strength_finished = time + self.strength_finished;
1451 if((self.items & activator.items) & IT_INVINCIBLE)
1452 activator.invincible_finished = time + self.invincible_finished;
1454 else if(self.spawnflags == 1) // AND/MIN
1456 target_item_change(0, ammo_shells, target_item_func_min, "misc/itempickup.wav", "");
1457 target_item_change(0, ammo_nails, target_item_func_min, "misc/itempickup.wav", "");
1458 target_item_change(0, ammo_rockets, target_item_func_min, "misc/itempickup.wav", "");
1459 target_item_change(0, ammo_cells, target_item_func_min, "misc/itempickup.wav", "");
1460 target_item_change(0, ammo_fuel, target_item_func_min, "misc/itempickup.wav", "");
1461 target_item_change(0, health, target_item_func_min, "misc/megahealth.wav", "");
1462 target_item_change(0, armorvalue, target_item_func_min, "misc/armor25.wav", "");
1463 target_item_change(1, items, target_item_func_itemand, "misc/powerup.wav", "misc/poweroff.wav");
1464 target_item_change(1, weapons, target_item_func_and, "weapons/weaponpickup.wav", "");
1466 if((self.items & activator.items) & IT_STRENGTH)
1467 activator.strength_finished = min(activator.strength_finished, time + self.strength_finished);
1468 if((self.items & activator.items) & IT_INVINCIBLE)
1469 activator.invincible_finished = min(activator.invincible_finished, time + self.invincible_finished);
1471 else if(self.spawnflags == 2) // OR/MAX
1473 target_item_change(0, ammo_shells, target_item_func_max, "misc/itempickup.wav", "");
1474 target_item_change(0, ammo_nails, target_item_func_max, "misc/itempickup.wav", "");
1475 target_item_change(0, ammo_rockets, target_item_func_max, "misc/itempickup.wav", "");
1476 target_item_change(0, ammo_cells, target_item_func_max, "misc/itempickup.wav", "");
1477 target_item_change(0, ammo_fuel, target_item_func_max, "misc/itempickup.wav", "");
1478 target_item_change(0, health, target_item_func_max, "misc/megahealth.wav", "");
1479 target_item_change(0, armorvalue, target_item_func_max, "misc/armor25.wav", "");
1480 target_item_change(1, items, target_item_func_or, "misc/powerup.wav", "misc/poweroff.wav");
1481 target_item_change(1, weapons, target_item_func_or, "weapons/weaponpickup.wav", "");
1483 if((self.items & activator.items) & IT_STRENGTH)
1484 activator.strength_finished = max(activator.strength_finished, time + self.strength_finished);
1485 if((self.items & activator.items) & IT_INVINCIBLE)
1486 activator.invincible_finished = max(activator.invincible_finished, time + self.invincible_finished);
1488 else if(self.spawnflags == 4) // ANDNOT/MIN
1490 target_item_change(0, ammo_shells, target_item_func_min, "misc/itempickup.wav", "");
1491 target_item_change(0, ammo_nails, target_item_func_min, "misc/itempickup.wav", "");
1492 target_item_change(0, ammo_rockets, target_item_func_min, "misc/itempickup.wav", "");
1493 target_item_change(0, ammo_cells, target_item_func_min, "misc/itempickup.wav", "");
1494 target_item_change(0, ammo_fuel, target_item_func_min, "misc/itempickup.wav", "");
1495 target_item_change(0, health, target_item_func_min, "misc/megahealth.wav", "");
1496 target_item_change(0, armorvalue, target_item_func_min, "misc/armor25.wav", "");
1497 target_item_change(1, items, target_item_func_andnot, "misc/powerup.wav", "misc/poweroff.wav");
1498 target_item_change(1, weapons, target_item_func_andnot, "weapons/weaponpickup.wav", "");
1500 if((self.items & activator.items) & IT_STRENGTH)
1501 activator.strength_finished = min(activator.strength_finished, time + self.strength_finished);
1502 if((self.items & activator.items) & IT_INVINCIBLE)
1503 activator.invincible_finished = min(activator.invincible_finished, time + self.invincible_finished);
1506 if not(activator.items & IT_STRENGTH)
1507 activator.strength_finished = 0;
1508 if not(activator.items & IT_INVINCIBLE)
1509 activator.invincible_finished = 0;
1511 if(activator.health > h0)
1512 activator.pauserothealth_finished = max(activator.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
1513 else if(activator.health < h0)
1514 activator.pauseregen_finished = max(activator.pauseregen_finished, time + cvar("g_balance_pause_health_regen"));
1516 if(activator.ammo_fuel > f0)
1517 activator.pauserotfuel_finished = max(activator.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
1518 else if(activator.ammo_fuel < f0)
1519 activator.pauseregen_finished = max(activator.pauseregen_finished, time + cvar("g_balance_pause_fuel_regen"));
1521 if(activator.armorvalue > a0)
1522 activator.pauserotarmor_finished = max(activator.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
1524 if not(activator.weapons & W_WeaponBit(activator.switchweapon))
1525 _switchweapon = TRUE;
1527 W_SwitchWeapon_Force(activator, w_getbestweapon(activator));
1529 if(target_item_changed)
1530 centerprint(activator, self.message);
1533 void spawnfunc_target_items (void)
1540 // items triggers cannot work in nixnex (as they change weapons/ammo)
1545 self.use = target_items_use;
1546 if(!self.strength_finished)
1547 self.strength_finished = cvar("g_balance_powerup_strength_time");
1548 if(!self.invincible_finished)
1549 self.invincible_finished = cvar("g_balance_powerup_invincible_time");
1551 precache_sound("misc/itempickup.wav");
1552 precache_sound("misc/itempickup.wav");
1553 precache_sound("misc/itempickup.wav");
1554 precache_sound("misc/itempickup.wav");
1555 precache_sound("misc/megahealth.wav");
1556 precache_sound("misc/armor25.wav");
1557 precache_sound("misc/powerup.wav");
1558 precache_sound("misc/poweroff.wav");
1559 precache_sound("weapons/weaponpickup.wav");
1561 n = tokenize_console(self.netname);
1562 for(i = 0; i < n; ++i)
1564 if (argv(i) == "unlimited_ammo") self.items |= IT_UNLIMITED_AMMO;
1565 else if(argv(i) == "unlimited_weapon_ammo") self.items |= IT_UNLIMITED_WEAPON_AMMO;
1566 else if(argv(i) == "unlimited_superweapons") self.items |= IT_UNLIMITED_SUPERWEAPONS;
1567 else if(argv(i) == "strength") self.items |= IT_STRENGTH;
1568 else if(argv(i) == "invincible") self.items |= IT_INVINCIBLE;
1569 else if(argv(i) == "jetpack") self.items |= IT_JETPACK;
1570 else if(argv(i) == "fuel_regen") self.items |= IT_FUEL_REGEN;
1573 for(j = WEP_FIRST; j <= WEP_LAST; ++j)
1575 e = get_weaponinfo(j);
1576 if(argv(i) == e.netname)
1578 self.weapons |= e.weapons;
1579 if(self.spawnflags == 0 || self.spawnflags == 2)
1580 weapon_action(e.weapon, WR_PRECACHE);
1585 print("target_items: invalid item ", argv(i), "\n");
1590 void spawnfunc_item_fuel(void)
1593 self.ammo_fuel = g_pickup_fuel;
1594 StartItem ("models/items/g_fuel.md3", "misc/itempickup.wav", g_pickup_respawntime_ammo, g_pickup_respawntimejitter_ammo, "Fuel", IT_FUEL, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
1597 void spawnfunc_item_fuel_regen(void)
1599 if(start_items & IT_FUEL_REGEN)
1601 spawnfunc_item_fuel();
1604 StartItem ("models/items/g_fuelregen.md3", "misc/itempickup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Fuel regenerator", IT_FUEL_REGEN, 0, FL_POWERUP, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
1607 void spawnfunc_item_jetpack(void)
1609 if(g_grappling_hook)
1610 return; // sorry, but these two can't coexist (same button); spawn fuel instead
1612 self.ammo_fuel = g_pickup_fuel_jetpack;
1613 if(start_items & IT_JETPACK)
1615 spawnfunc_item_fuel();
1618 StartItem ("models/items/g_jetpack.md3", "misc/itempickup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Jet pack", IT_JETPACK, 0, FL_POWERUP, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
1621 // we no longer have the seeker
1622 void spawnfunc_weapon_seeker()
1624 spawnfunc_weapon_fireball();