Fix portal and plane/sky interaction
More portal-related fixes:
* Fixes rendering issue 4 from issue #21 (Slope planes render with wrong height values when visportals are visible on-screen)
* Fixes sky rendering through portals, so that the sky you see through each portal is what you'd expect to see if you were actually there. Easiest way to see what I mean is through sky 22's planet, in a map with portals at 90 degrees to the other sides respectively (the example map on the wiki for ld40, for instance).
See merge request !65
The idea is for the layman Lua user to understand better what range of values to use for mobj types, states, sfxs, player #s etc. Additionally, mobjinfo/states/sfxinfo/hudinfo tables all now have actual bound checks when accessing/editing them. Yikes, why didn't they have any before?!
Fix OpenGL Fademasks (Screen Transitions)
Screen transitions don't work in OpenGL when scr_depth is set to 8 or 16 bits.
This fixes that.
See merge request !67
Slope fixes
This branch fixes the following slope-related physics and rendering bugs:
* Rings in multiplayer stages respawning inside slopes (even despite being able to spawn ABOVE them on map load)
* Player starts spawning players inside slopes
* Elemental flame trails not appearing if a player spindashes UP a slope; see issue #21
* Dying players "jumping" off slopes to the side if they were previously standing on one
* Some issues with FOF slope rendering
* Various issues with sprites displaying through walls adjacent to slopes
Other features added:
* Objectplace now supports slopes (this is Inuyasha's doing)
* Automap in DEVMODE now supports slopes (my doing)
Just making this merge request now rather than later, ~~in case I decide not to make any more fixes for the time being~~ (this branch doesn't seem to want to die lol), and so we can get these merged in as soon as the code's all been checked over.
See merge request !50
xorshift* PRNG
This needs testing to ensure I didn't mess anything up switching function names around.
Our PRNG sucks. This is probably obvious. I wish I had known better at the time I implemented it, but oh well.
The replacement is an xorshift* PRNG variant with period 2^32 - 1 (meaning that the PRNG state will loop after four billion calls ... that's not likely to happen), versus the old PRNG's period of about 2^22 (?). The output is also much more random and less predictable; the old PRNG would fall into a predictable loop of output after about 4000 numbers were generated, which isn't much.
The PRNG here also outputs numbers as fixed point from [0,1) (that's 0 to FRACUNIT-1, in other words) instead of single bytes at a time. This makes it much easier to calculate things for, say, P_RandomRange and P_RandomKey. A new macro, P_RandomChance(p), is now in use that returns true _p_ percent of the time, where _p_ is a fixed_t probability from 0 (0%) to FRACUNIT (100%).
This doesn't affect netgames at all; the code for seed saving and restoring is identical (aside from a check to prevent seed being set to 0, which breaks xorshift PRNGs). Demos break, but A: _duh_ and B: they're already broken by all the changes to physics to accommodate slopes.
P_Random is deprecated in Lua, as the function was renamed to P_RandomByte. Aside from that, nothing special.
See merge request !64
Skybox hotfix
This branch fixes how, for a skybox with both a centerpoint and viewpoint, the first person view code did not take the centerpoint's angle into account. So when the centerpoint's angle is NOT 0 (or a multiple of 360), this results in the skybox "moving the wrong way" when you're viewing the skybox this way and moving about.
...yeah sorry guys, I commited to a copy of next again, whoops. Cherry-pick the relevant commit into master if this works out fine - after all, this shouldn't affect netgames I think (it's purely about rendering after all)
See merge request !56
* add skidtime, which we forgot before 2.1 release apparently
* change tics from INT16 to INT32
* change eflags from UINT8 to UINT16
* change actionspd/mindash/maxdash from INT32 to fixed_t