Commit graph

1201 commits

Author SHA1 Message Date
Alam Ed Arias 1a0fcbd8dc Revert "Merge branch 'RemoveINetC' into 'master'"
This reverts commit 8607f5247c, reversing
changes made to 11d76a6562.
2016-07-21 14:42:00 -04:00
Alam Ed Arias 8607f5247c Merge branch 'RemoveINetC' into 'master'
Remove i_net.c

The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).

The vast majority of code in the file seems to be contained in HAVE_SDLNET ifdefs, and I'm pretty sure SRB2 has never used SDLNET in a public build. The only bit not contained in that block is I_InitNetwork(), which just prints an error and returns false.

Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.

See merge request !73
2016-07-21 14:15:58 -04:00
Alam Ed Arias c5fe08dcd2 Merge branch 'aatree-refactor' into 'next'
Re-factoring AA tree code from m_misc.c/m_misc.h into its own files

What the title says. The AA tree-related code now lives in the files m_aatree.c and m_aatree.h. Part of why I did this was to solve this m_misc.h/w_wad.h cyclic dependency problem (involving MAX_WADPATH and AA trees themselves) mentioned in the now-removed comments, another reason was ...only OpenGL uses AA trees at all, why include the relevent structs/functions/otherwise anywhere except where is necessary (which is very few files as it turns out)?

Otherwise, it just looked better on its own rather than mixed with all the other stuff already in the m_misc files. Not really important or anything affecting gameplay at all I guess.

See merge request !82
2016-07-21 14:13:38 -04:00
Monster Iestyn 6ba568ac49 Fixed typo of mine that lead to the ceiling part of GFZ2's tunnel section being rendered wrongly 2016-07-20 15:11:36 +01:00
Monster Iestyn 77a40e9016 Slightly unrelated, but if R_DrawTranslucentSplat_8 is ever going to be used this is probably more efficient (also fixing early colormap application for the last part) 2016-07-17 23:01:07 +01:00
Monster Iestyn 9ad205f5ba R_DrawTiltedSplat_8 fix: apply colormapping AFTER checking the source pixel is cyan first 2016-07-17 22:33:37 +01:00
Monster Iestyn 4d0f0230de Fix chasecam/awayviewmobj viewz offset to be consistent with non-skybox frame rendering 2016-07-17 17:36:37 +01:00
Alam Ed Arias 765d68899f Merge branch 'master' into next 2016-07-11 16:10:40 -04:00
toasterbabe 8426ce8d9c Minor change to fans and gas jets that makes them work on slopes.
- Now checks whether the player's top is below the bottom of the fan/gas jet, instead of its bottom. zdist calculation not affected.
- mo->standingslope is NULL'd so the player isn't launched off at a wacky angle. (I also did this for springs, since Prime mentioned it was a problem for them too.)
2016-06-30 23:23:50 +01:00
Inuyasha 331ea9814f version numbers, etc 2016-06-29 20:01:22 -07:00
Inuyasha 26b3f2e0dc Merge branch 'toast_slopes' into 'next'
Some slope improvements/fixes (plus P_GetMobjGravity)

Dear Red, I did some things.

* Made the slope flag SL_NOPHYSICS actually have an effect like we wanted to, but didn't get around to implementing yet - activated by setting the slope's linedef flags to have ML_NOSONIC.
* Made downhill slope thrusts proportional to an object's gravity and friction.
* To make the above happen - seperated out the gravity value finding code in P_CheckGravity into a seperate function, P_GetMobjGravity. (p_mobj.c, p_local.h) I also made this function available to Lua.
* Turned those PANIC n console messages (which would inevitably be followed up with a crash, since we're accessing invalid memory immediately after) into a descriptive I_Error.
* Put the SRB2CB type-shimming behind an ESLOPE_TYPESHIM ifdef.
* Removed SPRINGCLEAN-ifdef'd code.
* Cleaned up some eosteric comments.
* NEW SINCE RED +1'd THIS: The teetering code now takes slopes into account pretty well. There are edge circumstances as outlined in commit 9d221f4f3f, but this is unilaterally better behaviour in every way and the teetering code was kind of a mess anyways.
* NEW SINCE RED AND ALAM +1'd THIS: P_ReverseQuantiseMomentumToSlope. Simple function that replaces the inverse angle stuff (which also wasn't using InvAngle, just ANGLE_MAX - angle - which is inaccurate!!)

Current testing files available at /toaster/slptst3.wad and /toaster/gravitytest.lua on the ftp.

I want to do more to the branch like implement SL_ANCHORVERTEX in the near future, but this is probably safe to merge in its current state.

See merge request !77
2016-06-22 19:03:58 -04:00
toasterbabe f93b31f0a7 FUCK C90 2016-06-20 02:08:07 +01:00
toasterbabe 20ffbbdc41 Climbing now supports one-sided linedefs.
The whole thing needs a refactor in general, but it's almost 2am here, I need my sleeb, and this fix would probably break something with 2.1 climbing if I made it any more/less (depending on viewpoint) complicated.
2016-06-20 01:50:47 +01:00
Alam Ed Arias 7126d57fd7 whitespace cleanup 2016-06-19 20:25:09 -04:00
toasterbabe 71f5d4ea85 ...completely misunderstood the reasons we weren't merging toast_slopes, mom holy fuck i'm stupid and bad
Enjoy your slopes without physics, people :D
2016-06-20 00:20:20 +01:00
Alam Ed Arias 24038d4d54 Merge branch 'next' into aatree-refactor 2016-06-19 15:48:22 -04:00
Alam Ed Arias e87e747a29 clean up warning done in setup-fixes 2016-06-19 12:48:35 -04:00
toasterbabe 86721f1457 Compilation fix of the patch to disable this feature ( :c ). 2016-06-19 17:29:04 +01:00
toasterbabe fa58993bda Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into toast_slopes
# Conflicts:
#	src/p_user.c
2016-06-19 16:59:49 +01:00
toasterbabe 1147428904 Revert "Changed teetering to match the discoveries made about it in the sectorlist_traversal branch in a way that matches my revamps here, since I DID change a lot."
This reverts commit 19b186e52e.
2016-06-19 16:38:11 +01:00
toasterbabe f5f2c4ad48 Revert "Okay, NOW I fixed the compile error. Forgot to stage this."
This reverts commit 1723bb55f9.
2016-06-19 16:38:04 +01:00
Alam Ed Arias 8e98c78456 Merge branch 'next' (early part) into toast_slopes 2016-06-19 03:39:42 -04:00
toasterbabe 3fe87eff97 Disabling the functionality of SL_NOPHYSICS for 2.1 patches by never applying it 2016-06-18 23:55:43 +01:00
toasterbabe 9c277bfb22 Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into toast_slopes 2016-06-18 22:58:24 +01:00
Inuyasha 8fc61bb674 Merge branch 'sectorlist_traversal' into 'next'
Sectorlist traversal

