+void player_powerups_remove_all(entity this)
+{
+ if (this.items & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON))
+ {
+ // don't play the poweroff sound when the game restarts or the player disconnects
+ if (time > game_starttime + 1 && IS_CLIENT(this))
+ sound(this, CH_INFO, SND_POWEROFF, VOL_BASE, ATTEN_NORM);
+ stopsound(this, CH_TRIGGER_SINGLE); // get rid of the pickup sound
+ this.items &= ~ITEM_Strength.m_itemid;
+ this.items &= ~ITEM_Shield.m_itemid;
+ this.items -= (this.items & IT_SUPERWEAPON);
+ }
+}
+