Commit Graph

366 Commits

Author SHA1 Message Date
toasterbabe 9affcd98cb Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into Deez_NewUserXperiences 2017-04-30 10:46:53 +01:00
toasterbabe 2d9c37d800 MONITORS IS UNFUCKED
A less memetic message: On permission of Mystic, rejiggered a few things such that Race uses cv_competitionboxes, allowing the menu to be nicer.

Also:
* disabled the doomednum for ? boxes
* made A_MixUp play sfx_lose if you're in a gametype that can't use it
* Removed the all-teleporters option from cv_competitionboxes. It could just be done by tweaking the random monitor toggles, anyways.
2017-04-28 22:45:17 +01:00
Monster Iestyn 5608c4b4e7 Merge branch 'public_next' 2017-04-26 16:17:29 +01:00
toasterbabe bef9520556 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into Deez_NewUserXperiences 2017-04-19 23:03:47 +01:00
Monster Iestyn 941ab72204 Hardcode new/updated xmas scenery object type/state info 2017-04-18 18:32:52 +01:00
toasterbabe 174921c1e1 End to sudden death. 2017-04-14 20:46:48 +01:00
toasterbabe d5575669fa Handled some of MI's concerns. 2017-04-04 16:50:33 +01:00
toasterbabe 302305ccf5 Fixing SF_NOSUPERSPIN, which has been broken ever since the super walk animation was added. 2017-03-27 14:22:03 +01:00
toasterbabe 8d9b616f00 Fixed repeatable bounces sending you hog-wild if you went into water shallow enough to only spend a single frame in before hitting the ground. 2017-03-25 12:42:39 +00:00
toasterbabe fa29f7deca A bunch of stuff again.
* Lock on targets bob now, and are used for CA_HOMINGTHOK and SH_ATTRACT as well.
* Flag stuff is now animated like it was designed to be but which was kinda messed up.
* Cork sounds.
* P_SpawnLockOn(player_t player, mobj_t lockon, statenum_t state) for Lua.
* Added homing/firing CA2_GUNSLINGER stuff at egg guard shields.
* Fixed homing stuff wrt egg guard shields and sea egg balloons.
* Fixed attract orb goin' gold when doing a CA_HOMINGTHOK homing ability.
* Fixed positioning of player during homing attack.
* Cleaned up lockon spawn code.
2017-03-23 19:11:22 +00:00
toasterbabe ddf8db12af Big commit, sorry. I broke several things trying to get other things to work and it's only now that all the code that worked yesterday works today!
*P_LookForEnemies is now side-effect-less and only provides a pointer to the found mobj
*player-jumping is dead, long live PF_STARTJUMP
*per Mystic's request, CA2_GUNSLINGER has a targeting icon. It also has a more restricted vertical aiming range.
*mobj for this is in the game as requested
*fast teetering animation flag
*general code cleanup
2017-03-22 18:51:30 +00:00
toasterbabe 7ac0373dbf After usability complaints:
* CA2_MELEE/CA_TWINSPIN combination abilities (ground hit, somersalt) disabled.
* Enabled movement controls whilst using CA2_MELEE in the air.
* CA2_GUNSLINGER no longer requires charging. In exchange, it involves a cooldown in which you can't move.
* CA2_GUNSLINGER lock-on distance improved, and aiming allowance reduced to compensate.
* Lots of cleanup/gravflip allowances for homing/targeting code.

