Commit Graph

159 Commits

Author SHA1 Message Date
toasterbabe 8d8be8a7b2 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-08-30 13:30:56 +01:00
Monster Iestyn 541c53c3e1 Merge branch 'public_next' 2016-08-27 15:49:32 +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 8b519631f8 * Keep the camera still when ending a NiGHTS map. http://gfycat.com/ComplicatedComposedAoudad
* Correcting an earlier oversight with the SPR2_ defaulting system for super forms.
2016-08-12 15:40:17 +01:00
toasterbabe 9c02c81095 Now that it's not 3am, here's some fixes to what I pushed last night.
* That hacky anti-NiGHTS-deaxisment code I commented out because I thought it was visual only? Reimplemented in a way that is both more and less hacky. It's identical in result to the original code, but takes a roundabout method to get there.
* Sprite references for SUPE, SUPZ and NDRL are removed because they are now unused.
* Helper's flashing conditional is restructured to do less flag swapping.
* The check for super setting FF_FULLBRIGHT is limited to MAXTRANSLATIONS now, and also correctly takes into account MAXSKINCOLORS == SKINCOLOR_SUPERSILVER1.
* NiGHTS collision bounds aren't hardcoded anymore.
* NiGHTS link will never display when leaving stage.
* Slightly tweaked rules for the supercolor setting when doing a NiGHTS transformation, but only meaningful for setting FF_FULLBRIGHT.
2016-08-12 14:42:22 +01:00
toasterbabe 0c3256fa14 NiGHTS is now spr2-ised. i'll upload the relevant files and etc to the ftp
* if you can turn SF_SUPER, flash your skin's supercolor, otherwise be your normal color
* if your skin doesn't have a SPR2_NGT0 (horizontal fly), use Sonic's (this will hopefully be replaced by 2.2 with sprites of NiGHTS themselves)
* MT_NIGHTSCHAR made irrelevant, everything follows actor->target instead of actor->target->tracer now
* emerald is now player->mo->tracer instead of player->mo->tracer->target
* nightopian helpers flash for the 35 tics before they disappear
* nights capsule makes boss explosions/noises now (i can change it back i just like it better)
* drill off into the sky instead of fly up in floating pose (but no noise yet)

ALSO:
* default maxdash is now 70
* forgot to add supercolor to lua, it is there now
* SPR2_SMSL renamed to SPR2_SSTN (stun)
* any player with a skincolor that's in the super range is set to FF_FULLBRIGHT at state-set time, so no need to keep super players non-fullbright just because they use spin stuff
2016-08-12 02:57:37 +01:00
toasterbabe c9227dfbed Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-08-06 12:34:26 +01:00
Alam Ed Arias 7b88db478c Merge branch 'public_next' into private 2016-07-21 19:22:30 -04:00
toasterbabe f1311c515d Making FF_MIDDLESTARTCHANCE more useful for FF_ANIMATE animations. 2016-07-19 13:45:31 +01:00
toasterbabe ac2ff5e386 CA_MELEE. Mostly complete.
* When moving slowly, P_InstaThrust at S_SKIN's maxdash forward, and set momz to S_SKIN's mindash upwards. Plays a tok noise (not thok). Hurts enemies/bosses, busts spikes/monitors/all types of bustable blocks.
* When moving quickly... doesn't do anything yet, but WILL do a slide.

Also, P_DoSpinDash is now renamed to P_DoSpinAbility, and CA_TWINSPIN users can bust all bustable blocks on collision too.
2016-07-17 21:31:15 +01:00
toasterbabe 4168fc02cb Decided the forcing of S_PLAY_FALL when PF_THOKKED was present wasn't that great. 2016-07-17 18:57:03 +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 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
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
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 df8be73787 ...fixed this error 2016-07-15 22:13:47 +01:00
toasterbabe 03fe312490 On MI's reccomendation, a skin flag to disable the effects of FF_MIDDLESTARTCHANCE for specific characters whose animations might not be symmetrical. 2016-07-15 17:30:52 +01:00
toasterbabe 01dc98f8f0 New frame flags for more complicated animations.
* FF_MIDDLESTARTCHANCE - has a 50% chance of starting the spr2 or FF_ANIMATE animation halfway in
* FF_SPR2ENDSTATE - if var1 == S_NULL, don't loop, just stop incrementing the frames. Otherwise, go to the state represented by var1.

The former is just something I did for fun, the latter is something that'll come in handy when porting in new-character-moves.
2016-07-15 16:48:30 +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
toasterbabe eee6a6ff45 Optimisations to the character select screen.
* If a character select character image is not set, don't iterate every tic - iterate on first image get and then save to the struct.
* A character select screen with only two characters now has special case handling.
* A memory leak in the making has been plugged. (specifically, picname not being Z_Free'd if the loop fails to do so)
* Logic/operation simplification.

Also, some typo corrections and clarity case movements of stuff in other files I've been looking at.
2016-07-11 23:01:43 +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 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 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
Alam Ed Arias c23b40fa9c Merge branch 'public_next' into master 2016-06-02 18:39:08 -04: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 b51a1148d1 Merge branch 'public_next' into master 2016-05-25 10:21:55 -04:00
Alam Ed Arias 57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Alam Ed Arias 032313260a Merge branch 'public_next' into master 2016-05-20 17:58:57 -04:00
Alam Ed Arias 7058baed44 Merge branch 'master' into next 2016-05-18 20:07:27 -04:00