Commit Graph

186 Commits

Author SHA1 Message Date
toasterbabe df8568642e Dashmode users can break spinbust blocks when dashing, twinspin users can break both spinbust and Knuckles-only blocks when twinspinning. 2016-07-17 16:34:07 +01:00
toasterbabe 898e17a441 SF_MACHINE characters create boss explosions on death.
Also, the gravity of drowning characters has been reduced to look more natural.
2016-07-16 23:26:52 +01:00
toasterbabe 8cb8990863 Merge branch 's_skinprovements' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-07-16 22:44:01 +01:00
toasterbabe f757fb3545 SF_MACHINE. Currently only changes drowning, but could do more.
* Electric sparks coming off entire body instead of bubbles coming out mouth
* Different sounds.
* Different icons.

These sprites are currently local only, but I'll be doing a lot of asset updating this evening since Rob asked me to so it won't be long until you can get them.
2016-07-16 22:43:49 +01:00
Alam Ed Arias 4e064dc335 whitespace: cleanup 2016-07-16 16:05:00 -04:00
Alam Ed Arias e393b12cec Merge branch 'master' into s_skinprovements 2016-07-16 16:04:10 -04:00
Alam Ed Arias 4e322af6cb whitespace: cleanup 2016-07-16 16:03:32 -04:00
toasterbabe d8065fa525 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements
# Conflicts:
#	src/d_player.h
#	src/dehacked.c
#	src/info.c
#	src/p_user.c
2016-07-16 17:23:25 +01:00
toasterbabe 94490623b5 Cleanup of P_CheckUnderwaterAndSpaceTimer's conditional checks for future PF_ROBOT changes, where characters like Metal make electric zaps instead of bubbles. 2016-07-16 17:11:34 +01:00
Monster Iestyn 9b15247191 Merge branch 'dashmode' into 'master'
Dashmode

This branch Metal Sonic's abilities (CA_DASHMODE) to the game.

See merge request !26
2016-07-16 12:09:20 -04:00
toasterbabe 226785dcd6 Putting the swim animation checks in one place. 2016-07-16 14:45:22 +01:00
toasterbabe cc35a5e1c1 Ported CA_HAMMER from new-character-actions in a way that takes advantage of all of the non-hardcodey things I've added in this branch.
Also, it's called CA_TWINSPIN because that's more inoccouous.
2016-07-16 13:55:12 +01:00
toasterbabe 824458a5ff Swimming animation! Since I know we want it for Smiles eventually.
Also, I guess CA_SWIM isn't forced into running on water anymore.
2016-07-13 18:18:18 +01:00
toasterbabe c2aba46298 New S_SKIN attributes.
* radius - sets the player's radius for that skin.
* height - sets the player's normal height for that skin.
* spinheight - sets the player's spinheight for that skin.
* shieldscale - see http://i.imgur.com/BQ5DhKC.png for justification
2016-07-13 15:15:45 +01:00
Alam Ed Arias b347ed2ca6 Merge branch 'public_next' into master 2016-07-11 15:52:27 -04:00
Alam Ed Arias 59fd7bbe46 Merge branch 'public_next' (early part) into private 2016-07-11 15:50:06 -04:00
toasterbabe 7c63a96bf1 Logic error. Now works as described previously. 2016-07-10 20:03:08 +01:00
toasterbabe 8431f64300 A thorough reimplementation of Nojumpspin for the SPR2_ age.
* SF_NOJUMPSPIN - Player's height is full whilst jumping, SPR2_JUMP defaults to SPR2_SPNG instead of SPR2_SPIN, and the player goes into fall frames if they start moving downwards or use their ability.
* PA_JUMP - for jumping (upwards in the case of SF_NOJUMPSPIN.
* SF_NOJUMPDAMAGE - Ala rosy.wad, don't damage enemies, etc when jumping into them.
* SF_STOMPDAMAGE - Just for fun. Ala in Mario, always damage enemies when you land on top of them (your gravity reference, not theirs).
* SF_MARIODAMAGE - SF_NOJUMPDAMAGE|SF_STOMPDAMAGE is reasonably accurate to the Mario games, and might as well be surfaced as such.

Also, a minor change:

* Instead of not spawning the revitem if your SPR2_ is SPR2_DASH, don't spawn it if it's set to 0. This requires the player.dta I uploaded a couple days ago to behave as it was previously.
* Don't get stuck in spindash frames if your maxdash is 0, and don't flash rolling frames if you're on goop.
2016-07-10 18:41:38 +01:00
toasterbabe cee37819cd Dashmode now has its own animation, SPR2_PEEL. Requires a new PLAYER.DTA. I made a lot of references to the peelout here because I'm not sure what else to call a Sonic character's faster-than-usual-running animation and SPR2_DASH was taken.
* SPR2_PEEL, SPR2_SPEE.
* S_PLAY_PEEL, S_PLAY_SUPER_PEEL.
* PA_PEEL.
* Dashmode actually starts charging from runspeed instead of the arbitrarily calculated (normalspeed - 5*FRACUNIT). This just made things easier, honestly, and it's 1 FU of difference compared to the current test case.
2016-07-09 14:52:49 +01:00
toasterbabe c5ca1a8f24 The dashmode struct variable now has a cap, per a Wolfs request. 2016-07-07 01:40:28 +01:00
toasterbabe 64ef2798a2 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into dashmode
# Conflicts:
#	src/d_clisrv.c
#	src/d_clisrv.h
2016-07-07 01:08:51 +01: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
Alam Ed Arias e5a14d859e Merge branch 'public_next' into private 2016-05-27 11:37:09 -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 032313260a Merge branch 'public_next' into master 2016-05-20 17:58:57 -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 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 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 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 398dbed4ed Merge branch 'public_next' into master 2016-05-07 11:35:05 -04: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
Monster Iestyn 01debc27a2 Merge branch 'public_next' 2016-05-06 18:06:18 +01:00