Commit Graph

2413 Commits

Author SHA1 Message Date
Monster Iestyn 7a37794316 Merge branch 'crumble-FOF' into 'master'
Crumble fof

Basic (but kind of WIPish still) support for remote falling of FOFs by linedef execs or Lua. Originally started for Nev3r to use his dark magic on.

Making this MR so people actually remember I was doing something regarding crumbling FOFs, it's been months since I did stuff for this now mind...

* linedef type 446: basic setup is same as the remote shatter one (436), except the FOF of course falls down rather than shatters. By default the FOF respawns
 * *No Climb*: the FOF *doesn't* respawn
 * *Block Enemies*: respawning ability is determined by the FOF's flags (if it has FF_NORETURN it doesn't return, if it doesn't it does return)
 * *Block Enemies + No Climb*: inverted version of above
* EV_StartCrumble for lua, format: `EV_StartCrumble(controlsec, rover, [floating?, [player, [origalpha, [crumblereturn?]]]])`
 * *controlsec* is the FOF's control sector
 * *rover* is the FOF itself
 * (optional) *floating?* does the FOF float on water after crumbling? Defaults to false (NOTE: probably should be set to `rover.flags & FF_FLOATBOB` for best results currently, kind of weird otherwise)
 * (optional) *player* is the player that caused the FOF to fall; needed for some effects such as who to award points to if you killed someone =3 Defaults to nil
 * (optional) *origalpha* is the FOF's original alpha before crumbling (the thinker for respawning + floating crumbling FOFs tinkers with the alpha for some reason). Defaults to rover.alpha
 * (optional) *crumblereturn?* will the FOF respawn afterwards? Defaults to false (NOTE: probably should be set to `not (rover.flags & FF_NORETURN)` for best results currently, kind of weird otherwise)
 * the return value of EV_StartCrumble means something I forget offhand now ...it's either true or false though, mind

See MonsterIestyn/crumble-fof on the FTP for a test exe (srb2win-crumblefof.exe), a test map for the linedef, and a test lua script for EV_StartCrumble (which can also be tested in the map).

See merge request !55
2017-03-13 14:30:44 -04: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
Monster Iestyn 731ee115a3 Merge branch 'public_next' 2017-03-13 18:25:26 +00:00
Monster Iestyn f40e1dc069 Merge branch 'next' into public_next 2017-03-13 18:24:50 +00:00
Alam Ed Arias cb98c2d972 Merge branch 'master' into next 2017-03-12 21:34:19 -04:00
Alam Ed Arias 538eac7a47 appveyor: disable command output 2017-03-12 21:17:07 -04:00
Alam Ed Arias 4e8972cd24 build: no warning or error about logical-ip or tautological-compare 2017-03-12 21:16:37 -04:00
Alam Ed Arias 9cac1e9e62 build: fixup WFALGS/WFLAGS mistake 2017-03-12 21:09:06 -04:00
Alam Ed Arias 6bb7a636dc appveyor: output commands passed to GCCwq 2017-03-12 21:02:05 -04:00
Alam Ed Arias 81fe46213d build: do not overwrite the -Wno-error switchs 2017-03-12 20:51:45 -04:00
Alam Ed Arias 42ecca817d build: disable tautological-compare and logical-op 2017-03-12 20:43:35 -04:00
Alam Ed Arias b01d5da60f build: fixup GCC54 endif 2017-03-12 20:23:30 -04:00
Alam Ed Arias e0b2a4a779 build: add suport for GCC 6.3 2017-03-12 17:45:18 -04:00
Alam Ed Arias b22417bcfa appveyor: buildbot now using GCC 6.3, not 5.3 2017-03-12 17:26:37 -04:00
Alam Ed Arias 2823c7bffb build: fixup warnings from GCC 6.2.1 2017-03-12 17:23:56 -04:00
Monster Iestyn 4f80bd82a5 Merge branch 'metal_unsuck' into 'master'
Making Metal's pinch cues suck less

Does what it says on the tin. Give it a shot with <root>/toaster/metaltest.wad to skip the race and go directly to the boss to see what it does!

See merge request !70
2017-03-10 14:20:36 -05:00
Monster Iestyn 0f014fe20a Merge branch 'master' into next 2017-03-04 17:16:33 +00:00
Monster Iestyn 5019077f82 Merge branch 'precip-overflow-fix' into 'master'
Precipitation sprite overflow fix

This fixes artifacts of rain/snow sprites appearing on-screen in levels that have rain/snow, if said sprites were high enough above the camera. This kind of thing was previously fixed for sprites of regular objects (and textures of FOFs?), but apparently the fix wasn't applied to sprites for precipitation as it turns out.

I found this most easily reproducable in SRB2TD's Stormy Streets level, because some of the invisible FOFs make raindrops continually splash right up at the sky ceiling itself. Position your camera underneath them right and ...voila, ghostly precip sprites apparently appearing. (You'll need to make a SOC to make the level playable in vanilla SRB2 mind)

See merge request !169
2017-03-04 08:40:37 -05:00
Monster Iestyn b0f4bbb44b Played TD's Stormy Streets enough to know precipitation sprites didn't get an overflow test of their own
(various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas)
2017-03-02 19:37:21 +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
Monster Iestyn 9b737d1165 Merge branch 'record-attack-custom-exit-fix' into 'next'
Record attack custom exit fix

This fixes the bug reported here: http://mb.srb2.org/showthread.php?t=42342

