Skip to content

Fixed: a RandomPowerup could try giving the player a powerup that isn't actually an inventory item (i.e. the powerup was replaced by a non-inventory actor), causing the game to crash.

When a player picks up a RandomPowerup item, it may give the player one of the following powerups: Soulsphere, Megasphere, GuardSphere, BlurSphere, TimeFreezeSphere, InvisibilitySphere, Doomsphere, or Turbosphere.

It needs to spawn the powerup first before giving the item to the owner. However, some mods replace these powerups with non-inventory actors (e.g. Brutal Doom replaces the BlurSphere with tied-up marines). Since the actor is spawned using ALLOW_REPLACE in ARandomSpawner::Use and the code depends on the spawned actor being an inventory item, this causes the game to crash.

Since the RandomSpawner actor is supposed to give the player one of the aforementioned powerups, it makes sense to use NO_REPLACE instead of ALLOW_REPLACE so that it always gives the player the intended powerup.

Merge request reports