Commit graph

1364 commits

Author SHA1 Message Date
Monster Iestyn eae47c9808 Fix Knuckles in 2D mode attempting to latch onto air when gliding into a slope. Now he just attempts to latch onto the slope directly (which I'll fix another time, if I can figure out how)
(fix for SUGOI's Retro Hill Zone)
2016-09-01 21:21:20 +01:00
Monster Iestyn 21aa444943 Merge branch 'cutscene-switch-fix' into 'next'
Cutscene switch fix

Yet another fix for SUGOI, lol: apparently going from a final level's post-cutscene straight to a custom credits cutscene gets the latter stuck forever in the first scene (because the game accidentally stops the cutscene responder from realising the custom credits cutscene is running). This branch of course makes a fix for that.

See merge request !108
2016-08-28 13:40:44 -04:00
Monster Iestyn 454b705d32 Merge branch 'wall-collision-fix' into 'next'
Wall collision fixes

Fixes included in this branch:
* A fix for a specific crash encountered in a SUGOI map (sound familiar?) caused by bouncing off a wall adjacent to a slope
* A fix for solid midtextures not accounting for Effect 3/Peg Midtexture properly (https://mb.srb2.org/showthread.php?t=41462)
* A fix for solid midtextures not accounting for texture y offsets properly for non-Lower Unpegged/Peg Midtextured midtextures
* A fix for solid midtextures not accounting for "infinite" repeats (Repeat Midtexture + no repeat count set)
* ~~A fix for Effect 4 on Polyobject First Line making that particular linedef's midtexture solid in addition to making planes visible - this is not wanted if you want a polyobject with both visible planes and full intangibility.~~ Apparently they never did this anyway, don't mind me \o/

See merge request !104
2016-08-28 13:33:14 -04:00
Monster Iestyn 2a6a21a4a2 Solid midtextures now account for "infinite" repeats 2016-08-27 17:14:21 +01:00
Monster Iestyn 96f74a3a17 Merge branch 'master' into next 2016-08-25 19:19:53 +01:00
Wolfy 831c29ead7 Merge branch 'climbingshit2_electricboogaloo' into 'master'
Climbing shit 2 electric boogaloo: an adventure in how much toast hates how the ogl renderer was implemented

Fixed Knuckles being able to climb in space in OpenGL.

Using the last-touched line instead of R_IsPointInSubsector because FLOAT_TO_FIXED is bad in P_ functions

To understand the original problem: look at AjustSegs(void) in hw_bsp.c. It reallocates the vetex_t pointers for lines as POLYVERTEX_T pointers, and of COURSE things are gonna get wacky when you're casting pointers.

This merge request is into master because it's a bug that's IN master and must never reach the public because of how bad it is

See merge request !101
2016-08-25 14:18:44 -04:00
Monster Iestyn ab3f677e66 F_EndCutScene now sets cutsceneover to true BEFORE running Y_EndGame and the like, not AFTER 2016-08-25 17:58:54 +01:00
Monster Iestyn fd5297ee6c Merge branch 'fix-obj-step' into 'next'
Fix non-player objects having busted step-up/down on slopes

Why the fuck did I make this a player conditional in the first place holy shit

See merge request !103
2016-08-20 18:08:11 -04:00
Inuyasha f3639489ab Merge branch 'moredisabling_hudstuff' into 'next'
Allowing the disabling of Match/CTF/Miscellaneous Ringslinger HUD elements

Does what it says on the tin.

Requested by Lat and Speedwagon, selfishly also desired because of Thokker, open and shut. If 2.1.16 is delayed, might as well get some goodwill-raising zero-effort stuff in there.

See merge request !106
2016-08-20 01:34:23 -04:00
Alam Ed Arias 0fc848dc09 Merge branch 'master' into next 2016-08-18 19:38:55 -04:00
Alam Ed Arias e5c44de6ca travis: cut down on osx builds 2016-08-18 19:38:21 -04:00
toasterbabe 3db3433a51 More consistent comment. 2016-08-19 00:07:32 +01:00
toasterbabe 3d9fe7c899 The ability to disable weapon rings, as heavily requested by Lat and Speedwagon for their high effort character .wads and selfishly also desired to make thokker less hacky. 2016-08-19 00:06:12 +01:00
Monster Iestyn 1530183ddf Fix multiple solid midtexture-related issues:
* Effect 3 (Peg Midtexture) is now accounted for properly, flipping the collision box position to match the actual rendered position of the midtexture
* Fixed incorrect application of y-offsets for non-lower unpegged midtextures collision boxes; +ve always goes up, -ve always goes down!
* Effect 4 now doesn't make midtextures solid for polyobjects at all - this "conflicted" with First Line having both Effect 4 (visible planes) and Effect 3 (intangible) simultaneously, where we kind of expect the first line's wall to not be made solid. This may be less of a problem in future SRB2 versions, but for now solid midtextures for polyobjects are disabled.
2016-08-14 16:56:41 +01:00
Alam Ed Arias 0264fd24ae @MonsterIestyn: Should probably be returning true then 2016-08-14 10:43:44 -04:00
RedEnchilada 55b8ef9f64 More stepping upward fixing ugh 2016-08-14 00:03:00 -05:00
RedEnchilada 758c77fe53 Fixed non-players having fucked slope stepup/down 2016-08-13 17:45:23 -05:00
Monster Iestyn f1a9634260 P_LineOpening now takes a mobj_t argument, instead of relying on tmthing
. tmthing can be NULL if called from PTR_SlideTraverse, so we should use slidemo instead

This fixes a crash that occurs in yet ANOTHER SUGOI map, involving bouncy walls next to sloped floors/ceilings
2016-08-13 21:41:18 +01:00
toasterbabe be973d6990 expanded comment for future generations 2016-08-13 15:07:40 +01:00
toasterbabe 612575620b Solved the climbing-on-one-sided-lines problem another way, using the last touched line's attributes.
(After talking to Alam, we can't have floats anywhere near P_ functions, so.)
2016-08-13 14:16:06 +01:00
toasterbabe 5d6463fafc Fixed Knuckles being able to climb in space in OpenGL.
To understand: look at AjustSegs(void) in hw_bsp.c. It reallocates the vetex_t pointers for lines as POLYVERTEX_T pointers, and of COURSE things are gonna get wacky when you're casting pointers.

I dunno how resilient the FLOAT_TO_FIXED solution is or whether it'll be netgame compatible (yayyy float precision loss) but it's not like our builds are netgame compatible with themselves
2016-08-13 13:39:24 +01:00
Alam Ed Arias fb8de61a81 Merge branch 'master' into next 2016-08-11 12:48:52 -04:00
Monster Iestyn c79428a178 Merge branch 'opengl-planes' into 'master'
OpenGL planes fix

This branch removes a specific hack in the OpenGL code for detecting if a plane is for the floor or ceiling of a sector. This it turns out fixes ceiling slopes in Boinciel's SUGOI map going missing. Though, It doesn't fix that other glitch with one FOF (must be unrelated).

If you want to test these fixes out properly, make sure working in-level sectors, FOFs AND also polyobjects all still work fine, sloped or not.

See merge request !97
2016-08-11 12:15:08 -04:00
Monster Iestyn ae5844be76 Merge branch 'fof-slope-crash-fix' into 'master'
Fof slope crash fix

This fixes yet another software renderer crash, this time relating to sloped FOFs: sometimes the renderer thinks parts of FOFs where the top and bottom heights are the same height are actually the bottom going through the top (in other words a negative height). This causes problems when drawing normal walls around such FOFs since the game obviously doesn't expect negative heights anywhere along the FOF - before slopes, the game could just flip around the top and bottom heights automatically with no problems. This branch also should fix crashes for all genuine cases of negative FOF heights when slopes are involved, I suppose.

Hopefully this stops FuriousFox's SUGOI map crashing for the time being, all seemed fine when I tested it out myself.

See merge request !96
2016-08-11 12:13:52 -04:00
Alam Ed Arias 774a93c819 Merge branch 'master' into next 2016-08-07 23:23:50 -04:00
Wolfy bbb4bb8a05 Merge branch 'invalid-map-name-test' into 'next'
-warp checking for invalid map names

I've noticed a bunch of new people getting the "Cannot warp to map 0 (out of range)" error when testing their custom maps. On asking what map name they used, it was clear they didn't use a MAPxx name at all. Sadly it was not obvious to them that other kind of map names are not accepted by SRB2, so I thought it best we make that more clear in-game.

SRB2 now gives you the error "Cannot warp to map \[your input\] (invalid map name)" if you used -warp with a param that is neither a MAPxx name or a plain number.

See merge request !99
2016-08-07 16:34:23 -04:00
Wolfy 3fcaf0b351 Merge branch 'findspeciallinefromtag-fix' into 'next'
P_FindSpecialLineFromTag crash fix

This fixes the case where an in-level sector or FOF control sector with a tag of -1 or 65535 (seriously, who does that?) can possibly lead to a crash in this function when searching for heat linedef specials in 1st person. And also the same kind of crash any other sort of weird case where the tag number that function uses for searching is -1 or 65535, I suppose!

See merge request !98
2016-08-07 16:33:53 -04:00
Wolfy 8561a6b413 Merge branch 'sprite-loading-tweaks' into 'master'
Fix R_AddSingleSpriteDef's I_Error messages

Whoops, seems I forgot about this little branch. Basically this fixes how for a character's sprites, a full sprite lump name is displayed instead of just its sprite prefix in the "R_AddSingleSpriteDef: No patches found for [sprite prefix] frame [frame character]" message (unlike when it occurs for non-character sprites), resulting in something like "R_AddSingleSpriteDef: No patches found for PLAYC2C8 frame \^" which does NOT help custom character authors at all as it just confuses them instead. (for the record, the problem would actually with the ^ frame and not the ones displayed after "PLAY")

Oh, and the same problem is also fixed for this similar message: "R_AddSingleSpriteDef: Sprite [sprite prefix] frame [frame character] is missing rotations"

See merge request !95
2016-08-07 16:33:15 -04:00
RedEnchilada 02d3382408 Leave a note to anyone foolish enough to try to fix this 2016-08-07 12:17:31 -05:00
Monster Iestyn 4c4f124611 Detect if -warp's parm is actually a valid map name (MAPxx or plain number), and print an "invalid map name" message if not 2016-07-28 16:07:26 +01:00
Monster Iestyn 2b985bda85 Make sure we detect if start >= numlines so we can deal with that properly
for some apparent reason the compiler didn't like the while loop condition edit on its own (it complained about inline failures for P_MobjReadyToTrigger for some reason), so I had to add that extra bit above the while loop... and it was happy again, huh
2016-07-28 14:57:19 +01:00
Monster Iestyn 2870e19f7f Take out fixedheight-based hacks for checking if floor or ceiling! Use an "isceiling" boolean for that instead
This apparently fixes most of the issues with ceiling slopes in Boinciel's SUGOI map
2016-07-27 19:56:21 +01:00
Monster Iestyn dc765cde2c Fix R_DrawColumnShadowed_8 crash encountered in FuriousFox's map
If you want more specifics, sloped FOFs are to blame it turns out: sometimes the bottom of an FOF wall blocking a segment of an in-level wall column can be considered ABOVE the top part of the FOF there (yikes), and then the dc_y* values go offscreen, and then BOOM
2016-07-24 18:54:01 +01:00
Alam Ed Arias 4321757df4 Merge branch 'master' into next 2016-07-24 01:07:25 -04:00
Alam Ed Arias 03ddc1f29a define SRTICT_ALIGN to - if the system is x86/x64 system 2016-07-23 23:26:08 -04:00
Alam Ed Arias ddce305c17 under clang, defined does not means true 2016-07-23 23:14:24 -04:00
Alam Ed Arias 82fad646e7 wad and lumps are unsigned, not signed 2016-07-23 23:02:10 -04:00
Alam Ed Arias ee73416222 appveyor: fixup version 2016-07-22 17:28:00 -04:00
Alam Ed Arias da6a2be075 Merge branch 'next' 2016-07-22 17:22:58 -04:00
Alam Ed Arias 5c234a817a Merge branch 'master' into next 2016-07-21 18:49:33 -04:00
Alam Ed Arias f6b8b51ac2 Merge branch 'software-fixes' into 'master'
Software crashes fix... fix

Fixes a typo introduced by merge request !75 that caused upper textures to set the wrong ceiling clipping value when not visible, allowing all sorts behind the walls to be visible. This is most noticable in GFZ2 when the inside of the tunnel section is visible

...probably a good idea to make sure this one doesn't introduce any MORE visual glitches by mistake (again, compare with 2.1.15 if possible)

See merge request !93
2016-07-21 17:45:45 -04:00
Alam Ed Arias df0a90957f Merge branch 'tilted-transparent-flats-fix' into 'master'
Fix for flats with transparent pixels on slopes

This fixes how R_DrawTiltedSplat_8 unintentionally allows the cyan pixels to NOT be considered "transparent" if after being remapped, depending on sector brightness and/or linedef type 606 colormaps, the result of remapping is not palette index 247 (the cyan we typically turn transparent). That is, the original colors from the source flat graphic are not checked, but instead the __result__ of coloring the flat under the respective colormap is checked for "transparent" pixels. This is only a problem for the tilted splat drawing function, not the regular one for non-sloped planes with cyan-pixel-using flats.

I found out about this bug from the issues Ritz was having with sloped 255-alpha translucent FOFs using transparent flats and his custom COLORMAP lump (and later when he applied a linedef type 606 colormap to the FOF) for his custom map. Thankfully he has some workarounds, but this should fix the code-side issues that caused his problems in the first place.

I also fixed stuff with another splat drawing function that's not currently used atm (maybe it will be in the future, if splats themselves are ever enabled again? *shrugs*).

See merge request !92
2016-07-21 17:14:43 -04:00
Alam Ed Arias b02c824da8 Merge branch 'skybox-render-fix' into 'master'
Skybox rendering offset fix for third person/alt view camera

Fixes the issue reported in this thread: https://mb.srb2.org/showthread.php?t=41729

I dunno if this will negatively affect any existing skyboxes in SRB2's own levels, that said. I tried out THZ2 and CEZ1 with this fix at least but I forgot to compare them with how they are in 2.1.15 so _*shrugs_*

See merge request !94
2016-07-21 16:58:06 -04:00
Alam Ed Arias 9301344003 Merge branch 'macosx-hacking' into 'master'
OS X Makefile build setup

This merge request:

* Cleans up the OS X bundle resource location code and fixes a SIGSEGV and memory leak
* Simplifies and fixes the OS X desktop alert code, closing more leaks
* Adds the MACOSX build flag to the Makefiles, to allow building a binary (but not Mac app yet) of SRB2.

This is intended to make it easier for developers to build on Mac OS X, without having to pull in all of XCode. You can keep using CMake if you prefer.

To test, use `make -C src MACOSX=1 NONX86=1 SDL=1 NOASM=1` for a release build.

Left to do:

* Add a content bundling script to be run after building, and a flag to trigger doing that.
  `MACOSX_BUNDLE` maybe?
* Somehow get access to a Mac running PowerPC and figure out how to build a multi-platform binary.
* Add the proper magic to compile using gcc if requested. (Right now, compilation is done via LLVM/Clang)

See merge request !72
2016-07-21 15:38:46 -04:00
Alam Ed Arias a9c521031d Merge branch 'gasjets_and_slopes' into 'next'
Gas jets, fan objects, springs and slopes

Whoop whoop whoop minor bugs that only get noticed due to weird experiments whoop whoop whoop

* For gas jets only: the object's standingslope is ALWAYS null. No drifting down the slope for you.
* For gas jets and fan objects: Now checks whether the player's top is below the bottom of the launcher, instead of its bottom. zdist calculation not affected, since it's signed and okay with being negative by about the height of the player.
* For all 3: the player's standingslope is NULL'd so the player isn't launched off at a wacky angle if they're standing on a slope then walk into the thing.

See merge request !91
2016-07-21 15:11:49 -04:00
Alam Ed Arias 1a0fcbd8dc Revert "Merge branch 'RemoveINetC' into 'master'"
This reverts commit 8607f5247c, reversing
changes made to 11d76a6562.
2016-07-21 14:42:00 -04:00
Alam Ed Arias 8607f5247c Merge branch 'RemoveINetC' into 'master'
Remove i_net.c

The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).

The vast majority of code in the file seems to be contained in HAVE_SDLNET ifdefs, and I'm pretty sure SRB2 has never used SDLNET in a public build. The only bit not contained in that block is I_InitNetwork(), which just prints an error and returns false.

Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.

See merge request !73
2016-07-21 14:15:58 -04:00
Alam Ed Arias c5fe08dcd2 Merge branch 'aatree-refactor' into 'next'
Re-factoring AA tree code from m_misc.c/m_misc.h into its own files

What the title says. The AA tree-related code now lives in the files m_aatree.c and m_aatree.h. Part of why I did this was to solve this m_misc.h/w_wad.h cyclic dependency problem (involving MAX_WADPATH and AA trees themselves) mentioned in the now-removed comments, another reason was ...only OpenGL uses AA trees at all, why include the relevent structs/functions/otherwise anywhere except where is necessary (which is very few files as it turns out)?

Otherwise, it just looked better on its own rather than mixed with all the other stuff already in the m_misc files. Not really important or anything affecting gameplay at all I guess.

See merge request !82
2016-07-21 14:13:38 -04:00
Monster Iestyn 6ba568ac49 Fixed typo of mine that lead to the ceiling part of GFZ2's tunnel section being rendered wrongly 2016-07-20 15:11:36 +01:00
Monster Iestyn 77a40e9016 Slightly unrelated, but if R_DrawTranslucentSplat_8 is ever going to be used this is probably more efficient (also fixing early colormap application for the last part) 2016-07-17 23:01:07 +01:00