Commit Graph

321 Commits

Author SHA1 Message Date
toasterbabe 61ec599830 * Handles spindash, etc better.
* Handled better up against walls.
* Now always catches thok and thoklikes.
2017-02-06 20:19:17 +00:00
toasterbabe 260b461c39 Drawangle.
Mystic wanted it, just play it - too busy to give proper commit description. Will outline everything it is in the merge request when that happens.
2017-02-05 18:15:20 +00:00
Monster Iestyn 921b57e904 Merge branch 'slopewall_transfer' into 'master'
Slopewall transfer

As @Nev3r wants. Go along a slope, hit a wall? LAUNCH! Well, I mean. He wants it slightly less weak. I have already made it less weak than P_SlopeLaunch.

Also also I made the trail that goes behind the player when they're rolling take into account vertical momentum as well as horizontal, so that being launched directly up didn't leave you trailless.

Test with <root>/!LatestSRB2Files/srb2win_branch_transfer.exe and <root>/Nev3r/ACZMaster.wad (roll down slope directly in front of you).

See merge request !66
2017-01-25 12:30:20 -05:00
toasterbabe cdf388810b Added modified Mario shells. They now hurt everyone if you touch them from the side, and can be stopped by anyone if they stomp on their tops. 2017-01-25 14:53:09 +00:00
toasterbabe 91cbeb5e1a Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into patch_hardcode 2017-01-25 12:24:09 +00:00
Monster Iestyn fb8140312b Merge branch 'flat_alignment_revamp' into 'master'
Revamps of several dated linedef type effects

Felt like being productive so made some things I hate suck less.

Linedef type 7 (flat alignment) now works as follows.
* Linedef angle (from v1 to v2) is flat angle.
* Origin of flat is manipulated to match v1's coordinates - unless ML_NOKNUX is flagged, in which case uses frontside x and y offsets as flat offsets instead.
* ML_NOSONIC prevents changing floor.
* ML_NOTAILS prevents changing ceiling.
* Both of the above flags at once prints a warning.
* (THZ and probably a few other maps need updating.)

Linedef type 540 (friction) now works as follows.
* Controlled by x offset instead of length - offset of -100 is maximum iciness, offset of +483(!!!) is the maximum sludginess BUT things are scaled such that +100 is about the maximum sludginess any reasonable human being would want in a level, 0 is ORIG_FRICTION)
* Not reliant on a sector special to function (can be applied solely by tag to in-map sectors or solid FOF control sectors)
* Uses less memory, perform less calculations, and not bug out objects which just happen to use movefactor for something
* PHYSICS CHANGE: Low friction surfaces actively impede your acceleration (and make your animation speeds faster to give off that Looney Tunes out-of-control effect)
* (ACZ and Frozen Hillside needs updating.)

Sector types 1 and 3 in section 3 no longer do anything.

Linedef type 3 (zoom tube) now works as follows.
* Abs of frontside x offset is speed in units of FRACUNIT/8.
* Abs of frontside y offset is waypoint sequence number.
* Effect 4 flag rotates the player to match the waypoint direction (same as before).
* (ERZ needs updating.)

Linedef type 11 (rope hang) now works as follows.
* Abs of frontside x offset is speed in units of FRACUNIT/8.
* Abs of frontside y offset is waypoint sequence number.
* Effect 1 flag makes rope transfer one-way. (same as before)
* No climb flag makes rope static. (same as before)
* (ACZ and maybe ERZ need updating.)

Linedef type 258 (laser) is almost the same as before, but has altered functionality.
* Its flashing is less obnoxious. (56.25% to 68.75% instead of 100% to 0%, at half the speed)

