Commit Graph

445 Commits

Author SHA1 Message Date
Alam Ed Arias 5986720789 Build: fixups 2017-09-28 11:01:52 -04:00
Alam Ed Arias f1a347e55f Merge branch 'public_next' into master 2017-09-28 11:01:20 -04:00
Alam Ed Arias ec125628ab Merge branch 'master' into next 2017-09-28 10:16:35 -04:00
Alam Ed Arias 2ccd397d11 Build: kill GCC 7's implicit-fallthrough warning 2017-09-28 09:39:47 -04:00
toaster 3cc14e3985 Merge branch 'directionchar' into 'master'
Autobrake & decoupling player sprite angle from camera angle

See merge request !69
2017-09-19 07:56:22 -04:00
toaster ecfeb7b0af Merge branch 'spr2fixes' into 'master'
Sprite2 MD2s and customisable defaulting

See merge request !115
2017-09-19 07:49:04 -04:00
toasterbabe f90d595332 * cv_directionchar and cv_autobrake, and their secondplayer versions (both on by default) now exist.
* cv_useranalog is now hidden from the menu.
* Directionchar now attempts to face the camera direction when you're standing still, and handles a few other states with more decorum.
* Tailsbot is now slightly more capable of keeping up with Sonic.
* pflags rearranged/adjusted, combining a few non-simulstaneous ones and turning PF_NIGHTSFALL into CR_NIGHTSFALL.
* [unrelated to branch] all ground-impact based abilities now happen more consistently with quicksand.
2017-09-16 20:25:14 +01:00
toasterbabe 3c785cbe94 * Add Skid SPR2/state in preperation for directionchar.
* Clean up spr2 md2 code.
* Experimented but then commented out some stuff for homing attack.
2017-09-09 22:12:23 +01:00
yellowtd 519414b215 Merge branch 'master' into titlemap 2017-08-22 19:07:32 -04:00
toasterbabe 2e6c09a636 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into directionchar
# Conflicts:
#	src/hardware/hw_main.c
2017-08-16 21:40:32 +01:00
Monster Iestyn 9f726bc66d Merge branch 'new_coop' into 'master'
New Co-op

See merge request !104
2017-08-16 15:01:39 -04:00
toasterbabe a61be91523 Add a new feature to MT_PARTICLEGEN, per Sphere's request - if you give the parameters line a backside, then the backside x offset controls the number of tics between particle spawn. (By default, it's 3.) 2017-08-08 18:22:44 +01:00
toasterbabe 780f9b1645 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/hardware/hw_md2.c
2017-08-07 20:36:14 +01:00
Monster Iestyn 42ed41aeb1 Merge branch 'maces_but_better' into 'master'
Maces but better

See merge request !103
2017-08-07 15:27:05 -04:00
toasterbabe 2e1b81b5da Woops, silly find and replace 2017-08-07 19:23:48 +01:00
toasterbabe d135f64464 Crash prevention 2017-08-07 18:58:41 +01:00
toasterbabe 0a1e055ba1 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/m_menu.c
2017-08-05 22:13:14 +01:00
Monster Iestyn 102d30fe8d Merge branch 'nights_emblems' into 'master'
NiGHTS Paraloop-special emblems

Implemented the two NiGHTS Emblem types in the TUDD via var modifications to ET_GLOBAL!
* GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem
* GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem
* Combined means that you essentially have to loop it twice.

Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM).

Check out root/!LatestSRB2Files/srb2win_branch_nightsemblems.exe with the latest patch.dta, along with root/toaster/nightstest.soc for a sample in GFZS.