MOM GET THE CAMERA

There's a LOT of code in the source that ended up mixing m_snext (the node for the next thing in the sector's thinglist) and m_tnext (the node for the next sector in the thing's sectorlist), so I renamed the following:

* m_snext ==> m_thinglist_next
* m_sprev ==> m_thinglist_prev
* m_tnext ==> m_sectorlist_next
* m_tprev ==> m_sectorlist_prev

Then, I changed all the instances where the code was trying to go m_thinglist_next on a mobj's touching_sectorlist (which would've just gone to the node for the next thing in the same sector, instead of the node for the next sector for the same thing). Notable samples:

* FF_SHATTER blocks now disappear the moment you go into their sector. You still can't give FF_SOLID to them because in that case they will still stop you if you never enter their sector at all (ie - clip on corners), but having them nonsolid no longer allows you to phase through entirely without busting them (which was the whole downside of making them intangible in the first place).
* You can now bump into multiple Mario blocks at a time, even if you're not exclusively in their sector.
* No more getting randomly stopped on the edges of bouncy FOFs.
* Landing on polyobjects might behave a little more consistently at the edge of their host sector.
* Teetering did a SHITTON of code that basically never got executed, and then had directly-blockmap-accessing code as a backup. The code was activatable by replacing the m_thinglist_next with m_sectorlist_next, but it behaved SUPER differently from what we're used to with teetering (if the player mobj's edge was JUST off the edge of a platform, you ended up in teetering frames - even if it looked like you could stand) so I ended up removing that section entirely.

Any objections?

See merge request !85
2016-06-18 16:52:21 -04:00
Monster Iestyn 9e31ab1393 Merge branch 'master' into next 2016-06-17 14:44:23 +01:00
Alam Ed Arias 56331d86c4 Merge remote-tracking branch 'origin/master' into build-modes 2016-06-17 08:55:20 -04:00
Inuyasha ee180807d1 Merge branch 'setup-fixes' into 'next'
Fixes and changes related to the act of setting up a level (in other words, setup fixes)

Changes made in this branch so far:
* a REJECT lump of zero length (NOT to be confused with a REJECT lump of non-zero length with all-zeros, just to clarify) should no longer cause problems with netgames and otherwise. The game now checks if the lump exists, has the right name, and length is not zero - if it fails any of these, the REJECT lump is not loaded and P_CheckSight won't be allowed to use it. This means ZDBSP (no reject) should be safe(r) to use now!
* there's now a simple devmode-only message (requires "Setup" mode) if a sector is found to have no lines at all during setup. It's a far cry from the plot to I_Error the game I once had for that unsusal scenario, but such a level still works anyway so whatever.

See merge request !87
2016-06-17 08:05:09 -04:00
Inuyasha 191a4bc7d2 Merge branch 'reverseplatform_clipping' into 'next'
FF_REVERSEPLATFORM clipping

