Commit graph

2915 commits

Author SHA1 Message Date
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 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
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
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 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
Monster Iestyn c653289121 Turns out we don't need to use SDL_SetWindowTitle on its own, since SDL_CreateWindow already deals with the window title anyway. So I've disabled everything related to Impl_SetWindowName for now
Also what were you thinking Fury?!? window shouldn't be NULL for SDL_SetWindowTitle, you backwards person you
2017-06-25 20:22:01 +01:00
Monster Iestyn 0eaebb16fc Check if existing animdefs have the same type as the animdef we're parsing 2017-06-25 18:17:05 +01:00
Monster Iestyn f44d769d39 dehacked.c cleanup
*removed Texture/Patch SOC implementations, since they weren't used in the end
*removed remnants of AnimTex and some Spritename thing
*none of the save* arrays in DEH_LoadDehackedFile were being used, so I removed all related code disabled or otherwise
*DEH_LoadDehackedFile doesn't need a "wad" param anymore since only the Patch block was using it
2017-06-24 20:33:56 +01:00
Monster Iestyn 7d82ac406e whoops forgot to change these two 2017-06-24 19:27:29 +01:00
Monster Iestyn b2941087de Move all the leftovers of the "title" print code into D_Titlebar, since it's only used by DOS now 2017-06-24 18:39:17 +01:00
Monster Iestyn 9d24186ecd Removing D_SRB2Main's OS2 window title code
"pmData" was originally declared in the files in the (non-SDL) OS2 source subfolder, last known to be present in Demo 4.1's source code ...said folder has not been around for over a decade, so this would definitely fail to compile if you tried compiling for OS2 without SDL anyway
2017-06-24 18:27:43 +01:00
Monster Iestyn d263c4fcd4 Remove unused static vars in d_main.c (and remnants of some of them) 2017-06-24 18:15:06 +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 fc7aeb2685 Merge branch 'next' into public_next 2017-06-23 16:57:01 +01:00
Alam Ed Arias 1111282908 Merge branch 'master' into next 2017-06-22 19:52:42 -04:00
Monster Iestyn b37d09df5f Merge branch 'opengl-slope-FOF-lighting-fix' into 'master'
OpenGL slope FOF lighting fix

This fixes some issues with sloped FOFs that affect lighting in OpenGL (as in, those that cast a shadow or have a colormap). Particularly, they can do strange things to any wall textures adjacent to them, as we've noticed ourselves in levels for 2.2. =P

See merge request !194
2017-06-22 19:49:42 -04: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 6a0329857d Merge branch 'polyobject-seg-render-fix' into 'master'
Polyobject seg render fix

This fixes both Software and OpenGL renderers so that polyobject segs aren't drawn if the game is drawing the actual subsectors they're from (outside the main level, where the polyobject walls were pre-spawn). They should only appear as part of the polyobject itself in-level.

This means a few glitches with polyobjects are probably fixed: for instance in Software mode, polyobject walls sometimes appear through level boundaries (and make everything above/below vanish, turning into HOM or skybox), if the BSP rendering code happens to find one of the subsectors said segs came from outside the level. I don't think anything similar happens in OpenGL, though I'm sure some unwanted typecasting is happening as a result of attempting to draw the segs. (And it fixes a crash in 2.2 anyway.)

See merge request !195
2017-06-22 17:29:01 -04:00
Monster Iestyn abf92e965c Merge branch 'ping-fix' into 'next'
Ping-related code fix

Somehow, the part of the netcode for calculating the players' pings in a netgame frequently gets the concepts of nodes and players mixed up, which is probably not a good thing. This branch of course fixes those slipups.

I originally based this branch on master to be merged to it (since it only fixed issues on the host's side), but after finding another issue with clients receiving PT_PING from the server, I decided to make this a merge to next instead.

See merge request !193
2017-06-22 17:27:38 -04:00
Monster Iestyn 1efd2aa770 Merge branch 'ld414-invalid-sound-fix' into 'next'
Ld414 invalid sound fix

This fixes Linedef type 414 crashing the game if an invalid sound number was supplied to it (this can happen if you, say, scrambled THZ2's textures *cough*), whether or not the "Repeat Midtexture" flag is checked.

See merge request !196
2017-06-22 17:26:58 -04:00
Monster Iestyn 8ab4b8c7fe Merge branch 'Lua-playerspawn-hook-fix' into 'next'
Fix for Lua's "PlayerSpawn" hook

This fixes how functions for the "PlayerSpawn" Lua hook aren't called when the player respawns at a starpost instead of at a map thing start.

(Note to Lua scripters who may want to adjust their scripts accordingly with this in future, checking if `player.starposttime` is non-zero is the best way to detect if you're spawning at a starpost or not.)

See merge request !198
2017-06-22 17:25:46 -04:00
Monster Iestyn da2f5fe0a2 Fix PlayerSpawn hook not being called if the player is respawned at a starpost 2017-06-20 16:18:51 +01:00
Monster Iestyn 7d28b63257 Merge branch 'master' into next 2017-06-20 15:45:47 +01:00
Alam Ed Arias 2bd11120b5 Appvenyor: disable OBJDUMP 2017-06-19 14:17:58 -04:00
Monster Iestyn ab0445ae28 Merge branch 'ghost-scale-fix' into 'next'
Record Attack ghosts scale fix

This fixes how changes to the player's scale are recorded in Record Attack demos, so ghosts of your demos don't disappear when they attempt to change to scales >= FRACUNIT (if they didn't change scales at all they were unaffected).

Have some gifs for comparison:
* A demo recorded without the fix: https://dl.dropboxusercontent.com/s/tk9x8nptzhw7yb1/srb20106.gif
* A demo recorded with the fix: https://dl.dropboxusercontent.com/s/b4h4iuiwbh0voos/srb20107.gif

See merge request !197
2017-06-18 09:43:25 -04:00