Commit graph

1553 commits

Author SHA1 Message Date
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 df8be73787 ...fixed this error 2016-07-15 22:13:47 +01:00
toasterbabe 1e648e4709 Woops, forgot SOC parser. 2016-07-15 17:32:29 +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 9b68da63de Minor cockup with availability handling not being updated when I changed how it worked. 2016-07-14 17:10:17 +01:00
toasterbabe b8fe20a086 Changing irrelevant comment. 2016-07-14 16:27:48 +01:00
toasterbabe 4c6ed6da76 The availability unlockable number for a skin is now available, read only, to Lua. 2016-07-14 15:51:03 +01:00
toasterbabe 417e9187d9 Realised the potential for out-of-bounds memory accessing, so put some limits in place to prevent that from happening.
(skin->availability is a UINT8, so it'll never be negative)
2016-07-14 14:45:15 +01:00
toasterbabe caed5718c1 Characters can now be unlocked just like any existing unlockable.
Setup:
* S_SKIN needs an "availability" line. Set to 0 to have always available, otherwise is assumed to be UINT8 unlockable number. If it's a valid unlockable, its name will be copied over with the character's realname.
* Define an unlockable via SOC or hardcode. If you don't want it visible on the Secrets menu, just set its type to None. Everything else is as normal - you can set the conditionset to whatever, objective, height, nochecklist, nocecho...
2016-07-14 14:39:22 +01:00
toasterbabe c5f6ae8aaa Fixed forceskin to not always allow due to bad logic. 2016-07-14 13:24:57 +01:00
toasterbabe 674ec3e515 Correction of the new default revitem setup. 2016-07-14 12:31:20 +01:00
toasterbabe 6e0c9f7e18 The "forcecharacter" level header now allows for hidden characters.
Also, new default for revitem to match player.dta, and an updated Force Skin netgame option name to reflect the fact it's string based now.
2016-07-13 22:28:23 +01:00
toasterbabe 76910a8e11 Sorry, one last change. I know I should be more certain when committing. 2016-07-13 20:24:39 +01:00
toasterbabe f1b1e1aa9b I'm stupid. 2016-07-13 20:19:52 +01:00
toasterbabe 2ee22fc40a Dedicated servers have all skins unlocked for the purpose of forceskin.
Meanwhile, a sneaky sneaky for hiding hidden characters further.
2016-07-13 20:14:07 +01:00
toasterbabe a108fcce5b Simplification of the hide check after discussion with Rob. 2016-07-13 19:10:31 +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 8087cde5db Correcting a few cockups. 2016-07-13 13:26:21 +01:00
toasterbabe b2bfe3737a Rudimentary SOC shuffling if you add a character with the same name as a previous character to prevent character select from breaking. 2016-07-13 12:17:53 +01:00
toasterbabe fcfe8c0132 More clearly defined handling for replacing character select images. Specifically takes into account whether the hidden character was added in this file or a seperate one.
Also, removed some commented out code regarding character selects, and removed a useless case for R_SkinAvailable().
2016-07-12 20:10:01 +01:00
toasterbabe 80a3d79d4d Some hacks added to forceskin to:
* support hidden characters
* take the skin->name, not the number
* display the skin->name in the menu

Also, minor tweaks to other things.
2016-07-12 14:40:20 +01:00
toasterbabe b5108afe16 Substantial re-engineering for the foundations of hidden characters.
R_SkinUnlock defines the circumstances under which a skin is available. For simplicty's sake, I've currently bound it to an S_SKIN variable so I can toggle it easily, but it WILL be replaced with a hook into the savegame system at some point.
* Currently has three tiers of unlock - freebie (forceskin or modeattacking via a loaded replay), Ringslinger Only, and SP/Coop and Ringslinger.
* I don't know anything about netcode so I basically decided to make R_SkinUnlock relevant only under local circumstances, try as hard as possible to stop bad skin info from getting sent to the server, and then admit defeat once the server has the information. If this is a bad choice, please discipline me and show me how to fix it.
* Character Select now checks for whether the character is hidden or not on menu load and does/undoes it based on that info, but will never touch one disabled via SOC. I also used this opportunity to optimise, checking for/filling out charsel pictures instead of doing it later. (It now also includes special casing for a select screen with zero characters!)
* Mode Attack now hides hidden characters in its character select based on SP rules.

Things that still need to be done:
* ForceSkin_OnChange. Is there a graceful way to handle this?
* No obvious skin name conflicts. Add a salt to the names of hidden skins, and then remove it when they're unhidden?
* The gap between Knuckles' skin number and the first custom character anybody adds will be way too obvious. A seperate hidden skin numbering system? Start at 32 and count up from there? There's a few ways...
2016-07-12 03:15:58 +01:00
toasterbabe ee92e043b9 Preparation for hidden characters, making sure R_SkinAvailable was being used where appropriate.
Also, bugfix for something my optimisation introduced.
2016-07-11 23:40:31 +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 8f0994b38b Merge branch 'public_next' into master 2016-07-11 16:22:05 -04:00
Alam Ed Arias 6f8d22d507 Merge branch 'next' into public_next 2016-07-11 16:15:03 -04:00
Alam Ed Arias 765d68899f Merge branch 'master' into next 2016-07-11 16:10:40 -04:00
Alam Ed Arias 11d76a6562 Merge branch 'build-modes' into 'master'
For GCC 6.1 builds

I do not know what I was doing:

NULL checks

building without BLUA support

functions that do not depend on outside vars should be tagged with "const", AKA, FUNCMATH

See merge request !89
2016-07-11 15:59:20 -04: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
Alam Ed Arias 4584afbd24 Merge branch 'next' into public_next 2016-07-11 15:32:03 -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 d8d8333719 S_SKIN now supports both DS* and sfx_* prefixes for sounds. 2016-07-10 13:22:49 +01:00
toasterbabe 7fe80a7f31 Minor optimisations and clearer code. 2016-07-10 12:35:24 +01:00
toasterbabe 8ab32ca93a Significant improvements to the Character select screen in preperation of implementing unlockable characters.
* Characters disabled through SOC are outright removed. No awkward gap in scrolling - no hint they were ever there in the first place.
* Vertical loop - the character select images are visually continuous. No matter where you are in the chain, you'll always see a hint of the character above or below your current selection in the chain.
* Smooth scrolling - Moto and Prime showed me a gfy from back during 2.1 development where it was super smooth. I didn't make it as slow as that one, but the smoothness was easy to add and the reason it was removed previously - gaps in the character select leading to varying speeds - is no longer relevant.
2016-07-10 02:05:59 +01:00
toasterbabe 625cb39af7 Dashmode now destroys spikes and monitors on contact. Enemies? Probably not for now. 2016-07-09 16:53:41 +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 331ea9814f version numbers, etc 2016-06-29 20:01:22 -07:00
Monster Iestyn 2761c04cb9 Merge branch 'next' into public_next 2016-06-23 17:15:21 +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
Inuyasha a938efa328 Merge branch 'climbing_shit' into 'next'
Climbing on one-sided linedefs

Does what it says on the tin. You couldn't before, now you can.

With this branch, thok barriers are now completely optional for maps with no aesthetic need for sky-topped walls. All the bugs and complications that exist with climbing right now still exist, except now there's one less issue making them suck forever and now Nev3r will be very happy.

Do I need a testing .wad? It's... not that hard to create a very small map and go nuts with Knuckles in it. I have one, but uploading it to the ftp almost feels insulting.

See merge request !90
2016-06-22 19:02:00 -04:00