* Unrelated: Flickies now properly face the direction they're supposed to when getting knocked out of the egg capsule.
* Unrelated: Thok trail fades like spindash trail now.
* Unrelated: Using CA_HOMINGATTACK when nowhere near an enemy uncurls you.
2017-03-21 16:04:49 +00:00
toasterbabe 59bc0da022 Introducing CA2_GUNSLINGER.
* Mildly hacky proof of concept! Will de-hack later.
* Charge up your ability!
* You can only damage others if it's at full power.
* Fires directly at enemies/bosses when at full power. Does NOT aim at players.
2017-03-21 00:54:47 +00:00
toasterbabe ee74fa4042 * Changed how CA2_MELEE handles nocontrol to not tweak pw_nocontrol.
* Added CA_TWINSPIN/CA2_MELEE spring boosts.
* Made it so you can't land with CA2_MELEE twice.
* Fixed stray #endif from NiGHTS fixes.
2017-03-20 19:04:33 +00:00
toasterbabe a4c1c3195f Cleanup.
* Fixed a major hack from when I SPR2ised NiGHTS by spawning in a null object.
* Made P_LookForEnemies better in preperation for the future.
* Changed some defaulting characteristics of P_GetMobjSprite2.
* Fixed CA_DOUBLEJUMP potentially counting as a float.
* Killed some extremely small boolean functions and replaced them with #defines.
2017-03-20 16:57:24 +00:00
toasterbabe 3a6f659b93 She's a lot more complete.
* Melee now has a proper weightiness to it with a landing frame.
* If you have twinspin too, do a somersalt when running and hitting the melee button.
* If you have melee, go into the melee landing frame when twinspinning into the ground.
2017-03-19 16:48:35 +00:00
toasterbabe 99f13c88ae Made jump damage flag application less hacky. 2017-03-18 21:06:06 +00:00
toasterbabe b66ded844e compile fix 2017-03-17 23:09:15 +00:00
toasterbabe 95e4a23a69 pw_ingoop is now CR_BRAKGOOP because i can't stop refactoring CAN'T STOP WON'T STOP 2017-03-15 21:51:35 +00:00
toasterbabe b2c0930807 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3 2017-03-14 18:12:47 +00:00
toasterbabe 7aeeb278fe Increased space in pflags (because we were getting VERY close to full capacity), which I will re-organise when this branch is closer to completion.
* PF_NIGHTSMODE is now CR_NIGHTSMODE as part of player->powers[pw_carry]. This is because it's mutually exclusive to every other "carry" type.
* PF_SUPERREADY is dead because it literally just checked for all 7 emeralds and 50 rings. That's it. You couldn't even appreciably alter its presence with Lua. That logic has been placed back in P_SuperReady.
2017-03-14 18:11:17 +00:00
Monster Iestyn 386fec037f Merge branch 'lua-more-stuff' into 'master'
Lua more stuff

