Commit Graph

3107 Commits

Author SHA1 Message Date
toasterbabe 66d59efddc Sorry, MI. More info in forthcoming merge request. 2017-07-17 23:58:54 +01:00
Monster Iestyn 6e5cffba5b Create static function P_IsObjectOnRealGround for each time thinker to use in place of P_IsObjectOnGroundIn, for non-FOF floor touch specials
This fixes solid FOFs activating floor touch specials for normal ground if using an "each time" trigger linedef
2017-07-17 20:56:55 +01:00
Monster Iestyn 7d4513f2f1 Don't be stupid with FF_BLOCKPLAYER/FF_BLOCKOTHERS flags please 2017-07-17 20:47:00 +01:00
Monster Iestyn 832a7b1f5a Merge branch 'master' into opengl-improvements 2017-07-16 21:39:45 +01:00
Monster Iestyn 0416981c1b Merge branch 'mi-hardcode-again' into 'master'
MI hardcode again

Stuff hardcoded in this branch:
* Everything from SOC_TREE in patch.dta - the GFZ trees use thing types 806-808 and the other trees 810-816
* Everything from SOC_TOKE in patch.dta (but done better)
* Wall spikes, from Nev3r's DSZ/ACZ work, edited to actually hurt you on touch - these use thing type 522

MonsterIestyn/mi-hardcode-again on the FTP includes a test exe (srb2win-mihardcodeagain.exe) and a modified patch.dta (where SOC_TREE and SOC_TOKE are removed and missing wall spike sprites added). A test map for tokens in mario blocks is also included (marioblocktoken.wad).

See merge request !106
2017-07-16 16:37:53 -04:00
Monster Iestyn 64fae001eb Update hw_light.c's sprite lights list with the updates to the sprites list (and any before that I missed)
Not that we're using coronas at all anymore so whatever
2017-07-15 21:16:45 +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 381138d7b1 Increased hitbox height of GFZ trees to 128 FU and gave them all MF_SCENERY 2017-07-15 16:57:03 +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 aa947ea022 Starting work for hardcoding wall spikes 2017-07-13 22:42:08 +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 fe756d567e Add a "bias" to collision with chain ferris wheels to make it more likely that you'll grab one nearer to the center if you could potentially hit two in the next frame (previously was blockmap order dependent, which was never consistent) 2017-07-12 14:43:59 +01:00
Monster Iestyn 2350e94a9f Merge branch 'master' into next 2017-07-09 15:08:51 +01:00
Monster Iestyn 2ac566fa85 Fix whitespace goofup of mine 2017-07-09 15:08:17 +01:00
Monster Iestyn 0dd15ed8a4 Merge branch 'master' into lua-lump-load-only 2017-07-09 15:06:15 +01:00
Monster Iestyn fb23f4c724 Merge branch 'master' into opengl-improvements 2017-07-08 17:55:40 +01:00
Monster Iestyn 023d91a02e Merge branch 'public_next'
# Conflicts:
#	src/y_inter.c
2017-07-08 17:49:54 +01:00
Monster Iestyn 0bfd4106fb Merge branch 'next' into public_next 2017-07-08 17:43:28 +01:00
Monster Iestyn f0ffd691f4 Merge branch 'master' into next 2017-07-07 22:47:34 +01:00
Monster Iestyn fe3f4f4ed1 Merge branch 'pwease_no_kicky' into 'master'
Pwease no kicky

Don't kick Tails! Also, a movement for the WRITESINT8 to prevent modification to buf if the function bails early.

This can go into Master, right? It only matters for the host, and it's explicitly only having a major effect outside of netgames.

See merge request !201
2017-07-07 17:45:59 -04:00
Monster Iestyn 4752109233 Some more tweaks of my own:
*Add CONS_Printf messages for !netgame checks
*Arg count is checked first regardless of netgame status for both kick and ban, < 2 is checked instead of == 1 just in case these weren't called from console for some stupid reason?
*Moved Command_Kick's buffer vars to within the code that actually does kicking stuff
2017-07-07 22:40:00 +01:00
Monster Iestyn b291390edf Merge branch 'sp-tally-non-green-res-hud-fix' into 'master'
Single Player/Coop tally screen fixes

