Skip to content

Increase NUMSPRITEFREESLOTS to NUMMMOBJFREESLOTS*2.

Sprite freeslot limit is increased from NUMMOBJFREESLOTS (1024) to NUMMOBJFREESLOTS*2 (2048). This is a change intended to address follower sprite freeslots building up and hitting the sprite freeslot limit - since followers don't seem to use MOBJ freeslots at all, the amount of sprite freeslots in use will quickly outpace the amount of MOBJ freeslots in use, meaning that in heavy load orders, sprite freeslots are extremely likely to be the first to hit, and it seems near-impossible to ever actually hit the NUMFOLLOWERS limit of 1024 in a practical scenario. Given that NUMSPRITEFREESLOTS's current limit seems to be implemented with the assumption that it will always be close to 1:1 with NUMMOBJFREESLOTS, and that this assumption doesn't seem to actually hold true in Ring Racers like it does in SRB2, it seems fair to increase NUMSPRITEFREESLOTS to accommodate the disparity introduced by followers. Doubling it seems to be the simplest thing to do, and initial testing seems to indicate that memory management works out fine (though a limit somewhere between 1024 and 2048 would likely do the job if 2048 is deemed excessive).

Merge request reports

Loading