Commit Graph

153 Commits

Author SHA1 Message Date
Sryder 92f33c1d60 Low friction and Disable Jump
We will look into disabling jump a better way later
2017-03-05 22:08:13 +00:00
Sean Ryder be3acfff0b Fix warnings
Possibly fix some whitespace problems
2017-03-04 22:13:19 +00:00
ZTsukei f50ecc0dcd Most items work (netgame needs testing), will do fireballs later. 2017-02-26 17:38:24 -05:00
ZTsukei 98137822b8 Fake Items working - Still a weird bug where the item won't throw if you're turning. 2017-02-26 10:19:33 -05:00
ZTsukei e7280fc53a Some drift adjustments 2017-02-24 20:01:06 -05:00
ZTsukei d9944e9c41 Steering fixes, drifting changed, weight has effect now 2017-02-23 20:37:16 -05:00
ZTsukei 66a206cc55 Driftboosting now increases player accleration
Consolidated the turning and drifting values to k_kart functions for easier editing
Removed 200cc. 50/100/150ccs are a weird amalgamation of the prior values.
2017-02-21 23:42:21 -05:00
ZTsukei 28544af035 Star works, configured to work in multiplayer with just speed items for now... Will return to look for color stuff later. 2017-02-19 19:42:10 -05:00
ZTsukei 7b7a6e5458 Added fancypants mega shroom, fixed drift boosting 2017-02-19 12:19:02 -05:00
ZTsukei d83cbe0b72 BooTake working now, maybe BooSteal does too ¯\_(ツ)_/¯ 2017-02-18 16:46:08 -05:00
ZTsukei 0a782bf79e Fixed thwomp sectors, Added Magnet Item. 2017-02-18 13:39:50 -05:00
Sryder 35b789d330 Fix random duplicate code from merge in hw_main.c and r_segs.c
Whitespace cleanup
2017-02-18 00:25:16 +00:00
Sryder 68d439a783 Merge branch 'upstream/next' into zarrotsu_vanillamerge
# Conflicts:
#	src/Makefile
#	src/doomdef.h
#	src/hardware/hw_main.c
#	src/p_mobj.c
#	src/p_user.c
#	src/r_segs.c
#	src/sdl/i_video.c
#	src/win32/win_sys.c
2017-02-17 20:14:55 +00:00
Sryder 2d6c7959ed Merge branch 'SRB2_release_2.1.15' into zarrotsu_vanillamerge
# Conflicts:
#	.gitignore
#	libs/zlib/projects/visualc10/zlib.vcxproj
#	src/Makefile
#	src/am_map.c
#	src/d_main.c
#	src/dehacked.c
#	src/doomdef.h
#	src/g_game.c
#	src/hardware/hw_main.c
#	src/hardware/hw_md2.c
#	src/info.c
#	src/p_inter.c
#	src/p_map.c
#	src/p_mobj.c
#	src/p_spec.c
#	src/p_user.c
#	src/r_bsp.c
#	src/r_plane.c
#	src/r_segs.c
#	src/r_things.c
#	src/s_sound.c
#	src/s_sound.h
#	src/sdl/Srb2SDL-vc10.vcxproj
#	src/win32/Srb2win-vc10.vcxproj
#	src/win32/Srb2win.ico
#	src/y_inter.c
2017-02-17 20:03:10 +00:00
ZTsukei 370f290a08 Fixed position code, added some item numbers 2017-02-16 21:33:15 -05:00
ZTsukei b0b51f9a61 Some position code 2017-02-12 23:25:06 -05:00
ZTsukei fadcd17022 Some accelcode changes to let CC's work. 2017-02-09 23:57:36 -05:00
ZTsukei 580f909c6c Added Accelcode, start boosting, reverted drifting, etc. 2017-02-07 17:19:58 -05:00
toasterbabe 02d78b355b Smoother ropes and zoom tubes ported from internal. 2016-12-01 14:33:44 +00:00
ZTsukei 66c6b6885f Updates done a while ago... Not 100% sure what they were. :x 2016-11-20 23:23:10 -05:00
toasterbabe ff443251b1 P_IsPointInSubsector now works in both Software and GL, which means it can be used as the main driver behind support for Knuckles climbing on one-sided walls.
Also, the "teleport" devmode command can now gracefully handle coordinates specified outside maps with no/few thok barriers, which previously prevented teleport via the thok barrier bleed's sector floor and ceiling being equal.
2016-10-29 11:54:47 -04:00
Monster Iestyn 8f02c50c10 Fix players and pushables not accounting for slopes on bustable FOFs 2016-09-02 21:41:45 +01:00
Monster Iestyn eae47c9808 Fix Knuckles in 2D mode attempting to latch onto air when gliding into a slope. Now he just attempts to latch onto the slope directly (which I'll fix another time, if I can figure out how)
(fix for SUGOI's Retro Hill Zone)
2016-09-01 21:21:20 +01:00
ZTsukei 82b0e9962e Toaster's friction code??? 2016-08-23 21:04:06 -04:00
ZTsukei da7a513c9a Some drift code, some control code 2016-08-21 17:55:37 -04:00
ZTsukei 3a3180ce05 Redid control names, some item code, start of drift shenanigans 2016-08-20 22:15:11 -04:00
ZTsukei d631d0ef04 S_PLAY states, HUD stuff 2016-08-14 23:51:25 -04:00
toasterbabe 612575620b Solved the climbing-on-one-sided-lines problem another way, using the last touched line's attributes.
(After talking to Alam, we can't have floats anywhere near P_ functions, so.)
2016-08-13 14:16:06 +01:00
ZTsukei 4112d44529 Some Color code, Kart powers 2016-08-11 21:42:16 -04:00
ZTsukei e4a970f894 Starting from scratch. SRB2 v2.1.15 2016-07-06 00:10:19 -04: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 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
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
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 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
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 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
ZTsukei f05816ce69 The devil. The behemoth. p_user.c. Still lacking item roulette code, which needs to be rewritten anyway. 2016-05-28 15:25:06 -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
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