Commit Graph

394 Commits

Author SHA1 Message Date
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
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
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
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
Monster Iestyn 3f9bebd05e Merge branch 'public_next'
# Conflicts:
#	src/doomdef.h
#	src/lua_thinkerlib.c
2017-05-31 15:18:05 +01:00
Monster Iestyn 1699d8a05f Merge branch 'missiles_n_slopes' into 'next'
Missiles 'n slopes

Fixed that thing where missiles like sliding up slopes for some reason.

This isn't a 1:1 fix compared to non-slopes - missiles still like stepping up over the borders of sloped sectors and will continue going as long as they never touch that ground again, whereas they can never step up on flat ones - but this fixes the most egregrious issue.

See merge request !181
2017-05-26 12:25:31 -04:00
Monster Iestyn 437780d503 Add missing break for MT_EGGCAPSULE's switch case in P_SpawnMobj (sorry!) 2017-05-25 18:40:48 +01:00
toasterbabe bdcd9125d2 Fixed that thing where missiles like sliding up slopes for some reason.
This isn't a 1:1 fix for non-slopes - they still like stepping up over the borders of sloped sectors - but this fixes the most egregrious issue.
2017-05-14 14:47:09 +01:00
Monster Iestyn 9a9b2fcc2d Merge branch 'master' into mapthing-spawn-hook 2017-05-13 21:06:49 +01:00
Monster Iestyn 9238b2d50f Merge branch 'level-specials-setup-stuff' into 'master'
Level specials setup stuff

Some changes to level setup, largely inconsequential for gameplay but maybe helpful for Lua scripting:

* gravity, weather, and some other internal variables are set to their defaults before loading things, so their values from a previous level don't affect mobj spawning potentially
* Tag lists are also initialised before loading things, so that tag-based search functions (such as P_FindSpecialLineFromTag) can be used internally for the maces and particle generator. This should probably extend to Lua as well
* the level header "forcecharacter" no longer recognises "255" as "None" anymore. This is because it no longer takes skin numbers (as of whenever that change was added... version 2.0?), and level headers are auto-cleared when edited anyway.

See merge request !88
2017-05-08 15:15:50 -04:00
Monster Iestyn a2915bbb5d Merge branch 'Deez_NewUserXperiences' into 'master'
New User Experiences - Menus, Closed Captioning, and other non-substantial tweaks

Hello! I'm going to words.

* Menu stuff!
    * Scrolling menus when there's lots of options instead of doing lots of nestling!
    * Video Options, Server Options, and Screenshot Options have been updated to take advantage of this.
    * Headings are prettier in general to match the level platter's headers!
    * Expose a bunch of stuff Mystic wanted exposed, without iundating the player!
    * Little arrows!
* Better, clearer control menus!
    * I know this is probably related to the above, but whatever.
    * Very organised with lots of renaming and magical clarifying context headings!
    * Killed the analog-only Camera L/R keys in favour of merging them with the regular turn keys in that context!
    * Also little arrows!
* Statistics!
    * One page instead of two, loses a lot less info than you'd expect!
    * The benefit of having them on one page is greater than the loss of being able to individually discern which of your Score/Time/Rings is incomplete.
    * ALSO also little arrows!
* Secrets checklist!
    * Scrolls vertically!
    * Allows for autogeneration of conditions based off conditionset, which allows for names of required levels to be hidden if you haven't played them yet!
    * Still allows overriding condition string per traditional checklist.
    * This allows us to show every secret's condition without letting it be spoiled or overflowing the everything.
    * Also ALSO also little arrows!
* Closed captioning!
    * Console command "closedcaptioning on/off".
    * Shows stuff in the bottom right hand corner of the screen.
    * sfxinfo[sfx_name].caption = "Butt.".
    * S_StartMusicCaption(string, tics, optional player) allows for a caption to play without being anchored to a specific sound.
* Color Profile!
    * Using only the best in advanced cube-based majyks.
    * cv_gamma now goes from -15 to +5!
    * cv_saturation - from 0 to 10!
    * A new menu for modifying the hue, saturation and gamma of specific corners of the cube (RYGCBM) independently of the master options!
    * Screenshots/Video Mode now supports turning on/off circumstantial color profile alterations (cv_screenshot_colorprofile).
* Spring cleaning!
    * cv_allcaps is dead.
    * Sudden death and old match scoring (25 points for shield damage as the only change??) is dead
    * A few things are taken off the menu because they're not that relevant to have.
    * cv_competitionboxes now applies to race as well.
    * Failed teleports go nuh-uh.
    * Question mark boxes don't have doomednums anymore, so they can't be placed in singleplayer and used to get free lives by playing with the tv_extralife etc stuff.
* Other tidbits!
    * HUD offsets are tweaked to give one digit less space to score and one digit more space each to time and rings to match up the right edges.
    * Emerald tokens show up on the level complete screen and are loaded into a coin slot at the end of the tally.
    * Speaking of Emerald tokens, they now give score all the time, and continues instead of 50 rings when you have all Emeralds.
    * Moved Race HUD down, and made it go bing bing bing BONG.
    * V_DrawCroppedPatch now properly handles topdeltas.
    * Minor tweak to GFZ3 eggmobile's pinch to be more lenient.
    * Hudnames for skins now replace full stops with katakana dots. We could make it replace a different character instead if we really wanted to, but I figure this matches what is desired.

Check out ```<root>/!LatestSRB2Files/srb2win_branch_deeznux.exe``` to try it out.

See merge request !91
2017-05-06 17:53:41 -04:00
toasterbabe 588ef776da Stop the s3k shields spawning in ultimate. Whoops! (I considered it okay to modify in this branch because box spawning was already tweaked here.) 2017-04-30 15:41:03 +01:00
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 bdb3c2ea0e extrainfo now determines "skybox ID", a number between 0 and 16 to identify the viewpoint or centerpoint
also I made that change skybox linedef exec special I guess (linedef type 448)
2017-04-26 18:16:01 +01:00
Monster Iestyn 6c619af9ce Use the skybox mobj's actual z position, rather than using the spawnpoint angle!
This means setting the skybox view angle is no longer stupid, objectplace no longer breaks skyboxes, and Lua-defined skybox mobjs can actually set a Z position more easily now.
2017-04-26 17:12:57 +01:00
Monster Iestyn 5608c4b4e7 Merge branch 'public_next' 2017-04-26 16:17:29 +01:00
Monster Iestyn f099782c91 Spinning/swinging maces/chains and Particle generators can now use P_FindSpecialLineFromTag! 2017-04-24 21:05:28 +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 8ffa741cda Merge branch 'master' into mapthing-spawn-hook 2017-04-19 17:46:38 +01:00
Monster Iestyn 941ab72204 Hardcode new/updated xmas scenery object type/state info 2017-04-18 18:32:52 +01:00
Monster Iestyn a6f830ddff Add the "MapThingSpawn" hook to Lua 2017-04-15 21:41:22 +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
Alam Ed Arias 5feccaad2a Merge branch 'next' into touching_fixes 2017-03-29 16:55:06 -04: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