Skip to content

Hack P_SpawnHoopsAndRings into little pieces

MascaraSnake requested to merge spawnhoopsandrings_refactor into next

Separate P_SpawnHoopsAndRings into different functions:

  • Hoops are spawned via P_SpawnHoop.
  • Item patterns (rows and circles) are spawned via P_SpawnItemPattern.
  • Ring-like items are spawned normally via P_SpawnMapThing.
  • Bonus time for NiGHTS items is set via P_SpawnBonusTimeItem.

The new functions call the existing mapthing spawning code wherever possible, to make sure all items are handled consistently and to reduce the amount of code duplication.

In anticipation of UDMF, P_SpawnItemRow and P_SpawnItemCircle are much more customizable than what our current item pattern mapthings support: You can freely specify the size, orientation and number of items in the pattern. Additionally, you can specify an arbitrarily long list of different item types. When spawning the items, it will cycle through this list.

srb2win-rings-refactor.exe

Edited by MascaraSnake

Merge request reports

Loading