Record Attack now no longer allows the tally to be skipped, whether by custom exits or by Lua etc.

See merge request !164
2017-02-08 20:18:06 -05:00
Monster Iestyn f9b41898a9 Don't allow skipping stats in record attack/nights attack 2017-02-05 22:04:29 +00:00
Monster Iestyn 591fe13cc0 Merge branch 'dedicated-console-fix' into 'master'
Dedicated console shift-down fix

This fixes the special console window used by dedicated mode not properly telling the game when shift is held down since the console improvements added in 2.1.17. This means shift+1 is properly interpreted as "!" again rather than 1, shift+- should be "_" rather than "-", etc.

Sorry LJSonic your problems from pre-2.1.17 are probably just your keyboard being for a different locale than the one most SRB2 players play with so I'm aware, I'm not sure what can be done for the time being. =V

Fun note, you can see how the game interprets un-executed input to the console window by playing normal (not dedicated) SRB2 with `-console`, which creates a second window for the console just like you'd see for dedicated mode. Drop down the console on the main SRB2 window, switch to the console window and type something in (DON'T PRESS ENTER), and you'll see the input appearing in the input space in the console window at the same time!

See merge request !163
2017-02-05 14:44:50 -05:00
Monster Iestyn dc249c6cd5 D_ModifierKeyResponder now checks for ev_console as a "key down" event
console window uses ev_keyup too so don't worry about turning off
2017-02-04 23:26:37 +00:00
Monster Iestyn 823aa7d24d Merge branch 'td-render-fix2' into 'master'
TD render fix 2: Electric boogaloo

This fixes TD's terminal stage freezing the game in a similar manner to Lava Mountain, except this time the FOFs aren't zero-height so it's a slightly different situation?

See merge request !160
2017-02-03 12:27:03 -05:00
Monster Iestyn 72bd3e28ed Fix sprtopscreen from getting integer overflows once and for all in R_DrawRepeatMaskedColumn
Fixes TD's terminal from freezing the game this time, oh boy
2017-01-31 22:10:31 +00:00
Monster Iestyn 66a45c653a Merge branch 'td-render-fix' into 'master'
TD rendering freeze fix

This is a fix for the Lava Mountain freeze issue from TD (KartKrew/TD#13) which can also occur in vanilla SRB2 as it turns out. Basically the issue occurs whenever an FOF with a single-patch texture with holes goes off the bottom of the screen far enough.

See merge request !159
2017-01-30 20:00:57 -05:00
Monster Iestyn 3212ee0b0f Fix endless loop of R_DrawRepeatMaskedColumn if both sprtopscreen and sprbotscreen are CLAMPMAX (INT32_MAX)
This fixes the grid floors in TD's Lava Mountain freezing the game if they go off the bottom of the screen far enough (they have ACWRFL1A as the wall texture, which is a single patch texture with holes)
2017-01-30 21:08:13 +00:00
Monster Iestyn cfb5a9d904 Merge branch 'better_papercollision' into 'master'
Better papercollision

Diagonal bounding boxes are no longer root 2 larger than they should be. Testwad is <root>/toaster/sawb.wad. Nice and simple.

See merge request !49
2017-01-25 17:34:43 -05:00
Monster Iestyn d0861a084a Merge branch 'master' into crumble-FOF 2017-01-25 19:38:07 +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
Monster Iestyn fb73c36a4a Merge branch 'patch_hardcode' into 'master'
Hardcode some stuff in patch.dta

Does what it says on the tin. I wanted to do the Christmas objects before creating the merge request, but it's advisable to block patch.dta's updating as little as possible, and I'm slowing down on my own development speed, so better move quickly.

Also, I hardcoded a nicer rolling trail aura from smiles.wad/smilespatch.wad, a nicer fire from new CEZ1, made the Koopa shell more fun and made the spinning flame jet WAY less hacky.

Check <root>/!LatestSRB2Files/ for srb2win_branch_hardcode.exe and the patch.dta fork it runs off, which includes all the necessary changes here.

See merge request !65
2017-01-25 12:26:56 -05:00
toasterbabe 97a6f786a3 De-meming. 2017-01-25 17:23:57 +00:00
toasterbabe ad3b20584b After IRC discussion, made the shells only cause pain to enemy players. 2017-01-25 17:19:12 +00:00
toasterbabe 939a7b8b2e Fixed the missing Mario Puma/poodoo sounds. 2017-01-25 17:00:40 +00: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
Monster Iestyn 4b97333ed7 Merge branch 'plane-displacement' into 'master'
Plane displacement

Basic support for plane displacement, no netplay support as of writing but this is what Nev3r wanted moreorless at least.

Linedef types 66-68 are the plane displacement specials; 66 = move floor only, 67 = move ceiling only, 68 = both

Front sector = control sector
Tag = tag of target sectors to be moved whenever the control sector floor moves
Linedef length = movement factor relative to control sector movement, 256 = 1:1 with control sector. 128 is half as much, 512 is twice as much, etc.

Whenever the control sector floor moves (not ceiling, never ceiling), the selected planes of the tagged sectors all move (mind, they have a tic delay due to how it all works, it's not perfect really). No support for reverse speeds yet sorry.

EDIT: oh, btw, test exe and test map are included in my folder on the FTP (srb2win-plane-displacement.exe and plane-disp-test.wad, respectively)

See merge request !61
2017-01-24 14:29:38 -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 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