See merge request !94
2017-08-05 16:03:33 -04:00
toasterbabe e2a9d47ef6 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop 2017-08-05 12:28:31 +01:00
toasterbabe e21ae8de7d * Updated NiGHTS skincolor list on Rob's request.
* Unrelated: fixed a bug where FF_ANIMATE stuff tried to access rain's skin.
2017-08-03 00:01:12 +01:00
toasterbabe 672bcc349c * Hide the number of lives you can steal if game-overed. It's not directly relevant unless you're game overed.
* Fix an issue where everyone being game overed except for one person, and then kicking that one person, meant the game over trigger was never met.
* Fix an issue where the spectator text could be overridden with a count of the number of remaining players to complete the level.
* Fixed a few glitches with spinning. (Unrelated to the branch, but exposed through new_coop testing.)
2017-07-26 16:10:08 +01:00
toasterbabe 634c560e99 * Who wore it better? https://cdn.discordapp.com/attachments/293238104096112641/338696939774279680/srb20037.png
* Now that Cyan is back, swap out the substitute Teal in the emblems for it.
* P_GetMobjSprite2 is now P_GetSkinSprite2.
* Correct "Siler".
2017-07-23 17:49:19 +01:00
toasterbabe b2e92e7a09 * Invert solidity flag for vertical spikes and wallspikes.
* (unrelated) Per a request by sphere, make the ambush flag stop sounds being made by the gas jet.
2017-07-19 17:07:31 +01:00
toasterbabe ef4dc42c7c * Bustable wallspikes.
* Improve the code for busting vertical spikes.
* Improve the frame arrangement for vertical spikes' spriteset. (Requires new patch.dta)
* Make all spikes consistently do damage with DMG_SPIKE.
* (unrelated) renamed "flame stomp" to "elemental stomp" in P_HitDeathMessages
2017-07-19 16:26:49 +01:00
toasterbabe a5477737d7 Whooh boy. Probably requires re-review.
* Support for MF_PAPERCOLLISION tmhitthing in P_SlideMove.
* Knockback for wallspikes is much more consistent.
* Optimised away a FixedDiv call when determining the slopetype of a line.
* Changed the position of the wallspike base slightly.
* Made it so NOTHING can step up onto the player outside of other players, essentially killing a bunch of springs-launch-with-players style bugs. (I was able to recreate that issue with the wallspikes until I added this, which is why I did it in this branch.)
2017-07-18 14:17:23 +01:00
toasterbabe 6d43fad098 Correct the baseradius stuff. (Still doing some other work, though - will let you know when the branch is safe to review.) 2017-07-18 12:56:39 +01:00
toasterbabe 66d59efddc Sorry, MI. More info in forthcoming merge request. 2017-07-17 23:58:54 +01:00
toasterbabe 9bd10fb0d2 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop 2017-07-17 16:44:10 +01:00
Monster Iestyn dbc7a4099f Hardcoded SOC_TOKE from patch.dta
Or rather, I killed anything to do with the old background orb, renamed all "EMMY" stuff to "TOKEN", and of course adjusted the new S_TOKEN accordingly
2017-07-15 20:15:34 +01:00
Monster Iestyn 00062220de Move spawning of base to P_SpawnMapThing, so objectplacing a wall spike doesn't look weird
Also attempted to "optimise" spawning and position correction code
2017-07-14 17:19:01 +01:00
Monster Iestyn 444e9ce7df Fix wall spikes being harmful from below, set initial destscale of base too just in case 2017-07-14 17:01:13 +01:00
Monster Iestyn eacf753f2c Add the remaining code from the Lua script to get wall spikes actually working so far 2017-07-13 23:00:45 +01:00
Monster Iestyn 96ec319897 Hardcoded SOC_TREE from patch.dta
Also made sure the GFZ trees have MF2_STANDONME
2017-07-13 17:29:15 +01:00
toasterbabe b197dcdb1f A little bit of monitor love.
* Rename "Unknown" options to "Mystery".
* Make Random monitors work consistently in singleplayer if hacked/SOC'd in.
2017-07-08 12:31:37 +01:00
toasterbabe 54a8602c4c Woops, forgot about other gametype spawncamping. 2017-07-07 14:39:51 +01:00
toasterbabe 88546abb08 Fix a few things noted during a test netgame with Salt and FuriousFox.
* Hide the individual lives on the tab menu whenever they're irrelevant.
* Make co-op spectators appear on the tab menu.
* Hide one frame of spectatorhood stuff in splitscreen.
* Fix joining netgames whilst in a special stage not giving the startinglives.
* Make monitors that don't appear to do anything play the failure sound.
* Only make players flash if they're REspawning, rather than spawning into a fresh level - unless it's a NiGHTS level, in which case never.
2017-07-07 13:35:48 +01:00
toasterbabe 25fb318a0b * Fixed a typo with the bit-shifting of the max speed, meaning that it wasn't being set as desired.
* Made the speed capping/minimising done at the point of changing it via player control, as opposed to the point of macerotate, in an attempt to fix a potential cause of mace rotation desynchronisation (not netplay, just https://cdn.discordapp.com/attachments/293238104096112641/331453363499696139/srb20180.gif stuff.)
2017-07-06 22:26:31 +01:00
toasterbabe 1a7a0662ba * Set player->outofcoop to false if it's not a coop gametype.
* Expose player->outofcoop to Lua.
2017-07-06 14:53:52 +01:00
toasterbabe bc066a16a0 Whoops, I did some menu stuff in here. Oh well.
NEW COOP BASED:
* Add "Infinite" option to cv_cooplives, inspired by SUBARASHII. Lives still exist, but are hidden from the player's view, and are prevented from falling below 1 at any cost. As a result, made the variable CV_CHEAT.

OTHER MULTIPLAYER BASED (semi-related):
* Made cv_autobalance an on/off switch which determines the allowed difference based on the number of people in the server, instead of a weird and opaque number from 0-4.

MENU BASED (not related):
* Add horizontal arrows to menu options which respond to the arrow keys.
* Make the menu arrows bob.
* Switch out the seperate arrows for combination arrows on the joystick menus.
* Minor cvar description tweaks.
2017-07-04 13:17:29 +01:00
toasterbabe 50496970d1 Fix weird visual artifacting caused by restarting the level in co-op, which was a direct result of my code being messy. This is significantly better to deal with, anyways. 2017-07-03 15:43:29 +01:00
toasterbabe ca76dd41f8 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/p_user.c
2017-07-03 15:41:00 +01:00
toasterbabe 370d9c3176 Hooh boy.
****
* MF2_MACEROTATE. Apply to any object. Replaces the indiscriminate spamming of A_MaceRotate each tic.
****
* Mace point mapthings have been slightly modified.
   - MTF_AMBUSH: bigger luke theory (has no effect on custom mace, different effect on spring mace)
   - MTF_OBJECTFLIP: flips the objects, but nothing else - just so it doesn't look out of place in gravflip sections
   - MTF_OBJECTSPECIAL: keeps it from attempting to play swinging sounds
   - angle: tag of controlling linedef
   - parameter: number of "spokes" minus one - for example, a parameter of 2 results in 3 equidistant maces rotating around the same point.
****
* Mace linedefs have been significantly revamped.
   - line dx: number of chain links
   - line dy: speed (in FU)
   - frontside floor height: Pitch (in degrees; how much it "tilts" over - Yaw influences the axis it's tilting on)
   - frontside ceiling height: Yaw (in degrees; rotation of entire thing on xy plane)
   - frontside x offset: Phase (in degrees; how far it is through the rotation cycle)
   - frontside y offset: Max speed (in FU; if less than speed, set to speed*2)
   - backside floor height: Pinch (in degrees; 0 if no backside; essentially makes rotation conical instead of wheel-like)
   - backside ceiling height: Roll (in degrees; 0 if no backside; rotates on the axis of the spinning - identical to Phase for spinning maces, but useful for rotating swinging maces as opposed to just offsetting them)
   - backside x offset: Number of "antispokes" (0 if no backside; makes that many spokes not exist so you can put another mace/chain type in there instead; for combo mace/chain instead turns them into chains directly)
   - backside y offset: Width (in number of extra chains per side; 0 if no backside; creates a "skiprope" arrangement)
   ----
   - ML_NOCLIMB: for chains and chain-mace combos, allow for player control of yaw through strafe keys
   - ML_EFFECT1: replacing the seperate mapthings, this makes a mace type swing instead of spin.
   - ML_EFFECT2: for all spokes of the mace wheel ending in maces, make the chains out of the mace type (inverted for firebars)
   - ML_EFFECT3: spawn a bonus mace type at the center(s) of rotation
   - ML_EFFECT4: don't clip inside ground
****
* Mapthing 1104 represents both spinning and swinging maces from prior versions of SRB2.
* Mapthing 1105 has gone from being a swinging mace variant to a combination of chains and maces in a single unit, provided the number of "spokes" is greater than one.
* Mapthing 1105 has gone from being a swinging chain variant to a vertical spring-on-a-ball-on-a-chain. Yellow by default, apply MTF_AMBUSH to turn into a red spring.
* Mapthing 1107 represents both spinning and swinging chains from prior versions of SRB2.
* Mapthing 1108 is completely untouched except to port over 2.1's functionality to the new backend.
* Mapthing 1109 is a Mario castle-level style firebar. This inverts the functionality of ML_EFFECT2 on the tagged linedef.
* Mapthing 1110 is a free slot should we want to implement another type of base-game mace.
* Mapthing 1111 is a custom mace. Use the linedef's frontside texture slots to identify a macetype mobjtype, then use the backside texture slots to identify a linktype mobjtype (defaults to MT_NULL if no backside).
****

Whooh. Requires new patch.dta for sprites.
2017-07-02 15:11:09 +01:00
Monster Iestyn 64b3861168 Merge branch 'mapthing-spawn-hook' into 'master'
"MapThingSpawn" hook for Lua

A hook for adding special stuff to mobjs spawned via a map thing on level load, like special features depending on the map thing's flags, angle, z position, extrainfo, or anything else I didn't think of.

**Function syntax:**
`functionname(mobj, mapthing)`

where `mobj` is the spawned mobj (type mobj_t obviously), and `mapthing` is its corresponding map thing (type mapthing_t also obviously). Note that `mapthing.mobj` will not yet be set to `mobj` at this point (it's set afterwards, provided you don't remove the mobj or something stupid).

Returning `true` overrides features in place for existing mobj types (currently not all existing features are overridden, I may change this; see the source code for what IS overridable for now), returning `false` runs them as normal.

**Hook syntax:**
`addHook("MapThingSpawn", functionname, MT_OBJECTTYPE)`

where `MT_OBJECTTYPE` is the object type to apply the hooked function for. As usual, if this argument is omitted or set to MT_NULL, the function runs for all object types.

**Test resources and where to find them:**

* srb2win-mapthingspawn.exe, my folder on the FTP - test exe, obviously
* luatest-mapthingspawn.lua, same place - a simple Lua script that changes the scale of MT_GFZFLOWER1 (the orange flower) based on the map thing's angle (0 degrees is normal, 90 degrees is 2x bigger, 180 is 3x bigger, 270 is 4x, etc etc)

See merge request !83
2017-07-02 09:46:11 -04:00
toasterbabe a0fa548e8b * Make spinning (normal) maces play the activesound once per rotation, instead of once every 64 tics.
* Make swinging (as opposed to spinning) maces play the activesound at the peak of their speed.
* Decouple the tilt of all maces from the angle.
* Improve DBG_GAMELOGIC message.
* Refactor.
2017-06-28 14:55:48 +01:00
toasterbabe 23bdb14eda * Make maces use the x offset of their controlling linedef to set the stage in the cycle the mace should be at, instead of contributing to the tilt of the plane of the maces.
* Make the noclimb flag of the mace-controlling linedef turn the mace types that have spiked balls on the ends to also have the middles of the chain be spiked, CEZ3 style.
* Partake in some refactoring.

https://cdn.discordapp.com/attachments/293238104096112641/329335623250870275/srb20026.png An image of both changes in action!
2017-06-27 20:16:14 +01:00
Monster Iestyn e3f627120f Merge branch 'public_next'
# Conflicts:
#	src/doomdef.h
#	src/p_mobj.c
2017-06-23 17:19:06 +01:00
Monster Iestyn 44f33e6732 Merge branch 'touching_fixes' into 'next'
Fixes with respect to sector special touching and slopes

Some important stuff.

* SF_TRIGGERSPECIAL_TOUCH now actually works. Previously, it abandoned the loop early if ANY bounding sector didn't have that sector flag, which it likely didn't - only checking one extra sector's worth of FOFs. Also, the teleport handling there is more robust, and actually bails out if you teleport, instead of just awkwardly continuing through the loop.
* SF_TRIGGERSPECIAL_TOUCH now works for each time thinkers, too.
* Fixed a bug with being able to go under lava because P_CheckSolidLava doesn't take slopes into account.
* Also, P_CanRunOnWater supports slopes now too.
* Quicksand supports slopes and reverse gravity now.
* Space Countdown supports slopes now.

Also, an experiment behind a #define which currently isn't turned on:

* UNDER A #define, "SECTORSPECIALSAFTERTHINK", WHICH IS CURRENTLY TURNED OFF, BUT I WILL WANT TO TURN ON IN INTERNAL: Moved sector touch handling to P_PlayerAfterThinker (from P_PlayerThinker before movement). Allows for being able to trigger moving slope sectors that are going down, most specifically lava (didn't matter in RVZS in 2.1 because you could clip through the sides and go underneath the lava, causing damage - a sloped testwad version of that prevented going underneath.) Also fixes one-frame standing on deathpits before you die. Basically means sector triggers effectively happen one tic earlier, since it's after movement.

See merge request !131
2017-06-22 17:30:57 -04:00
toasterbabe a872f1c68f I'm starting to actually test this via netgame instead of just in splitscreen!
* Fixed oversight where late joiners may not actually get lives.
* Fixed oversight where zero-livers could spawn in.
* Reinstated flashing because a crawla walked onto one of the spawnpoints and we immediately got a game over.
* Rejiggered the overlay drawer so the printing was consistent between normal spectatorship and game overness.
2017-06-03 22:14:20 +01:00
toasterbabe 8d8ae2b538 Renamed again, and this time I'm happy with it.
* "playstyle" to "coopstarposts"
* "lifedistribution" to "cooplives"
2017-06-03 17:55:03 +01:00
toasterbabe f3cad19184 * Renamed "steallives" to "lifedistribution".
* Gave lifedistribution a "Sharing" option to go along with its previous individual and stealing options.
* Made the game over graphic and music only happen if everyone's out of lives if you're sharing or stealing lives.
* Fixed a bug where game over wouldn't come to fruition because it kept on happening each tic of the countdown2.
* Made spectator stuff display in Co-op splitscreen.
2017-06-03 12:26:42 +01:00