Ran into an issue whilst testing out one last feature (there's always one more...) for flat_alignment_revamp. This is a backported fix.

The bug was such that if you're falling through a platform with FF_REVERSEPLATFORM and not FF_PLATFORM, you'll be pushed downwards such that your head is against the bottom of the FOF. This just checks momz is greater than zero if it has FF_REVERSEPLATFORM to make sure it's okay to set ceilingz. (OR the alternative in reverse gravity.)

No test map because this was originally done for internal. Instead, test it on the other branch's test map.

See merge request !83
2016-06-17 08:01:03 -04:00
Monster Iestyn 5fd87351a8 Place precision of 4 on sprname string in the I_Error messages, so that you just get "PLAY" instead of "PLAYC2C8" or "PLAYA0" etc
This is so custom character creators won't get confused by having two different frames shown in the same message anymore, bleh
2016-06-13 22:52:20 +01:00
Monster Iestyn a135def1bb Merge branch 'next' into aatree-refactor 2016-06-13 21:14:52 +01:00
Monster Iestyn df55019d40 Merge branch 'master' into other-software-fixes 2016-06-13 21:13:51 +01:00
Monster Iestyn 9ae2a4036a Merge branch 'master' into next 2016-06-13 21:10:53 +01:00
Alam Ed Arias a046d3807e strings return by M_GetText() can not be changed 2016-06-13 11:11:02 -04:00
Alam Ed Arias 2c8008e11e NULL checks 2016-06-13 10:07:10 -04:00
Monster Iestyn 9b037164bc Added debug messages for when REJECT lump is not loaded 2016-06-12 21:51:27 +01:00
Monster Iestyn f94dd510ad change back to 8, add \0s 2016-06-12 21:16:41 +01:00
Alam Ed Arias 4d6a3e3398 FUNCMATH fun 2016-06-12 16:08:48 -04:00
Alam Ed Arias 1e507d3d1e added printf checks to hardware's I_Error 2016-06-12 16:08:48 -04:00
Alam Ed Arias 1e3631425f r_opengl: move DrawMD2i code to DrawMD2Ex 2016-06-12 16:08:48 -04:00
Alam Ed Arias 6271adcbe7 make sure !BLUA EXE works without warnings 2016-06-12 16:08:48 -04:00
Monster Iestyn b4798538e2 Merge branch 'software-fixes' into 'master'
Software crashes fix

This branch SHOULD fix the many crashes people have reported lately that all point to the software renderer. Simply put, the software renderer allowed stuff to be drawn out of the screen even though that wasn't safe, and even the existing checks to prevent that didn't work.

If you saw me worrying about the sky HOMs I discovered in AGZ earlier in the commits for this branch, don't worry - it turns out that issue already existed in 2.1.15's srb2win.exe (and probably srb2dd.exe too) anyway, the changes in this branch didn't cause them. Hopefully nothing else broke then.

See merge request !75
2016-06-12 14:33:27 -04:00
toasterbabe 2c676eea43 P_ReverseQuantiseMomentumToSlope is now a function. (I was thinking about a macro, but couldn't get it down.)
Also, the teetering angle on slopes is now FRACUNIT/2 because there's literally no way to stand still on a slope that steep unless it doesn't have physics.
2016-06-12 19:27:34 +01:00
Monster Iestyn 305d32870f Effect 2 (No Midtexture Skew) now toggles off skewing for midtextures on single-sided lines, which was what was intended for them to begin with apparently.
This means the current skewing-by-default effect isn't changed, and OpenGL's equivalent code doesn't have to be touched since apparently it was already like that.
2016-06-12 18:47:27 +01:00
Alam Ed Arias 472dce1ae6 Do not why we are not checking REJECT\0\0, let fix this check 2016-06-11 21:42:02 -04:00
Monster Iestyn 1d0e74f9c0 "REJECT" is only 5 chars long, not 8. 2016-06-11 21:19:16 +01:00
Monster Iestyn a7a7a7ee6d Added P_LoadReject function to properly check if REJECT lump is valid or not when loading it, so P_CheckSight can avoid accessing it if not.
This should mean that maps built with ZBSDP (no reject) should have less or no problems in netgames compared to the standard ZenNode maps now, hopefully. =)
2016-06-11 18:45:56 +01:00
Monster Iestyn df92dc8d9e Print debugging message if sector->linecount is zero 2016-06-11 16:14:08 +01:00
toasterbabe 9e87f6d85d i did so much in this branch, so UPGRADE ME TO PROGRAMMER
note: once this is merged into internal, you should probably remove me from "programming assistance" so i'm not duplicated for no clear reason. unless you want me to slowly take over every section in the credits >:3c
2016-06-10 22:45:42 +01:00
Monster Iestyn a04fcce3a9 Hack to fix midtextures for polyobjects being mucked up
"frontsector" in this part of the code isn't actually the polyobject's sector for back-side polyobject segs, it's the in-level sector the polyobject as a whole is being rendered in it turns out.
2016-06-09 22:07:43 +01:00
Monster Iestyn 20c2d84c78 Fix single side line midtexture skewing
Red apparently left in code for single-sided linedefs to NOT skew their midtextures ...but it doesn't work because it doesn't stop the skewing code from running instead, regardless of whether Effect 1 is on or not. If it's decided single-sided line midtextures shouldn't do this though, the non-skew code could just as well be thrown out lol (or something else I guess?)
2016-06-09 20:37:36 +01:00
toasterbabe 661da15146 Reinforcing encapsulation I originally broke down to allow for P_GetMobjGravity.
When I first wrote this, I thought the .h file that contained a function declaration needed to have the same name as the .c file the function was in. Now I know that's not the case, off to p_local.h with you.
2016-06-09 18:16:13 +01:00
toasterbabe 1723bb55f9 Okay, NOW I fixed the compile error. Forgot to stage this. 2016-06-09 15:24:23 +01:00
toasterbabe c5ff41d6a6 Fixed compile error and placed the #undefs for xsign and ysign in more logical places. 2016-06-09 15:20:45 +01:00
toasterbabe 19b186e52e Changed teetering to match the discoveries made about it in the sectorlist_traversal branch in a way that matches my revamps here, since I DID change a lot. 2016-06-09 15:16:25 +01:00
toasterbabe 7af14c20ed Everywhere in the code that was doing things wrong has been changed.
Two interesting points of note:
* The touchspecial sector flag seems to actually do its job now.
* Detection of sectors with polyobjects in seems to have done this incorrectly, but this doesn't mess with anything about touching the polies themselves so it seems to really only handle edge cases where the polyobject was too close to the border of another sector (which would've likely made rendering glitches anyways).
* There was a whole swathe of teetering code that was basically never run properly because of this mistake. I did a simple fix at first, but you started teetering whenever you were slightly less than your radius away from a sector's edge, which was completely different and undesirable behaviour. Instead, I cut out the code that was never running, and just left the hacky method in instead since it was more accurate to what we want in general.
2016-06-09 14:56:24 +01:00
toasterbabe 17e0adcbac Renamed some struct variables so the problem this branch sets out to fix is more obvious at a glance.
* m_snext ==> m_thinglist_next
* m_sprev ==> m_thinglist_prev
* m_tnext ==> m_sectorlist_next
* m_tprev ==> m_sectorlist_prev
2016-06-09 14:16:02 +01:00
toasterbabe 0b920ee249 You know that problem where you bumped on the edges of Mario blocks and Bustable blocks and Bouncy FOFs sometimes? Wham. Bam. In the van.
Issue was caused by attempting to traverse the sector's thing-touching-list across all the things in the sector (which would inevitably have the same sector as the first node in mobj->touching_sectorlist) instead of traversing the thing's sector-touching-list (which has the same thing but different sector references).

