Skip to content

Expose render splitscreen to lua

haya_underscore requested to merge haya_/RingRacers:expose-splitscreen into master

Simply exposes the variable r_splitscreen, the variable keeping track of the amount of display players on screen at any point, not just on regular splitscreen/replay splitscreen views, to the lua interface.

As of currently, there is no general good way of getting the amount of display players on the screen without atleast exposing this. I've tried numerous solutions, including:

  • Checking for splitscreen (only works with local player splitscreen, and not for replay splitscreen)
  • Iterating through displayplayers via displayplayers.iterate (causes a notorious freeze with displayplayers being filled with copies of display player 1)
  • Iterating through displayplayers via normal for-loop (prevents the freeze, but will return 4 due to the copies of display player 1)
  • Saving the biggest value of c.pnum (You can switch the view numbers at any time, so this will stay at 4 even if you switch to 2 views after having 4 views previously...)

Merge request reports

Loading