More new Lua features and fixes:
* Most Lua functions that deal with stuff that exists only in levels now should spout Lua errors instead of crashing the game if you try to use them outside of levels. Likewise, accessing any of the tables that contain level-only stuff (players, sectors, lines, etc etc) spouts Lua errors too outside of levels.
* `userdataType(variable)` now exists: this function simply returns the type of the userdata variable given as a string (e.g. `userdataType(players[0])` returns "player_t", `userdataType(sectors[0])` returns "sector_t"). This also includes "minor" userdata types for array members of other userdata types, such as .powers of player_t variables or .lines of sector_t variables (which would give the strings "player_t.powers" and "sector_t.lines" respectively).
* The Lua hook "MobjMoveBlocked" now exists: functions for this hook are called whenever a mobj attempts to move horizontally but is blocked by a wall or solid mobj (or whatever else can cause P_TryMove to return false, assuming it doesn't remove the mobj). In theory this hook could be very useful for behaviour such as sliding or bouncing off walls without the need of flags like MF_SLIDEME or MF_BOUNCE etc. Format for use is just like most generic mobj hooks: `addHook("MobjMoveBlocked", functionname, MT_OBJECTTYPE)`, where `functionname` is a function that takes a single mobj_t argument.

See MonsterIestyn/lua-more-stuff on the FTP for a test exe (srb2win-lua-more-stuff.exe) and some test scripts for the above changes.

See merge request !67
2017-03-13 14:29:35 -04:00
toasterbabe 5b77ca5fed Reverted change where NiGHTS drilling sprites were technically the super version of flying sprites. It was not helpful to modders at all, and was only justifiable as a rutheless attempt at efficiency in storage. 2017-03-11 18:14:58 +00:00
toasterbabe e20292844d * SPR2_DRL0-C are gone. They're now (FF_SPR2SUPER|SPR2_NGT0-C). This frees up a bunch of badly-used freeslots, considering that you can't be super AND NiGHTS at the same time.
* Speaking of, actively enforced not being able to be Super and NiGHTS at the same time.
* Also on that note - SPR2_TRNS is now the NiGHTS transformation. The Super transformation is (FF_SPR2SUPER|SPR2_TRNS).
* SPR2_NPAN is now SPR2_NSTN, since it matches Super Sonic's stun animation rather than the pain animation.
* Fixed a bunch of things where Super float was handled badly with 2AM brain.
* Fixed the R_ProjectSprite error going out of spr2names' bounds.
* Fixed order of FF's in dehackéd.
* Fixed that thing where Super Sonic was blue for 1 tic after transformation, and the life icon was a blue Super Sonic.
2017-03-11 17:14:39 +00:00
toasterbabe 75ac351940 It's 2am, I'll upload the exe and player.dta to the ftp later.
* Super sprites are now deliniated via an additional S_SUPER lump between S_START and S_END. Above are normal sprites, below are super sprites. Handled internally via FF_SPR2SUPER.
* Sprite2 numbers are now appropriately limited for the data type that stores them.
* SPR2_SPIN is now SPR2_ROLL, SPR2_DASH is now SPR2_SPIN and SPR2_PEEL is now SPR2_DASH. Makes more sense, right?
2017-03-11 02:09:01 +00:00
toasterbabe 758bec6963 Fixed a bunch of awkwardness where Metal wouldn't reset himself properly when his target died. 2017-02-14 02:07:08 +00:00
toasterbabe a04ae45a93 MORE CUES 2017-02-13 18:53:16 +00:00
toasterbabe 3feac5bc90 bad bounce https://gfycat.com/DeliciousReliableGentoopenguin 2017-02-13 18:04:08 +00:00
toasterbabe 5f3cfc6729 Some cleanup. 2017-02-12 14:16:52 +00:00
toasterbabe 6dfef794a4 Metal Sonic's bounce attack is much nicer. Also, a bunch of other minor tweaks. 2017-02-12 01:28:12 +00:00
toasterbabe 8cdcb2c416 * You can now bounce off of springs without unbouncing.
* You can now bounce off the bottom of goop areas.
* Fixed that long-standing bug where you could accelerate whilst rolling.
2017-02-09 23:24:47 +00:00
toasterbabe 29c48c1992 As defined in spec, lose a bit of chain each time you bounce on land. 2017-02-08 16:08:36 +00:00
toasterbabe 5170fafcac * CA_BOUNCE is now more pleasant to control.
* CA_MELEE can now break downwards like CA_BOUNCE, and CA_TWINSPIN can break both up and downwards.
2017-02-04 18:25:16 +00:00
toasterbabe ba652864a6 Revamped roll-on-landing to work even from jumping, for the purposes of slopes! (But not from PF_THOKKED.)
Salt has wanted this for a while, and this was the only branch I had open which it was appropriate for. :P
2017-02-04 17:08:14 +00:00
toasterbabe c04ee6bfb7 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3 2017-02-04 15:19:02 +00:00
Monster Iestyn 9a2b7b2091 Better plan, use ?: for deciding between floorz/ceiling checks based on gravity 2017-02-03 20:13:16 +00:00
Monster Iestyn 659a62db88 Make sure rocks spawned by the rock spawners despawn when they're on the floor and not moving 2017-02-03 18:47:20 +00:00
Monster Iestyn 58abd6f056 Merge branch 'master' into lua-more-stuff 2017-01-25 17:32:08 +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
Monster Iestyn 32562068ba On second thought, I'll revert the P_TryMove bit to how it was before and just stuff an extra P_MobjWasRemoved check in
this way it won't cause as much conflict with the slopetowall transfer branch
2017-01-24 20:21:50 +00: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 e3ded1671c Added MobjMoveBlocked Lua hook
Also slightly edited P_XYMovement to properly check the mobj still exists before checking its eflags for MFE_SPRUNG, while I was at it
2017-01-21 23:49:18 +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