I wonder how many times AJ copypasted this code with absolutely no idea why it wasn't working properly. I'll figure that out tomorrow, maybe set up some compiler macros so this mistake is never made again. For now, I must sleeb.
2016-06-09 00:02:50 +01:00
Alam Ed Arias 742353d0ab Merge branch 'master' into next 2016-06-08 15:06:17 -04:00
Monster Iestyn 29ea733ae5 Fix sprites in skyboxes not having clipping arrays actually set properly 2016-06-08 17:53:34 +01:00
toasterbabe 51c769247a Compiling fixes. 2016-06-07 19:44:43 +01:00
toasterbabe aa113045d7 MI pointed out opportunity for more optimisation, and who could resist? 2016-06-07 18:18:47 +01:00
toasterbabe 9df72a966e Some simplifications after MI pointed out that the sector heights are the only thing accessed outside of the iteration. 2016-06-07 17:55:03 +01:00
toasterbabe 9d221f4f3f Teetering now supports slopes properly.
Behaves ALMOST as you'd expect. It gets the z position of the slope at the player coordinates when it comes to the sectorlist check (which is first), though, so there's a few oddities that are amplified with steep slopes:
* If the slope's sloping away from you at a steep angle, you might not be able to step down onto it, but you won't teeter (because it's at a step-down-able height if it extended to directly beneath you)
* If the slope's sloping towards you at a steep angle, you might end up in teetering frames when you're able to step down onto it (because it's NOT at a step-down-able height if it extended to directly beneath you)

HOWEVER, it would be pretty obnoxious to hold back code which is functionally superior in every way otherwise, and it doesn't really seem like there's a good way to get that checked tbph
2016-06-07 17:37:25 +01:00
toasterbabe 26744c2a6b woops #1 2016-06-06 21:02:47 +01:00
toasterbabe 7c0eee6ff1 The fix now takes reverse gravity platform step-up into account properly. 2016-06-06 20:53:29 +01:00
toasterbabe 60dd8dab3c Backported clipping fix for FF_REVERSEPLATFORM collision. 2016-06-06 18:11:23 +01:00
Monster Iestyn 69f556d40a Split AA trees code from m_misc.c/.h into m_aatree.c/.h
Also updated any relevant project files that I can think of to include the new files, as well as the makefile of course. Some of the other project files haven't been touched in years so I'll leave those alone ...unless someone objects
2016-06-05 21:29:40 +01:00
Monster Iestyn 2e9607938d Merge branch 'master' into next 2016-06-04 20:23:46 +01:00
toasterbabe 3591e92dfa Merge branch 'toast_slopes' of http://git.magicalgirl.moe/STJr/SRB2 into toast_slopes 2016-06-04 19:48:04 +01:00
toasterbabe ba528a075e Last few changes as reccomended by Red. (<3 u, no hetero) 2016-06-04 19:47:40 +01:00
Monster Iestyn 4c422f6605 OpenGL: closed door/window detection code now accounts for slopes, just like in software 2016-06-04 18:31:21 +01:00
Alam Ed Arias 31a59f8ae6 Merge branch 'next' into toast_slopes 2016-06-02 17:45:16 -04:00
Monster Iestyn 83c4dba4ce Fix crash reported by FuriousFox at http://mb.srb2.org/showthread.php?t=41536
Basically this makes sure numwadfiles is updated before loading the SOC/Lua scripts, so if a Lua script calls COM_BufInsertText with the contents "addfile scr_mysticrealm.wad" it can't overwrite the last written wadfile slot! Not that COM_BufInsertText really should be used like that to begin with
2016-06-02 20:16:25 +01:00
toasterbabe c1caf21323 Reccomended by MI: Dividing by the original friction value just so slopes with normal friction don't behave differently between next and this branch. 2016-06-02 16:51:12 +01:00
toasterbabe 882622d2e7 ...I made two major mistakes with P_GetMobjGravity.
*Didn't take into account object scale
*Doubled force when on the ground (ignore what the comment of the line I moved says, it was relevant for slopes...)

This also led to a mistake with slopes, where I was double-multiplying by the gravity constant to get half (because of a quirk of numbers...)
2016-06-02 16:42:07 +01:00
toasterbabe 213a9632ca Let's multiply the thrust by the mobj's friction. You should have less chance of purchase on a slippery slope (tee hee) and more on a rough one, but the slopes were basically identical during testing before I implemented this change. 2016-06-02 16:09:33 +01:00
toasterbabe 80fceafcb9 Merge branch 'toast_slopes' of http://git.magicalgirl.moe/STJr/SRB2 into toast_slopes 2016-06-02 14:40:36 +01:00
toasterbabe 1493537dfc Moved the standingslope check in P_ZMovement to after the FOF and height adjustment as it is in P_PlayerZMovement, as reccomended.
Doesn't actually stop Crawla jittering, but might as well make it happen for consistency's sake.
2016-06-02 14:39:41 +01:00
wolfy852 919e3ed0e2 Make token available to Lua as a global variable
Reviewed by @RedEnchilada
2016-06-01 21:06:24 -05:00
Alam Ed Arias 507b336bd6 Merge branch 'next' into toast_slopes 2016-06-01 15:36:46 -04:00
Alam Ed Arias 208fb75a17 Merge branch 'master' into software-fixes 2016-06-01 15:35:55 -04:00
toasterbabe 44a6e8bb54 I_Error description syntax consistency (buzzword buzzword buzzword). 2016-06-01 19:52:12 +01:00
Monster Iestyn 43b6b2a53f Merge branch 'master' into next 2016-06-01 19:31:57 +01:00
Monster Iestyn c863e311fe OpenGL: Fix upper texture Effect 1 only skewing 2016-06-01 19:22:54 +01:00
Monster Iestyn bf85cc25bd OpenGL: Fix lower unpegged texture offset, fix lower unpegged + effect 1 so the texture actually skews 2016-06-01 18:51:38 +01:00
Alam Ed Arias 629dd8e08f Merge branch 'next' into toast_slopes 2016-06-01 11:47:22 -04:00
Alam Ed Arias 0444e8a14c Merge branch 'master' into next 2016-06-01 11:45:57 -04:00
toasterbabe ae8b45965c No Size_t --> int
in an I_Error print!
[/rhyme]
2016-06-01 16:45:10 +01:00
Alam Ed Arias 87cf02e21b Merge branch 'master' into software-fixes 2016-06-01 11:17:57 -04:00
toasterbabe 76d108d760 Whoops, didn't realise pushing fixed and integer were different. My mistake. 2016-06-01 14:49:14 +01:00
toasterbabe 62c4338d60 Added P_GetMobjGravity to Lua. Check /toaster/gravitytest.lua for sample script. 2016-06-01 13:19:44 +01:00
Alam Ed Arias f21c72b889 debug: always load exchndl.dll 2016-05-31 21:30:18 -04:00
Monster Iestyn d24cc49443 Fix FOF height checks all over p_spec.c to account for slopes
This fixes certain sector specials and linedef executor specials etc not accounting for players/mobjs touching sloped FOFs
2016-05-31 21:31:29 +01:00
toasterbabe 7071fbe29e I made a mistake. Fuck git reverts, they are a nightmare, let's just do this the old fashioned way. 2016-05-31 18:13:17 +01:00
toasterbabe d4d44777f4 Okay, now vertex slopes aren't placement-order-dependent any more. Hopefully this is the best way to handle things. 2016-05-31 17:43:27 +01:00
toasterbabe d998ddfae4 When you haven't found all the vertices, it's just not safe to carry on. Hit them with a descriptive I_Error so they don't get confused as hell like Glaber did. http://mb.srb2.org/showthread.php?t=41455 for reference.
Also took the opportunity to nuke or otherwise neuter a bunch of Kalaron's bizzare ramblings (most are questions which have long-been answered by Red's efforts) at the same time.
2016-05-31 17:07:28 +01:00
Monster Iestyn d5184847d6 Merge branch 'master' into software-fixes 2016-05-31 16:29:02 +01:00
Alam Ed Arias 7dd3a4ba7b Merge branch 'master' into next 2016-05-31 11:26:51 -04:00
toasterbabe da2abbb39f Failed a build because C is an obnoxious language. 2016-05-31 16:24:51 +01:00
toasterbabe 6058eec1c9 Holy shit. I spent two hours staring at how garbage this code was and didn't even realise it was #ifdef'd out behind a define not even mentioned in doomdef.h. It's not actually used anywhere (superseded entirely by the much nicer, much more relevant P_NewVertexSlope()... out with you, ancient, foul demons who should've been SPRINGCLEANed long ago. 2016-05-31 16:14:21 +01:00
Monster Iestyn 8b2b49fb04 Just some final cleanup of the code I changed 2016-05-31 16:08:29 +01:00
toasterbabe ad61050bb0 Whitespace removal. 2016-05-31 16:01:05 +01:00
toasterbabe fa002e58ad Did a bunch of things to/for slopes.
*The No Physics flag now works (Red, you might want to doublecheck this to see whether I haven't missed any eosteric stuff out). Going downhill is a little bumpy, and I'm not sure whether that's good or not. Someone help me out here?
*The SRB2CB typeshims are now behind #ifdef ESLOPE_TYPESHIM instead of #if 1 for easier disabling.
*Slopes' downhill thrusts are now scaled with regards to object gravity. This is actually untested in gravities other than normal and reverse normal but it's one line which can be easily reverted in that circumstance. I also checked with MI to make sure this is how it's calculated elsewhere, so fingers crossed this doesn't cause any edge cases.
*As a consequence of the above point, there's now a function in p_mobj.c/h that returns an object's internal gravity - seperated out from the logic of P_CheckGravity, which really didn't need to be so monolithic. Multiply by global gravity to get the thrust. This should probably be available to Lua somehow, but I have absolutely no idea where to start with that. Wolfs, maybe?

Non-comprehensive test file available at /toaster/slptst3.wad on the ftp.
2016-05-31 15:01:19 +01:00
Monster Iestyn eb90f4f50d welp no success in fixing the sky HOMs yet, committing progress anyway 2016-05-30 22:53:22 +01:00
Monster Iestyn a2aeece419 Significant rework of main seg-rendering code, to eliminate the possibility of drawing off-screen and crashing the game as result
NOTE: HOMs sometimes appear in the sky in maps like AGZ (map40), so this isn't completely fine yet. I'll fix that later
2016-05-30 21:53:29 +01:00
Monster Iestyn 2c73e2a2cd Fix flung emeralds not disappearing in death pits
(assuming it wasn't an intentional behaviour thing of course)
2016-05-29 16:47:38 +01:00
Alam Ed Arias 209d76cb9d gcc-6: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 2016-05-28 21:24:06 -04:00
Alam Ed Arias 9e196613a0 gcc-6: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation] 2016-05-28 21:23:46 -04:00
Alam Ed Arias 4956be2bd4 gcc-6: error: left shift of negative value [-Werror=shift-negative-value] 2016-05-28 21:23:09 -04:00
Alam Ed Arias 35b254feaa D_MD5PasswordPass, fixup 2016-05-28 19:51:10 -04:00
Alam Ed Arias 3aea4a7601 replace strcpy with memmove in D_MD5PasswordPass() 2016-05-28 19:48:52 -04:00
Alam Ed Arias d9aa430817 use memmove in D_MD5PasswordPass() and drop noreturn 2016-05-28 19:42:38 -04:00
Alam Ed Arias 35f36e1bba travis-ci: set v of nulK to 0 2016-05-28 19:28:37 -04:00
Alam Ed Arias 02e67a4a95 travis: add gcc 4.4, 4.6 and 4.7 2016-05-28 19:15:37 -04:00
Alam Ed Arias ad6c2e634f travis: disable xcode6.3 2016-05-28 19:08:50 -04:00
Alam Ed Arias f4a84c916e travis: Fixedup gcc 5 error and allow gcc 6 to fail 2016-05-28 18:41:08 -04:00
Alam Ed Arias 9731a8daa1 Merge branch 'master' into next 2016-05-27 14:39:23 -04:00
Alam Ed Arias d1aab2e418 gcc: clear uninitialized warnings in am_map.c 2016-05-27 14:22:02 -04:00
Alam Ed Arias 390927cc32 Makefile: compile debug build with -Og on GCC 4.8 and higher 2016-05-27 14:14:04 -04:00
Alam Ed Arias 98b1254a65 Merge branch 'master' into next 2016-05-27 11:02:44 -04:00
Monster Iestyn 0081397920 OpenGL: Fix MD2s on player 2's screen breaking when reverse gravity is involved 2016-05-27 14:53:36 +01:00
Monster Iestyn 65d9c9e167 P_NetUnArchivePlayers doesn't like having "inline" either 2016-05-27 14:49:11 +01:00
Alam Ed Arias 869d582cc4 Makefile: ignore suggest=attribute for GCC 4.6 and up 2016-05-27 01:55:52 -04:00
Alam Ed Arias 20dcf138e2 hardware: let not break MSVC support 2016-05-27 01:28:21 -04:00
Alam Ed Arias 008be7c90d hardware: start the surf as clean 2016-05-27 01:19:16 -04:00
Alam Ed Arias 3297fe11ed P_NetArchivePlayers() is too bad for inline 2016-05-26 23:39:08 -04:00
Alam Ed Arias 0079b4df64 Make: compile Release build will all the speed 2016-05-26 20:39:15 -04:00
Monster Iestyn 8ceba95bfa Fix slope collision detection for the camera
See http://mb.srb2.org/showthread.php?t=41494
2016-05-25 21:10:46 +01:00
Alam Ed Arias 8e32d978a1 Merge remote-tracking branch 'public/master' 2016-05-25 06:42:01 -04:00
Monster Iestyn 7c78b95a7d This is probably the "correct" way to set maskedtextureheight
Probably doesn't make any difference in-game at all though, lol
2016-05-24 22:11:48 +01:00
Monster Iestyn ab6d4d7aec Remove unused planefunction_t function typedef
(the number of unused things hiding around in SRB2's source code is silly lol)
2016-05-24 14:41:55 +01:00
Monster Iestyn 17346e29c3 Remove unused drawfunc_t function typedef 2016-05-24 14:38:31 +01:00
Hank Brannock f94d3a1fb0 The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).
Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.
2016-05-22 22:38:16 -04:00
Alam Ed Arias b96b999c1e MSVC: Move x86/x64 settings into commons props 2016-05-22 21:55:55 -04:00
Alam Ed Arias 79f3d6e072 MSVC: Tidy up project files by hand 2016-05-22 11:54:32 -04:00
Alam Ed Arias 47ae39ea62 netplay: fix off by 1 2016-05-22 11:03:04 -04:00
Alam Ed Arias f45feb77fc MSVC: kill level 3 warnings 2016-05-22 00:44:12 -04:00
Alam Ed Arias 57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Alam Ed Arias 9550f9626b r_opengl.dll: UPX and static link libgcc 2016-05-20 17:36:46 -04:00
Alam Ed Arias ff5587d1d5 Merge branch 'master' into next 2016-05-19 18:03:56 -04:00
Monster Iestyn c846b0ab23 Aren't some of these things already added later in sdl/Makefiles.cfg?
* -lSDL2_mixer is already added to SDL_LDFLAGS by default, unless NOMIXER=1 is set
* -DSDLMAIN should also be added to OPTS by default for MINGW=1 builds, unless NOSDLMAIN=1 is set
2016-05-19 16:51:05 +01:00
Alam Ed Arias e2a5783521 Merge branch 'master' into next 2016-05-19 01:39:45 -04:00
yoshibot 8fbc0d7f69 remove bogus homebrew gzip; objdump allowed to fail in that way 2016-05-18 23:52:06 -05:00
yoshibot bb90c8366a Fixed bugs in OS X alert code and simplified; added more NULL checks in OS X resource code 2016-05-18 22:13:53 -05:00
Alam Ed Arias 6aa1aeb838 build: include own copy of SDL2main 2016-05-18 22:25:06 -04:00
Alam Ed Arias ef488d2b03 MSVC: link to SDL2main, then SDL2 2016-05-18 21:41:27 -04:00
Alam Ed Arias 7193df7f75 MSVC: turn off SAFESEH for SDL release builds 2016-05-18 21:28:53 -04:00
Alam Ed Arias ab9f2ea831 MSVC: fixup Debug build linked 2016-05-18 21:11:30 -04:00
yoshibot df89563882 Add a way to build OS X binaries (not .app) through Makefiles 2016-05-18 19:14:53 -05:00
Alam Ed Arias 7058baed44 Merge branch 'master' into next 2016-05-18 20:07:27 -04:00
Alam Ed Arias 205d16e3af added unsaved project changed 2016-05-18 20:05:24 -04:00
Alam Ed Arias a4b0f89caf MSVC: fixedup SDL2 build 2016-05-18 20:01:50 -04:00
Alam Ed Arias bbf9f5adc8 Makefile: use built-in SDL2 and SDL2_mixer for Mingw32 and Mingw64 2016-05-18 16:54:55 -04:00
Monster Iestyn b4cf7fbc97 Fix player 1 and player 2 affecting whether the other can see skyboxes or not 2016-05-18 18:20:56 +01:00
Monster Iestyn 1e50691e08 Remove extern for unused "oncontinuescreen" variable 2016-05-18 17:41:11 +01:00
Inuyasha ab7af594d9 Merge branch 'nights-hotfix' into 'next'
NiGHTS hotfix

Fixes the following issues relating to playing as NiGHTS Super Sonic that apparently popped up between 2.1.14 and next (mostly due to the changes to SRB2's trig stuff it seems):
* Super Sonic drifts to the side at some angles around an axis, and is unable to go directly upwards or downwards as a result
* Drilling to the side when on the ground causes the drill sound to constantly restart
* CEZS's start not actually being lined up properly with the first axis means the player is not able to go backwards along the track (because the player is not actually aligned with the track properly, preventing you from touching the attached line transfer)
* trying to hug some walls such as the tall wall before the library section of CEZS allows Super Sonic to go through them

These fixes needs proper testing before this branch can be merged in, in case they accidentally break other things as a result or something.

See merge request !71
2016-05-18 07:09:05 -04:00
Alam Ed Arias 5aa48cf7ca fixed up old VS 2010 project to work with VS 2015, tested with FMOD/DirectX 2016-05-18 01:35:35 -04:00
yoshibot 928c6acf4b Simplify OS X bundle resource discovery, fix a sigsegv 2016-05-17 22:56:49 -05:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn e3dac00aa9 If player is at wrong distance from axis, correct x/y position in a similar fashion to how momentum is set for homing attacks. Don't use trig here for most cases since that just re-introduces the side drift issue and friends all over again.
This fixes the CEZS issue where the player start is not actually on the track, preventing the player from going backwards until they hit a wall.
2016-05-16 19:00:34 +01:00
Monster Iestyn ea1cac8e24 Fix NiGHTS drill constantly starting if you're moving sideways on ground
Also disabled normal mobj friction from NiGHTS and tweaked bouncing code just in case?
2016-05-15 22:09:22 +01:00
Monster Iestyn 89ce257248 Fix all the NiGHTS issues in one fell swoop (assuming they are fixed, that is, lol)
Basically I kind of worked around any potential trig inaccuracies by not using the player position directly for setting momx/momy. This way, if player->angle_pos == player->old_angle_pos, momx/momy are zero
2016-05-14 23:57:56 +01:00
Monster Iestyn f579a12d2c Fix up more Lua error messages to be more meaningful (and work properly, in some cases) 2016-05-14 23:52:40 +01:00
Monster Iestyn 947e8c56ec Removed redundant momx/momy assignment from NiGHTS movement code.
Specifically, the being-hit code, where P_NightsTransferPoints is called afterwards anyway
2016-05-14 22:52:12 +01:00
Alam Ed Arias dff64b854a remove blank lines at EOF of new files 2016-05-13 00:12:51 -04:00
Inuyasha a595f2369c fix infinite bounce rings 2016-05-12 13:52:41 -07:00
Monster Iestyn 00516e5e9f Update comment stating visplane_t size in bytes 2016-05-12 18:02:44 +01:00
Inuyasha 3235351b99 And now Lua yells at you for doing what I just fixed 2016-05-11 14:33:50 -07:00
Inuyasha fbce35d27e cast P_Random(Key/Range) PRNG calls to INT64 to preserve old behavior
(it's still technically "undefined" behavior anyway)
2016-05-11 13:54:40 -07:00
Alam Ed Arias a529dca69f SDL: in the SDL 2.0 interface code, we use a fake surface as our vidsurface, so we should be freeing it 2016-05-10 18:20:14 -04:00
Monster Iestyn 70a72baabc Revert texturepresent size increase, check for negative top/mid/bottom texture values so as to not go out of bounds the other way 2016-05-10 20:19:42 +01:00
Alam Ed Arias d89890ff85 tables: slipts the loops tables into diff files 2016-05-10 10:54:59 -04:00
Alam Ed Arias be0c062c5b Precache: fix off by one, making the precache code write into memory it should not be touching 2016-05-09 20:10:14 -04:00
Inuyasha a9be5ba867 fixed memory issues Alam running valgrind found 2016-05-08 20:34:43 -07:00
Inuyasha 987f65fde8 Merge branch 'demo-replay-fixes' into 'next'
Demo replay fixes

Changes made/bugs fixed in this branch:
* Replay camera is now controllable when climbing (https://mb.srb2.org/showthread.php?t=38668), and in waterslides
* localangle (read: the angle between you and the camera, I think) now doesn't change during demo replays in most situations, unless the player is in analog mode. Exceptions include zoomtubes and NiGHTS super
* Replay camera now doesn't act silly if the player is in analog mode (assuming you also recorded it in that mode to begin with, anyway)

See merge request !66
2016-05-07 06:17:39 -04:00
Nipples the Enchilada fe20a35aee Disable camera rotate buttons if you aren't viewing yourself
They don't affect what you're viewing anyway and cause cam_rotate to get
messed up.
2016-05-07 04:51:54 -04:00
Inuyasha 1c81f192d8 it isn't settled until you add in the deprecation warning 2016-05-06 21:52:00 -07:00
wolfy852 5e50a51386 [2.1.15] Restore backwards compatibility for tan()
DO NOT MERGE THIS INTO THE INTERNAL REPO. This is a temporary 2.1.15 only fix. This commit allows an optional boolean for tan(), which when true will automatically shift angles by ANGLE_90.
2016-05-06 17:48:28 -05:00
Inuyasha 604ae7d072 move variable fetching from Lua out of min/max macros 2016-05-05 19:23:46 -07:00
Monster Iestyn c8cdded81e Multiply downwards thrust on slopes by the actual "gravity" variable. Also account for mobj scale (it affects gravity added in P_CheckGravity, so it makes sense here). 2016-05-05 18:19:06 +01:00
Monster Iestyn 857cd32369 step through light heights too if there is an overflow for a midtexture column 2016-05-05 17:49:57 +01:00
Inuyasha ce4b5db494 organize conditions in a more optimized way
the most common condition (correct drawing) shouldn't be last, however it can't be first without making the conditions longer anyway.

it's a nitpicky thing, but this is the renderer we're talking about here.
2016-05-05 07:20:53 -07:00
Inuyasha 5e8be250a7 fix going under FOFs causing artifacts
i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs
2016-05-05 06:33:19 -07:00
Inuyasha cd877fea1f Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into pub_next 2016-05-05 02:32:29 -07:00
Inuyasha 4274fb7b92 I hate FOFs; attempted to fix extra tall FOFs breaking
Previous overflow fix resulted in extra tall FOFs disappearing up close (see: ERZ1's elevators at start)
This works "better" in that only some lighting bugs and really really finicky visual glitches show now. I give up trying to totally fix this stuff dfsdfgdgf
2016-05-05 02:31:53 -07:00
Wolfy 0549ac270b Merge branch 'toast_credits' into 'next'
One more name in the credits

I probably messed up by making toast_credits based on master instead of next. If that's blocking, just delete this branch and I'll re-do it. It's a single line, though - shouldn't exactly matter so much.

Could probably stand to be merged into Internal as well, since I hadn't actually worked on any textures when we'd updated the credits there.

See merge request !69
2016-05-04 16:25:16 -04:00
toasterbabe a4a5ac161f One line through selfish methods. Probably works in both Next and Internal. 2016-05-04 20:14:24 +01:00
Inuyasha bd935a6a5c that should be skin2, not skin 2016-05-04 05:45:18 -07:00
Inuyasha 93a9b0cc84 update patch stuff again.
please don't make me do this again.
2016-05-04 05:43:05 -07:00
Inuyasha 652ddfef9a invalid skins when starting a local game no longer break
see https://mb.srb2.org/showthread.php?t=41370
2016-05-04 03:23:29 -07:00
Inuyasha 460620ff8a Merge branch 'gl-slopes' into 'next'
OpenGL slopes

Exactly what it says on the tin, obviously.

See merge request !68
2016-05-03 19:39:38 -04:00
Monster Iestyn 2954a43ce0 Merge branch 'next' into demo-replay-fixes 2016-05-03 15:29:57 +01:00
Monster Iestyn 2c221da453 Revert "Fix up the ceiling sky hack (yuck) a bit so my commit doesn't break thok barrier planes now"
This created HOMs in THZ2's skybox, ack.

This reverts commit eba382df1b.
2016-05-03 15:26:54 +01:00
Monster Iestyn 300275534f Merge branch 'next' into demo-replay-fixes 2016-05-03 15:10:30 +01:00
Inuyasha 8adacf7c32 update to use 2.1.15 assets 2016-05-03 06:02:52 -07:00
Inuyasha 782f6e9330 dupx and dupy are important for Lua too 2016-05-02 22:25:00 -07:00
Monster Iestyn f0bea2cebf Merge branch 'next' into gl-slopes 2016-05-02 22:51:51 +01:00
Monster Iestyn eba382df1b Fix up the ceiling sky hack (yuck) a bit so my commit doesn't break thok barrier planes now
Interestingly these changes somehow fix how thok barrier walls block the planes, which was an issue even before slopes I believe
2016-05-02 22:08:14 +01:00
Monster Iestyn b5afc70cc8 Hack to fix DSZ2 left route waterslide: apply Red's step up changes only to slopes
that is, I believe slopes are why he added this code anyway *shrugs*
2016-05-02 17:04:28 +01:00
Inuyasha 7c79bbc0b3 Proper overflow checking, applied to FOFs and midtex's too
This fixes the annoying flickering when you pass by water, FOFs, tall grass, etc.
2016-05-02 05:29:30 -07:00
Inuyasha 37575d2219 Revert "Another thing that probably needed to check for slopes"
This breaks plane display for thok barriers

This reverts commit ee00da6a74.
2016-05-02 04:08:48 -07:00
Inuyasha bb9098b532 Merge branch 'portal-fix' into 'next'
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
2016-05-01 22:03:37 -04:00
Monster Iestyn 2ddde83601 General improvements to Lua error messages for out-of-bounds stuff.
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?!
2016-05-01 22:14:42 +01:00
wolfy852 a077be85cf Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into next 2016-04-30 15:00:04 -05:00
wolfy852 969a254cb6 Remove the super float from non-Sonic characters
Should fix conflicts with Lua-scripted jump spin abilities.
2016-04-30 14:59:51 -05:00
Alam Ed Arias 26f78de3b4 Merge branch 'master' into next 2016-04-30 11:45:11 -04:00
Sean Ryder 0eb41b4450 Flip fade mask Y coordinates
For some reason every texture and flat loaded into GL is vertically flipped
2016-04-30 13:40:00 +01:00
wolfy852 6fcb6d27fe Fix Lua not having access to timeshit
Fixes http://mb.srb2.org/showthread.php?t=41403. Not sure why nobody noticed this earlier.
2016-04-30 03:19:00 -05:00
Sean Ryder d2d73f085d Change internal formats of screen fade texture to RGB
Don't think either of them need RGBA
2016-04-29 20:56:46 +01:00
Sean Ryder 55a1de899c The fade masks textures should use an alpha format
So they don't get effected by the texture format set by the screen depth
GL_RGB5_A1 from 16-bit was removing all alpha from the texture
2016-04-29 18:58:20 +01:00
Monster Iestyn 770fa6f924 Disable 16bpp drawing code since nothing of it is currently used anyway 2016-04-29 18:32:03 +01:00
Monster Iestyn 8fd8f2c316 Disable "splats" command unless WALLSPLATS is enabled
apparently it was never used for what exists of floor splats' code, huh
2016-04-29 18:01:05 +01:00
Inuyasha 8e753c1886 compilation fix for DEBUGRANDOM 2016-04-27 17:17:35 -07:00
Monster Iestyn ac3de70c93 Merge branch 'slope-fixes' into 'next'
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
2016-04-26 17:21:27 -04:00
Monster Iestyn 0a887948eb Ensure pixhigh/pixlow is always set whenever the game decides a top/bottom texture should be drawn
This fixes the rendering glitches encountered around slopes in Glacier Gear, yes. :)
2016-04-25 18:48:14 +01:00
Inuyasha b288d8a399 Merge branch 'bp_random2' into 'next'
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
2016-04-24 18:03:13 -04:00
Monster Iestyn b8cc36dfd1 P_LookForEnemies should not change the player's angle until the target has been decided
This fixes a quirk with Shadow with chaos control sometimes throwing the player in the wrong direction
2016-04-22 22:28:00 +01:00
Monster Iestyn d53801c85c Disable the corona-related consvars unless ALAM_LIGHTING macro is enabled 2016-04-21 18:50:30 +01:00
Monster Iestyn 009616e6ac Merge branch 'next' into gl-slopes 2016-04-20 20:47:47 +01:00
Monster Iestyn ab2cadd372 Merge branch 'next' into slope-fixes 2016-04-20 20:47:11 +01:00
Monster Iestyn ae491f1b8c Merge branch 'next' into skybox-hotfix 2016-04-20 20:46:43 +01:00
Monster Iestyn 96d329ad49 Merge branch 'next' into portal-fix 2016-04-20 20:46:13 +01:00
Monster Iestyn dcf1ccb950 Merge branch 'next' into demo-replay-fixes 2016-04-20 20:45:43 +01:00
Monster Iestyn e0604bb5f3 Merge branch 'master' into next 2016-04-20 20:27:09 +01:00
Monster Iestyn 69b43aee2d Fix how FF_CUTEXTRA FOFs carry over cutting ability to FOFs below them in the same sector, even if they shouldn't do that 2016-04-20 20:26:41 +01:00
Monster Iestyn 8d7edbff1a Merge branch 'next' into gl-slopes 2016-04-20 18:21:49 +01:00
Monster Iestyn c833f3845f Merge branch 'next' into bp_random2 2016-04-20 18:18:28 +01:00
Monster Iestyn e05951e213 Merge branch 'next' into slope-fixes 2016-04-20 18:17:14 +01:00
Monster Iestyn d47ccb0859 Merge branch 'next' into skybox-hotfix 2016-04-20 18:16:46 +01:00
Monster Iestyn 42b281f06c Merge branch 'next' into portal-fix 2016-04-20 18:16:16 +01:00
Monster Iestyn 60ec0ff294 Merge branch 'next' into demo-replay-fixes 2016-04-20 18:15:36 +01:00
Monster Iestyn b797ae9731 Merge branch 'master' into next 2016-04-20 18:05:51 +01:00
Monster Iestyn 0aba2f607b Fix FOFs with FF_CUTSOLIDS but not FF_SOLID causing software renderer problems and even crashes
Always wondered why a flag meant for FOF physics was used in the rendering code, lol
2016-04-20 18:04:51 +01:00
Inuyasha a26989c903 brevity is a virtue or something like that 2016-04-18 21:59:33 -07:00
Inuyasha 18d5d64a4d error conditions for Lua fixed point math 2016-04-18 14:50:15 -07:00
Monster Iestyn be7b866e4f resynch_pak changes
* 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
2016-04-16 18:40:14 +01:00
Monster Iestyn f96b830f36 Write/read FOF flags as 32-bit not 16-bit, whoops 2016-04-16 18:06:26 +01:00
Monster Iestyn 7830a9e27b Splitscreen fix: half of GFZ1's invinc monitor should no longer appear above the bridge for player 2
I don't know if there's any other vid.height/viewheight confusion like this around, but that was the cause apparently
2016-04-10 20:27:55 +01:00
Monster Iestyn 11c24f5ab6 Merge branch 'next' into gl-slopes
# Conflicts:
#	src/hardware/hw_main.c
2016-04-09 22:12:29 +01:00
Alam Ed Arias b9eed02123 whitespace clean 2016-04-07 16:34:36 -04:00
Inuyasha 3b4b7a05fd Better CTF in splitscreen, no death message for spectators 2016-04-06 19:55:58 -07:00
Inuyasha 0dd92e9396 V_DrawFill in OGL now consistent with software 2016-04-06 18:33:38 -07:00
Inuyasha 3117a6a16e Splitscreen fixes
initialize flipcam2
player 2 gets game over music now.
restore the other player's music when the dead player is done sulking about their game over
2016-04-06 18:28:43 -07:00
Inuyasha 5aea82ec91 Some drawing code cleanup
Fixed mashing buttons during fades causing crashes,
messed up behavior, record attack anywhere,
all the damn stupid bugs that it caused, basically
2016-04-06 18:01:01 -07:00
Monster Iestyn b1e736242f fixed all compiling errors relating to ESLOPE being undefined 2016-04-06 22:19:39 +01:00
Inuyasha e91cfa7110 Fixed frustrating MIDI stuff
Until we use something besides Native MIDI to play
back MIDI music, MIDI volume changing is disabled
since it causes way too much of a damn headache.
(It's not even our fault, it's fucking MS.)
2016-04-06 08:16:13 -07:00
Monster Iestyn 29f0301540 Whoops 2016-04-05 21:21:45 +01:00
Monster Iestyn e8a4d7b7b8 Fix replay camera not being turnable when climbing, sliding ...and several other things.
If in analog mode, this does not apply (also analog mode replay camera no longer borks)
2016-04-05 20:56:48 +01:00
Monster Iestyn 1df25050be Merge branch 'next' into bp_random2 2016-04-05 17:26:05 +01:00