+ if (self.items & IT_SUPERWEAPON)
+ {
+ if (!WEPSET_CONTAINS_ANY_EA(self, WEPBIT_SUPERWEAPONS))
+ {
+ self.superweapons_finished = 0;
+ self.items = self.items - (self.items & IT_SUPERWEAPON);
+ sprint(self, "^3Superweapons have been lost\n");
+ }
+ else if (self.items & IT_UNLIMITED_SUPERWEAPONS)
+ {
+ // don't let them run out
+ }
+ else
+ {
+ play_countdown(self.superweapons_finished, "misc/poweroff.wav");
+ if (time > self.superweapons_finished)
+ {
+ self.items = self.items - (self.items & IT_SUPERWEAPON);
+ WEPSET_ANDNOT_EA(self, WEPBIT_SUPERWEAPONS);
+ sprint(self, "^3Superweapons have broken down\n");
+ }
+ }
+ }
+ else if(WEPSET_CONTAINS_ANY_EA(self, WEPBIT_SUPERWEAPONS))
+ {
+ if (time < self.superweapons_finished || (self.items & IT_UNLIMITED_SUPERWEAPONS))
+ {
+ self.items = self.items | IT_SUPERWEAPON;
+ sprint(self, "^3You now have a superweapon\n");
+ }
+ else
+ {
+ self.superweapons_finished = 0;
+ WEPSET_ANDNOT_EA(self, WEPBIT_SUPERWEAPONS);
+ }
+ }
+ else
+ {
+ self.superweapons_finished = 0;
+ }