Linedef type 14 (Bustable block parameters) is new, and works as follows.
* Tagged to the control sector of a block that is likely to be busted (via executor or collision, doesn't matter)
* Concatenation of frontside textures is MT_ object type to spawn, defaults to MT_ROCKCRUMBLE1 if not present
* Sound played when being busted is object type's activesound
* Frontside x offset is spacing (in fracunits) of spawned particles, defaults to 32<<FRACBITS
* Frontside y offset is the fuse of spawned particles in tics, defaults to 3*TICRATE, if set to -1 fuse is not set
* Effect 1 flag makes particles "fly out" horizontally and vertically from the center of the FOF

Sector types 7 through 15 in section 3 no longer do anything.

Linedef type 250 (Mario Block) is almost the same as before, but has new functionality and is slightly different in another way.
* No Climb flag turns it into a brick block (set on Custom FOF via presence of FF_SHATTERBOTTOM - busts when hit from the bottom, player hits their head/fist/whatever, no more upwards momentum)
* Effect 1 flag makes it an invisible block (set on Custom FOF via absence of (FF_SOLID|FF_RENDERALL|FF_CUTLEVEL) - intangible from every side except the bottom. Becomes visible and tangible when it's hit once)
* Only updates side textures when moving down or stationary, not whilst moving up - more fidelity to the source material, less processing on the CPU, everyone wins.
* If FOF master linedef has a backside, then: [If there's items in it the FOF's flats are set to that of the backside sector's ceiling, otherwise the floor.] Otherwise, no flat change.

Linedef type 4 (Speed Pad parameters) now works as follows.
* Frontside x offset is speed in fracunits.
* Effect 4 flag doesn't center the player. (same as before)
* Effect 5 flag sends them off in rolling frames.
* Frontside upper texture is sound to play on launch, defaults to sfx_spdpad when not given

Sector type 6 in section 3 no longer does anything.

Object type 757 is changed as follows, and no longer works on its own - see Linedef type 15 for more details.
* Tag via its angle field
* Number of objects to spawn per tic around it via its z field, if zero then just spawn at center
* Is flipped if given MTF_OBJECTFLIP.
* (ERZ and Seraphic Skylands - if we use that map - needs updating)

Linedef type 15 (Fan particle spawner parameters) is new, and works as follows.
* Tag is tag of object(s!)
* Object type set via concatenation of frontside textures, MT_PARTICLE is default
* The length of the linedef is the radius the particle is spawned out (zeroed if z field is 0)
* Frontside x offset is speed upwards
* Frontside y offset is number of degrees to turn each tic (zeroed if z field is 0)
* Frontside floor and ceiling heights are the heights in which the particle is bound through some fun mathematics

A_ParticleSpawn is changed, too.
* Object type is now changed through actor->threshold instead of var1 to support Linedef type 15.

Test executable uploaded at /toaster/srb2win_branch_flatalignment.exe on the ftp.

Test file uploaded at /toaster/flatalignment.wad on the ftp.

Breaks compatibility with 2.1 so put in internal.

See merge request !29
2017-01-24 16:49:43 -05:00
toasterbabe 5eb561297b Limit of 45 degrees before you can start transferring up the wall. 2017-01-23 20:30:56 +00:00
toasterbabe 19f31b958d * Put all of the wall transfer code in one place.
* Made the name of P_PrepareSlopeToWallTransfer (now P_GetWallTransferMomz) make sense.
* Bugfixed the case where you couldn't reliably guess the angle of the wall you just hit.
2017-01-23 17:23:42 +00:00
toasterbabe 12da89b1ce Late night commit!
* Seriously reworked a lot of stuff behind the scenes, thanks to Red's comments.
* More consistent behaviour.
* Launching power is now scaled to the slope's angle relative to the wall you hit, so no massive launches when you hit the side of a steep slope.
* The code is a lot messier and the function name doesn't make any sense any more, so I need to clean that up in the morning.
* Need to figure out how to prevent tiny launches that uncurl you when spindashing up against walls.
* Spindashing trails now takes into account vertical momentum as well as horizontal - it was stupid not seeing your spintrail just because you weren't moving very fast horizontally!

No exe uploaded because it's almost 2am.
2017-01-23 01:40:11 +00:00
toasterbabe aa6453382e SLOPE-TO-WALL TRANSFER 2017-01-22 18:26:05 +00:00
Monster Iestyn acfbce21c9 Merge branch 'gfz3_laser' into 'master'
GFZ3 Unfuckening

Some tweaks to the GFZ3 Eggmobile's behaviour to make it less frustrating for old and new players alike.

* GFZ3 Eggmobile's laser won't change its angle when you move left and right anymore.
    * Changed because its ability to move quickly was extremely punishing for new players (see ProJared's youtube video on the matter).
    * http://gfycat.com/PassionateUnknownAgama (the twitching on the third laser has been fixed since this was recorded)
* GFZ3 Eggmobile will, when too far away from the ground and moving upwards, slow itself down vertically.
    * This was punishing and annoying for both old and new players alike.
    * http://gfycat.com/CornyLeftDungbeetle (old values - the typical settling height is slightly lower now)

See merge request !42
2017-01-21 13:46:04 -05:00
toasterbabe 399a6c1d47 * ALMOST SORTA IMPLEMENTED A NON-HACKY SPINNING FLAMEJET. For some reason, they wanna step down onto the platform - and I've been figuring this out for too long to see what's causing that tonight.
* Hardcoded a bunch of stuff from patch.dta. All works fine, but still more to do.
2017-01-21 01:09:39 +00:00
toasterbabe da42165169 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_alignment_revamp 2017-01-16 17:14:58 +00:00
toasterbabe acf0d4ad5b Detons no longer release duplicate flickies when they hit walls.
(I COULD have hacked around the hack, but when a line tells you it's a hack and it makes things work by removing it, you remove it.)
2017-01-16 17:09:57 +00:00
Monster Iestyn 3d07915be2 Merge branch 'vada_flickies' into 'master'
Hardcoded VAda Flickies

Many thanks to MI for his help, even if he has sinful opinions on what the collection of creatures should be called. ;P

* Flickies are now handled via A_FlickySpawn instead of hardcoded in P_KillMobj, so there can be mobjtypes with MF_ENEMY which don't create flickies, or other mechanisms which can much easier.
* Added map header "FlickyList" (aka "AnimalList") parameter, which can either be set to:
    * A species (eg: "Rabbit" or "Bluebird", amongst 17 currently supported types in dehacked.c table FLICKYTYPES - including the seed from Sonic CD, which isn't limited to 'soniccd on' in the console now)
    * Any valid mobjtype that isn't MT_NULL (eg: "MT_FLICKY_GHOST")
    * A comma-seperated list of either of the above, up to 64 entries long (eg: "Cow,MT_FLICKY_SPIDER,Chicken")
    * "All" - sets behind-the-scenes stuff to use every 'normal' type of flicky in FLICKYTYPES (a distinction which can be utilised to hide secret level flickies where they wouldn't be appropriate for the main game)
    * "Demo" - sets behind-the-scenes stuff to use the five flickies closest to the species used in the game's long history.
    * "None" - prevents any flickies from spawning.

"Demo" is functionally the default value if you don't include a FlickyList parameter in the header at all.

Of note, a bunch of functions are now created:
* A_FlickySpawn - spawns flicky.
* A_FlickyAim - aims for area near target, but not directly on them - turns around when hitting wall
* A_FlickyFly -  flies/swims around target (calls A_FlickyAim)
* A_FlickySoar - hacky alternate fly (calls A_FlickyAim)
* A_FlickyCoast - slowing down before going off again
* A_FlickyHop - fracunit-scale precision for A_BunnyHop
* A_FlickyFlounder - A_FlickyHop with randomisation
* A_FlickyCheck - State-setter for falling, or being on-ground
* A_FlickyHeightCheck - State-setter for falling, or being below a certain height relative to target
* A_FlickyFlutter - A_FlickyCheck, but with a slow fall/movement (calls A_FlickyCheck and A_FlickyAim)

I don't need to enumerate the object types and states that have been added, do I?

Oh yeah, I also made it so get_mobjtype's failure value was MT_NULL and prohibited SOC from editing the properties of it to compensate.

IN ADDITION: Killed "soniccd" console command, since it made things more complicated and honestly being able to specify Sonic CD seeds in the level header is a better option.

See merge request !60
2017-01-08 17:36:25 -05:00
Monster Iestyn 166c6746cd Merge branch 'public_next' 2017-01-08 16:05:32 +00:00
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
toasterbabe 3f92a2305a * Modified MT_SEED to have aesthetically nicer behaviour.
* Removed Soniccd command, as flicky selection involves a P_RandomKey call - this messes with replays and demos.
2017-01-01 21:54:30 +00:00
toasterbabe 311886e582 * Ported in all of the Flickies from flickiesreduced8.wad except for the Flicker and seed.
* Fixed a crash bug in the Flicky fly function I introduced sleepily last night.
2016-12-31 16:55:06 +00:00
toasterbabe d3a70eb1db * All Flicky A_ functions ported.
* Corrected MT_EGGSHIELD spawning a flicky.
* New compared to the Lua implementation: Flickies turn around when they hit walls!
2016-12-30 19:16:20 +00:00
toasterbabe bf8bff82ba * MT_EGGTRAP (egg capsule center mobj) converted over to flickylist system.
* MT_EXPLODE's anims partially FF_ANIMATE'd.
* A_FlickySpawn turned into a wrapper for internal function that does what A_FlickySpawn did but returns a pointer to the spawned flicky.
2016-12-30 14:04:04 +00:00
Monster Iestyn 6ae2c24484 Merge branch 'public_next'
# Conflicts:
#	src/p_user.c
2016-12-14 18:53:00 +00:00
toasterbabe d8d5f31898 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into shield-actions 2016-12-13 22:03:59 +00:00
toasterbabe fe6b4c4875 Reduced momentum killing of groundpound into slime per Mystic's request. 2016-12-13 21:48:16 +00:00
Monster Iestyn 6f8969aec0 Merge branch 'spindash-dust' into 'master'
Spindash dust

Charging a spindash kicks up dust, we all know this feature was dying to get in at some point. Bubble and flame forms of spin dust are included from FSonic, for underwater and elemental respectively.

Oh, and as a bonus I reorganised the spindash/spinning/other ability2 stuff code to look a bit neater and more organised.

New resources:
* MT_SPINDUST - the object
* S_SPINDUST1 to 4 - the normal form's states
* S_SPINDUST_BUBBLE1 to 4 - the bubble form's states
* S_SPINDUST_FIRE1 to 4 - the bubble form's states
* SPR_DUST - the normal form's sprite set (uses frames A to D, just pinch FSonic's sprites really)
* SPR_FPRT - the flame form's sprite set (frame A only)

SF_NOSPINDASHDUST disables spindash dust for a character

See merge request !52
2016-12-13 15:15:33 -05: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
toasterbabe e34ef54166 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_alignment_revamp
# Conflicts:
#	src/info.c
#	src/p_mobj.c
2016-11-20 19:21:10 +00:00
toasterbabe 85fb02aaf6 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into shield-actions
# Conflicts:
#	src/p_inter.c
#	src/p_user.c
#	src/st_stuff.c
2016-11-20 16:44:38 +00:00
Inuyasha f02f06aed8 Merge branch 'spr2stuff' into 'master'
Stupid spr2 fix

Name on tin

See merge request !53
2016-11-13 17:40:35 -05:00
toasterbabe 7746553273 * Fixed A_1upThinker having a standing sprite for a single frame on spawn.
* Removed the noalt stuff because it's not actually helpful. Everything's gotta come back to something at some point or there'll be errors.
2016-11-13 22:33:10 +00:00
Inuyasha 908907d668 Merge branch 'spr2stuff' into 'master'
Sprite2 changes

Some stuff!

* Lua access to sprite2.
    * Introducing new Lua-exclusive function, P_IsValidSprite2(mo, spr2). Basically just a wrapper for (((skin_t *)mobj->skin)->sprites[spr2].numframes > 0), useful for creating custom sprite2 defaulting functions since hooking into P_GetMobjSprite2 wouldn't be worth it.
* FF_ANIMATE support for sprite2s. The var2 of the state works identically to normal FF_ANIMATE, but var1 is completely disregarded - it just runs all of the frames available to that one sprite2 animation set.
    * As a result, a bunch of states which were either not previously animatable or had animated at constant speed now get animation without state changes.
* P_SetMobjState now supports sprite2 defaulting like P_SetPlayerMobjState does.

See merge request !51
2016-11-13 16:59:26 -05:00
Inuyasha e62b0f219f Merge branch 'damage-control' into 'master'
Damage control + Match rebalancing

This is two branches in one since while I was working on damage-control's changes months back, I felt it was best Match rebalancing was merged in here too (thanks JTE for helping me do so).

Changes from damage-control:
* `player->health` (formerly the "HUD copy" of `player->mo->health`) is now `player->rings`, and is also now the player's actual ring count.
* `player->mo->health` (formerly rings + 1) is now always 1 when alive, regardless of ring count; if player with rings is damaged, this is untouched.
* P_RingDamage now includes ring spilling code.
* P_ShieldDamage now has a damagetype argument, allowing me to remove the last MT_NULL hack left in from the pre-damagetype days that I forgot about.
* The old "switch-to-seestate" enemy damaging behavior in P_DamageMobj has been removed. This was a Doom left-over and doesn't really affect SRB2's enemies anyway - see, Doom enemies had a random chance of using seestate or painstate, SRB2 enemies always use painstate.
* Other minor efforts to reorganise damaging code and have it make more sense, but otherwise nothing that should affect gameplay in general.

Changes from match-rebalancing:
* New weapon/ammo dropping behavior: if you have the weapon panel + ammo, you drop the panel (but not the ammo); if you don't, you just drop the ammo.
* New Match ammo consumption: Weapon rings can now be fired with no rings at double the ammo cost.
* New emerald behaviour: collecting all 7 emeralds no longer turns you super (read: Match super is dead now) but instead steal points from enemies and gives you and teammates invincibility + sneakers
* Tails ringslinger buff: Any character with CA_FLY will now throw rings 1.5x as fast.

See merge request !28
2016-11-13 16:47:05 -05:00
toasterbabe 11a391dbb5 Making FF_SPR2ENDSTATE consistent between P_SetMobjState and P_SetPlayerMobjState. 2016-11-12 15:06:49 +00:00
toasterbabe 20677c7a66 * Introducing new Lua-exclusive function, P_IsValidSprite2(mo, spr2). Basically just a wrapper for (((skin_t *)mobj->skin)->sprites[spr2].numframes > 0), useful for creating custom sprite2 defaulting functions since hooking into P_GetMobjSprite2 wouldn't be worth it.
* All Lua-originated sprite2 settings are now forced through P_GetMobjSprite2. Makes sense because of SPR2_JUMP, which none of the main characters have sprites for yet all use.
* Cleaned up P_GetMobjSprite2 to not set irrelevant, otherwise-unused variable.
2016-11-11 23:23:41 +00:00
toasterbabe 07e5fe9546 Swapped around in an attempt to streamline. 2016-11-10 22:35:33 +00:00
Monster Iestyn 47c67472ff Added bubble form of spin dust 2016-11-10 21:09:05 +00:00
toasterbabe fc64feee60 FF_ANIMATE now cooperates with Sprite2, and to this end a few player states which have non-varying animation speeds (some which previously had a speed of 0) now use it. 2016-11-10 18:27:01 +00:00
Monster Iestyn ce97c1e986 Added basic spindash dust
Also cleaned up some of the code in P_DoSpinAbility while I was at it
2016-11-10 17:51:10 +00:00
toasterbabe 080b3c1d6d Decouple the Sprite2 defaulting from P_SetPlayerMobjState. 2016-11-10 16:05:40 +00:00
toasterbabe b5a6bfe046 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into shield-actions 2016-11-06 16:03:12 +00:00
Alam Ed Arias 67d2211bca whitespace: cleanup 2016-11-01 15:54:52 -04:00
toasterbabe 08a4fc8382 Tweaks to the way the force whoosh is handled so it stays centered AND doesn't allow an infinitesimal jump. 2016-10-30 14:01:56 +00:00
Monster Iestyn 82d29b59c1 Merge branch 'master' into damage-control 2016-10-29 17:05:59 +01:00
toasterbabe 1c1af15b4f Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into shield-actions 2016-10-29 16:56:50 +01:00
Monster Iestyn b1a53f6623 Merge branch 'public_next' 2016-10-29 16:52:43 +01: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 bfdaf5ee90 Fixed the Force stop's scaling properly. Woo! Branch is basically done now. 2016-10-24 20:51:23 +01:00