Commit Graph

123 Commits

Author SHA1 Message Date
Monster Iestyn 45fdfd9f37 Merge branch 'eggscalibur_fixes' into 'next'
One Eggscalibur fix

Use mobj->watertop instead of mobj->spawnpoint->z. CEZ3 is far from fixed in multiplayer, but this is still one less thing to worry about.

See merge request !148
2017-01-07 10:47:02 -05:00
toasterbabe a4fe3580e2 Forgot to commit this compiling fix. 2017-01-02 19:07:20 +00:00
toasterbabe eb22f347f3 Made Eggscalibur use mobj->watertop instead of mobj->spawnpoint->z because that's not netgame-safe.
CEZ3 STILL has some ridiculous inconsistencies, but this is one less to worry about.
2017-01-02 19:04:33 +00:00
Monster Iestyn 7c07f39019 Make sure flipped things placed directly on ceiling get MFE_ONGROUND
This fixes ceiling springs apparently flying down with you in various scenarios
2016-12-05 22:07:16 +00:00
Monster Iestyn 2ef1aaf15c Merge branch 'shield_issues' into 'next'
Fixed players disappearing when spindashing whilst wearing multi-layer shields

* Before: http://i.imgur.com/gxUFElo.png
* After: http://i.imgur.com/NxsOg94.png

The problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this aspect of the issue sooner.

(SORRY FOR THE MULTIPLE MR'S AGAIN I TOTALLY SUCK AT REMEMBERING TO MAKE SURE IT GOES TO NEXT INSTEAD OF MASTER)

See merge request !124
2016-10-29 11:19:09 -04:00
toasterbabe 8025ef2f79 At MI's suggestion (shields don't NEED to be tweaked, just overlays) 2016-10-29 16:08:19 +01:00
toasterbabe 8881a413f3 Fixed that really annoying bug where you disappear when spindashing on top of a FOF whilst wearing a multi-layer shield.
(the problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this issue sooner.)
2016-09-27 17:17:23 +01:00
toasterbabe 394ed30f44 Fixed the problem with the reverseplatform_clipping branch that caused springs to fall through platforms, as tested by Wolfs in TD. 2016-09-22 21:08:36 +01:00
Alam Ed Arias b949f49c68 Merge branch 'master' into next 2016-09-04 20:51:45 -04:00
Wolfy 484bb9535c Merge branch 'more-slope-fixes' into 'next'
More slope fixes (aka sorry guys I made another quick SUGOI fix)

Another slopes fix branch!

This branch currently includes a fix for:
* Knuckles gliding into a slope while in 2D mode causes him to try to "climb" on air above them, if the original non-sloped height is higher. Unfortunately he still tries to grab onto places that he can't really climb on, but at least now it's on the slope itself and not in mid-air lol. This issue is encountered in SUGOI's Retro Hill Zone, if you want to check for yourselves.
* Bustable FOF-busting code for both players AND pushables not accounting for slopes
* (Unrelated to slopes): Fix FF_SHATTERBOTTOM FOFs acting like THZ goop when stood on; I added this fix as a bonus because I encountered it in a test map of mine for the bustables fix

(Other fixes may or may not appear here in the near future, I haven't decided yet. Don't wait on me to get in any further fixes before merging, that said)

See merge request !110
2016-09-04 19:34:29 -04:00
Wolfy 58df0e76c3 Merge branch 'nights_bugfixes_i_almost_put_in_internal' into 'next'
Last-minute NiGHTS exiting bugfix

One single-line fix concerning the end of NiGHTS maps. Extremely small, literally zero side effects here, the only reason I'm not committing directly to master (aside from ettiquette) is that I don't have the ability to do so.

* The NiGHTS drone had a single tic of visibility when you hit the goal, which is evident stepping frame by frame through http://gfycat.com/ComplicatedComposedAoudad (the contents of which may or may not make it into 2.2). This is no longer the case.

See merge request !100
2016-09-04 19:27:12 -04:00
wolfy852 2d94256490 Shut the compiler up 2016-09-03 16:05:45 -05:00
toasterbabe 5bb0b5684e More irrelevant negation reduction, sorry. 2016-09-03 15:46:38 -05:00
toasterbabe 6ff75d2aa1 Double negation becomes single negation, with handy comment! 2016-09-03 21:37:52 +01:00
Monster Iestyn 8f02c50c10 Fix players and pushables not accounting for slopes on bustable FOFs 2016-09-02 21:41:45 +01:00
toasterbabe 3bad307e2d Sorry, Inu. 2016-08-28 20:46:56 +01:00
toasterbabe e8775419d1 Removed now-irrelevant braces. 2016-08-28 14:09:15 +01:00
toasterbabe 25ab977862 ...didn't realise P_InsideANonSolidFFloor checks for FF_EXISTS itself, so HM 2016-08-28 14:06:20 +01:00
toasterbabe c0f5f22b6a Suggested improvement by MI on irc. 2016-08-28 13:51:32 +01:00
toasterbabe 50ce152c69 Cleaned up some performance issues in Skytop Zone (2.1.16: THE SUGOI UPDATE) arising from some inefficiencies with P_GetMobjGravity. FPS drops only occasionally to 34 now, which is a big improvement when I was frequently getting 27 in Salt's 15andahalf.exe. 2016-08-28 13:19:17 +01:00
Alam Ed Arias 0264fd24ae @MonsterIestyn: Should probably be returning true then 2016-08-14 10:43:44 -04:00
RedEnchilada 55b8ef9f64 More stepping upward fixing ugh 2016-08-14 00:03:00 -05:00
RedEnchilada 758c77fe53 Fixed non-players having fucked slope stepup/down 2016-08-13 17:45:23 -05:00
toasterbabe 7795e146fa Two seperate single-line fixes, both concerning the end of NiGHTS maps.
* The NiGHTS drone had a single tic of visibility when you hit the goal, which is evident stepping frame by frame through http://gfycat.com/ComplicatedComposedAoudad (the contents of which may or may not make it into 2.2).
* When completing a NiGHTS stage with a non-zero link, the link could flash up in the final few tics before the fade to black. This just checks for player->exiting to make sure it shouldn't be shown.
2016-08-12 15:56:07 +01: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
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
Alam Ed Arias 8e98c78456 Merge branch 'next' (early part) into toast_slopes 2016-06-19 03:39:42 -04: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
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
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
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
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 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
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 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 57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Alam Ed Arias 7058baed44 Merge branch 'master' into next 2016-05-18 20:07:27 -04:00
Alam Ed Arias a4b0f89caf MSVC: fixedup SDL2 build 2016-05-18 20:01:50 -04: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
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07: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
Inuyasha a595f2369c fix infinite bounce rings 2016-05-12 13:52:41 -07: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
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 c833f3845f Merge branch 'next' into bp_random2 2016-04-20 18:18:28 +01:00