* The TIME/SCORE part of the HUD now doesn't move from the position it was before the tally screen started in non-green resolutions. The example screenshots of this bug and the fix for it below are all taken in 640x480:

  How it should be:

  ![](https://dl.dropboxusercontent.com/s/4h86gnm0tvkwjxh/srb20293.png)

  How it displays in 2.1.19:

  ![](https://dl.dropboxusercontent.com/s/awyfupn5wgo40rv/srb20294.png)

  How it displays in an exe with the fix:

  ![](https://dl.dropboxusercontent.com/s/gbstznautbl5f38/srb20295.png)

* The time display at the tally screen no longer limits the minute number to between 0 and 59.

  How a time > 60 mins displays normally just before finishing the level:

  ![](https://dl.dropboxusercontent.com/s/lclonkwfd656t55/srb20296.png)

  How it displays afterwards (it's supposed to be 61:19 but it's wrapped to 1:19 instead):

  ![](https://dl.dropboxusercontent.com/s/obv3fq2qeto9uo3/srb20297.png)

See merge request !202
2017-07-07 15:23:51 -04: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
Monster Iestyn e8df99c632 They didn't use V_HUDTRANS before and they probably shouldn't, my fault here 2017-07-05 22:30:18 +01:00
Monster Iestyn 815d10e15d Display minutes in full, so 60:00 for instance displays as 60:00 and not 0:00
The normal HUD display while playing a level doesn't do this, only the tally screen does it for some reason
2017-07-05 19:25:11 +01:00
Monster Iestyn aca7a574f8 Copy+paste st_stuff.c functions and macros to accurately draw SCORE/TIME on the tally screen like they are when actually playing the level 2017-07-05 17:05:39 +01:00
toasterbabe 9a1e1180ff Also account for bans, pff. 2017-07-05 16:29:21 +01:00
toasterbabe 60e21381ab Don't kick Tails!
Also, a movement for the WRITESINT8 to prevent modification to buf if the function bails early.
2017-07-05 16:20:23 +01:00
Monster Iestyn 298c1af045 Merge branch 'lua-archive-value-fix' into 'next'
Lua archive value fix

This fixes some potential problems with archiving mobjinfo_t/state_t data via Lua in netgames (whether as custom mobj/player vars or by NetVars hook). Thanks to LJSonic for pointing this out to me.

See merge request !200
2017-07-02 20:23:29 -04:00
Monster Iestyn 663d8a1f00 Merge branch 'jumping_springs' into 'next'
No more jumping springs FOR REAL!

The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.

Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.

Test with ```<root>/toaster/srb2springsagain.exe``` and ```<root>/DrTapeworm/springtest.wad```, via Mystic's secret server that [SOME jerk](https://www.youtube.com/watch?v=TRjXE_ZMT2s) keeps leaking from.

See merge request !199
2017-07-02 20:22:53 -04:00
Monster Iestyn c751971d57 Fix integer type slipup in ArchiveValue for saving mobjinfo/state #s that LJSonic spotted
Apart from the fact that UnArchiveValue reads UINT16 for both anyway (which alone causes problems), but UINT8 isn't even enough to store the higher end of the object types list and definitely most of the states welp
2017-07-02 16:50:11 +01:00
toasterbabe 9797ae31a6 Fix the springs jumping!
The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.

Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.
2017-07-02 16:48:58 +01:00
Monster Iestyn 100422e1ce Merge branch 'master' into opengl-improvements 2017-07-02 16:42:40 +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 252cdb0c28 Merge branch 'private_flatsprite' into 'master'
OpenGL papersprites

I don't know if anyone actually tested Sryder's original OpenGL papersprites support before it was merged in, but there was some issues with the papersprites themselves "wobbling" about in a sort of weird way depending on the angle you view it from or where you are. It's easiest to see what I mean if you just load up sawb.wad, and strafe about when viewing one of the sawblades.

Thankfully all I really needed to do was tweak the way angles work for papersprites. I also cleaned up Sryder's original code a little, not that I really needed to do so though.

See merge request !96
2017-07-02 09:46:44 -04: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 68d8906a36 Merge branch 'mi-code-cleanup-once-again' into 'master'
MI code cleanup once again

Code prettification branch 12472849127, no real changes to gameplay except a bunch of outdated SOC features have been removed or disabled (most notably, Callum's old texture/patch SOC implementation). Though the changes here might also speed up game startup a teensy bit I suspect, possibly?

See merge request !102
2017-07-02 09:45:30 -04:00
Monster Iestyn 7b551ed409 Merge branch 'animdef-type-check-fix' into 'master'
Animdef type check fix

This fixes Sphere's problem with ANIMDEFS, where animated textures and animated flats with the same name cause one or the other not to animate (depending on the order they are in the ANIMDEFS lump, not the WAD; if the texture animdef comes first the texture animates, if the flat animdef comes first the flat animates).

The game now compares the "type" (i.e. whether the anim is for a texture or flat) of a new animdef with that of existing typedefs, before deciding whether to ignore it based on the starting lump's name.

See merge request !100
2017-07-02 09:44:39 -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 86f9b6d409 After discussions, flipping the flag that means you CAN'T turn the CEZ chains now means that when it's enabled, you CAN turn them. In order to get base game parity by default, rather than as an obscure option. 2017-06-27 23:34:55 +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
toasterbabe fe4dcee9ad fix inaccurate SC_FULLBRIGHT declarations 2017-06-26 16:30:23 +01:00
toasterbabe b2fc2e03ba * Always remove linkdraw vissprites from unsorted drawing chain.
* Make the related I_Error more descriptive and "#define PARANOIA"'d only.
2017-06-26 16:11:50 +01:00
toasterbabe dda9148e56 Fix issue with precipitation not modifying its mobj reference, resulting in Smiles' tails disappearing in CEZ3.
Also, as a result, safeguard some stuff against referencing stuff that's outside of *precipmobj_t's domain.
2017-06-26 15:53:20 +01:00
toasterbabe 59ea08ee11 * Change the order of operations such that linkdraw sprites aren't ever used for ordering comparisons with non-linkdraw sprites.
* Refactor of the unbundling to not involve modifying the next/prev links.
* Make the booleans in vissprite_t use flags stored in sprite->cut instead.
* Make the linkdrawn sprites much more linked - ie, same brightness (unless independently fullbright), same colormap, and don't draw if the tracer isn't being drawn.
* Other minor corrections.
2017-06-26 14:44:10 +01:00
Monster Iestyn 8080e1cd31 More optimising and otherwise fixing bizarre formatting in hw_trick.c 2017-06-26 11:12:26 +01:00
Monster Iestyn 6a85121b79 Moved my added slope checks in hw_trick.c to isCeilingFloating/isFloorFloating
I also optimised those two functions while I was there (why keep a "floating" variable when setting it to false guarantees the functions return false?)
2017-06-26 10:51:19 +01:00
Nevur 677c1045a1 The sprites stuff is changed now.
-PK3 loadtime drastically reduced, even for very big files.
-Looks for srb2.pk3 now instead.
-"flipped the switch" for sprites.
2017-06-25 23:04:51 +02:00