Item_Reset();
Net_LinkEntity(self, FALSE, 0, ItemSend);
+
+ // call this hook after everything else has been done
+ if(MUTATOR_CALLHOOK(Item_Spawn))
+ {
+ startitem_failed = TRUE;
+ remove(self);
+ return;
+ }
}
-/* replace items in minstagib
- * IT_STRENGTH = invisibility
- * IT_NAILS = extra lives
- * IT_INVINCIBLE = speed
- */
-void minstagib_items (float itemid) // will be deleted soon.
-{
- float rnd;
- self.classname = "minstagib"; // ...?
-
- // replace rocket launchers and nex guns with ammo cells
- if (itemid == IT_CELLS)
- {
- self.ammo_cells = autocvar_g_minstagib_ammo_drop;
- StartItem ("models/items/a_cells.md3",
- "misc/itempickup.wav", 45, 0,
- "MinstaNex Ammo", IT_CELLS, 0, 0, generic_pickupevalfunc, 100);
- return;
- }
-
- // randomize
- rnd = random() * 3;
- if (rnd <= 1)
- itemid = IT_STRENGTH;
- else if (rnd <= 2)
- itemid = IT_NAILS;
- else
- itemid = IT_INVINCIBLE;
-
- // replace with invis
- if (itemid == IT_STRENGTH)
- {
- if(!self.strength_finished)
- self.strength_finished = autocvar_g_balance_powerup_strength_time;
- StartItem ("models/items/g_strength.md3",
- "misc/powerup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
- "Invisibility", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_MID);
- }
- // replace with extra lives
- if (itemid == IT_NAILS)
- {
- self.max_health = 1;
- StartItem ("models/items/g_h100.md3",
- "misc/megahealth.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
- "Extralife", IT_NAILS, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
- }
- // replace with speed
- if (itemid == IT_INVINCIBLE)
- {
- if(!self.invincible_finished)
- self.invincible_finished = autocvar_g_balance_powerup_invincible_time;
- StartItem ("models/items/g_invincible.md3",
- "misc/powerup_shield.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
- "Speed", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_MID);
- }
-}
-
-float minst_no_auto_cells;
-void minst_remove_item (void) {
- if(minst_no_auto_cells)
- remove(self);
-}
-
float weaponswapping;
float internalteam;