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.
Merge request reports
Activity
https://gfycat.com/UnselfishChillyAuk here's an example of these problems - the damage only works when the lava wave overtakes you, not when you try to overtake the lava (and no, it doesn't matter which way the slope linedefs are facing, so it's not an instance of *rover->topheight being used instead of P_GetSpecialTopZ...)
4420 4421 return NULL; 4421 4422 } 4422 4423 4424 #define TELEPORTED (player->mo->subsector->sector != originalsector) 4425 4423 4426 /** Checks if a player is standing on or is inside a 3D floor (e.g. water) and 4424 4427 * applies any specials. 4425 4428 * 4426 4429 * \param player Player to check. 4427 4430 * \sa P_ThingOnSpecial3DFloor, P_PlayerInSpecialSector 4428 4431 */ 4429 static void P_PlayerOnSpecial3DFloor(player_t *player, sector_t *sector) 4432 static void P_PlayerOnSpecial3DFloor(player_t *player, sector_t *sector, sector_t *originalsector) Any particular reason you made this function take a new arg? It's always going to be
player->mo->subsector->sector
(if it wasn't then you'd obviously teleported by that point in which case the function shouldn't even be running lol), so just make it a variable inside the function or something? That's just I think though
3606 3606 { 3607 3607 if (roversector) 3608 3608 { 3609 if (players[i].mo->subsector->sector != roversector) 3609 if (!(players[i].mo->subsector->sector == roversector 3610 || sector->flags & SF_TRIGGERSPECIAL_TOUCH)) Hrm, wouldn't this mean the players wouldn't have to touch the sector itself if it was one that enabled touching? May want to go through their touching sectorlist instead or something, I'm not sure about this. (correct me if I'm wrong)
EDIT: Same goes for the other line, which is 3618 in this commit at least
2184 2199 if ((netgame || multiplayer) && players[i].spectator) 2185 2200 continue; 2186 2201 2187 if (players[i].mo->subsector->sector != sec) 2202 if (players[i].mo->subsector->sector == targetsec) NOTE: Re "Also prevents the player from standing on death pits for 1 tic" - step by step your way through https://gfycat.com/SolidSelfassuredBoubou or https://gfycat.com/CookedIndolentGalapagosalbatross and see the one tic where you're running on the ground. And yes, this was recorded in 2.1.16. That doesn't happen with this, which is https://gfycat.com/MassiveScornfulFallowdeer or https://gfycat.com/SlushyDarkDutchshepherddog and doesn't have the one tic.
Also, a rundown which I gave for people on a Discord server when quizzed about ramifications:
[7:39 PM] ghoster: so basically i changed the order of operations [7:40 PM] ghoster: currently it's: [7:40 PM] ghoster: tic start -> world moves -> player checks sector specials -> player moves -> end tic(edited) [7:40 PM] ghoster: my change is: [7:40 PM] ghoster: tic start -> world moves -> player moves -> player checks sector specials -> end tic(edited) [7:41 PM] ghoster: this has the advantage of allowing the player to move towards the thing and then touch the lava [7:42 PM] ghoster: instead of trying to touch, not doing so, then moving forwards to hit it, then it moves away, then trying to touch... [7:44 PM] boinciel: this sounds fine to me [7:46 PM] ghoster: it sounds fine [7:46 PM] ghoster: but i wonder how much assuuuumes
Added 1 new commit:
- 7b12820c - Tweaked P_CheckSolidLava to avoid changing its function signature, and P_CanRunO…
Added 1 new commit:
- e67f48df - Forgot to revert the other files.
Added 32 new commits:
- 941df72b - Merge branch 'master' into next
- f3751828 - Merge branch 'master' into next
- 7b932878 - Merge branch 'master' into next
- f97301b8 - Merge branch 'master' into next
- fea97b48 - Merge branch 'master' into next
- 2d72b2fa - You can now move the cursor in command prompt and chat, using left/right, ctrl+l…
- 8b72b553 - Fixed warnings
- d4ee063c - Merge pull request #130 from LJSonik/console-and-chat-improvement
- b2c71944 - Revert "Chat and console improvements"
- 115b99db - Merge pull request #132 from STJr/revert-130-console-and-chat-improvement
- 2ec972af - check numVertices, bail out and print error message if there are too many
- 561a0fe7 - Attempt loading of an MD2 only once; if we failed then don't bother again
- efe02e2a - allow triangle/frame limits too
- 8909b7c2 - Change >= to >, I THINK having exactly 4096 vertices is safe?
- 3bf19a00 - Merge branch 'md2-limits-check' into 'master'
- 2dfb841c - Correcting slight mistake I made
- 0882dd79 - Merge branch 'md2-limits-check-hotfix' into 'master'
- e245cdfc - Console with moving cursor, selections, etc
- 81077656 - make console back color use just one section of memory
- c277125f - modifier key status made globally accessible
- bb20cfd6 - Clipboard copy/paste testing
- 8040a68f - Clipboard: remove Win32 code for SDL Clipboard API
- 1f6388a2 - Fix up Win32 interface code misdeclaration of I_ClipboardPaste()
- bb92986a - Merge branch 'console-improvements' of http://git.magicalgirl.moe/STJr/SRB2 into…
- 010c52ae - show highlight BG over ellipses if highlight extends offscreen
- 55400a26 - go fuck yourself stupid compiler
- 2569a1ed - Merge branch 'console-improvements' into 'master'
- 0726dbe0 - Started work on making HWR_DrawFill support V_NOSCALESTART properly ...so far I'…
- 42f985cd - Remove pdupx/y and just use sdupx/y for everything, thanks Inuyasha
- 672ae61b - Merge branch 'drawfill-opengl-fix' into 'master'
- 694bb73e - Merge branch 'master' into next
- a901f88d - Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into touching_fixes
Toggle commit listAdded 4 new commits:
- 7c07f390 - Make sure flipped things placed directly on ceiling get MFE_ONGROUND
- ac966bf7 - Merge branch 'mfe_onground-is-stupid' into 'next'
- 3c8f5b46 - Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into touching_fixes
- 77399b8f - * Disabled #define SECTORSPECIALSAFTERTHINK. This did not need to be done in nex…
Toggle commit listModified to disable SECTORSPECIALAFTERTHINK, which will later be enabled in an internal branch so we can test properly there. (also, removed the applying of SF_TRIGGERSPECIAL_TOUCH on sloped sectors, which had consequences off the ground and will be redone in a better way at a later stage)
Added 29 new commits:
- 5e74318f - Merge branch 'master' into next
- 02d78b35 - Smoother ropes and zoom tubes ported from internal.
- 1ec97c24 - Merge branch 'smooth_ropes' into 'next'
- 31d569a1 - No more changing skins when you're in singleplayer and manage to enter a hole in…
- aa82042c - Merge branch 'credit_switch' into 'next'
- 02b32b3f - Merge branch 'master' into next
- f4705b01 - Don't call SDLESSet
- 168f8d5c - Un-stub Surfaceinfo and just print the parts that still work in SDL2
- 20854616 - Comment out SDL2STUB from Impl_SetWindowIcon
- 1606a45b - Some cleanup/reorganisation in SDLSetMode and Impl_CreateWindow
- 153ba39f - Remove remnants of SDLK_ stuff, we use scancodes now not keycodes
- 5cf4767a - Clearing away lots of disabled code (some of it would no longer work on SDL2 anyway)
- 8bbbeff2 - Make Impl_SDL_Scancode_To_Keycode look a bit neater
- 347b5318 - (Messiness warning) attempt to start using SDL_SetRelativeMouseMode instead of t…
- ae3e1136 - Revert "(Messiness warning) attempt to start using SDL_SetRelativeMouseMode inst…
- 64801a1a - Merge branch 'sdl2-cleanup' into 'master'
- 78f5dd15 - readme.txt dupilcated, also incorrect
- fa8a673d - Merge pull request #146 from mdeguzis/patch-1
- c9aebc6f - libz pkgconfig
- 93c98413 - move Windows zlib options out of PNG to ZLIB
- b9b5d203 - Makefile: move ZLIB flags outside of GME check
- d782638d - Merge branch 'zlib_pkgconfig' into 'master'
- 6f4699fb - MobjThinker, MobjCollide and MobjMoveCollide hooks are now directly linked to th…
- db20bfb3 - Generic mobj hooks are now run before mobjtype-specific mobj hooks, and player/l…
- fe3916a6 - Merge pull request #147 (closed) from LJSonik/hook-optimisation
- f4b05911 - Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2 into pub_next
- 0e6e52ea - Start mobjnums at 1 instead of 0, so that the first found mobj can be relinked a…
- 853f1f5a - Merge branch 'savegame-hotfix' into 'next'
- ebd436bf - Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into touching_fixes
Toggle commit listAdded 138 new commits:
- f9b41898 - Don't allow skipping stats in record attack/nights attack
- 9b737d11 - Merge branch 'record-attack-custom-exit-fix' into 'next'
- 0f014fe2 - Merge branch 'master' into next
- cb98c2d9 - Merge branch 'master' into next
- 8f4f8c6e - Merge branch 'master' into next
- 87dc33a7 - Merge branch 'master' into next
- e727fea4 - Merge branch 'master' into next
- e3b94c04 - Added transmaps to non modifying lump list.
- d294c9d1 - P_NetUnArchiveWorld now uses P_AddLevelFlatRuntime instead of P_AddLevelFlat.
- ab423f99 - Optimising retrieval of sector_floorpic/ceilingpic
- 5e12f349 - Merge branch 'flat-changing-hotfix' into 'next'
- a9cfd12e - Created R_GetTextureNum to make sure top/bottom/midtexture texture ids are alway…
- 8e565827 - Created R_CheckTextureCache to make sure midtexture/FOF walls cache their textur…
- 6ca806a8 - Fix FOF lighting being stupid with repeating midtextures.
- c601a409 - Merge branch 'texture-fixes' into 'next'
- 1c23a84a - set floorcenterz/ceilingcenterz for all of R_Subsector to use, not just FOF planes
- b66925e4 - R_FindPlane now has a polyobj argument, R_DrawPlanes now skips polyobj planes, l…
- ff0b1d1d - Split polyobj plane drawnode-creating code from ds->maskedtexturecol code, and a…
- 1bb53ce5 - Merge branch 'next' into plane-fixes
- f5f25428 - Go through all the polyobjects to find leftover polyobj planes to add to the draw nodes list
- cd0ec088 - Merge branch 'plane-fixes' into 'next'
- eb22f347 - Made Eggscalibur use mobj->watertop instead of mobj->spawnpoint->z because that's not netgame-safe.
- a4fe3580 - Forgot to commit this compiling fix.
- 45fdfd9f - Merge branch 'eggscalibur_fixes' into 'next'
- ad30c411 - Fix egg guard shields being endlessly killed by lasers. Simply make sure they ha…
- c93101aa - Merge branch 'eggshield-laser-fix' into 'next'
- 93901847 - Fix the Fixed Rounding functions
- 6d07c6ba - Merge branch 'fixedrounding-hotfix' into 'next'
- c1392cee - Merge branch 'master' into next
- be215887 - Merge branch 'master' into next
- a0d095e7 - Fix sector floordata/ceilingdata/lightingdata pointers not being NULL when they should be
- b768c4b9 - Sync sector tags and tag list variables properly
- 4d8ca41e - Fix player colors mysteriously turning red if a resynch occurs outside of CTF/Te…
- f2a58a74 - Stupid me
- 22020dda - Merge branch 'savegame-hotfixes' into 'next'
- d865877c - Merge branch 'next' into patch-1
- 456f5cf6 - Merge branch 'next' into patch-1
- 6ad64347 - Merge pull request #156 from frozenLake/patch-1
- c0fb3fce - Merge branch 'master' into next
- 691d3684 - if this is what caused resynching to randomly turn some people spectators then welp
- e59fb388 - Update version number
- 4ac70914 - Added LJSonic to credits, altered how my own name + nick is shown in credits
- ba3f001a - I dun goofed, THIS is why FuriousFox disappears like that
- 3169b538 - Hey! If you change this, add 1 to the MODVERSION below!
- 2903c07a - Merge branch 'last-few-changes-for-2.1.17' into 'next'
- 19cd0100 - Fixed a stupid bug involving jumping at spikes on FOFs in reverse gravity caused…
- e20461aa - Merge branch 'crushfix' into 'next'
- 0b572b6e - CMake: split inline AMS code from vid_copy.s code
- b1168b17 - Merge branch 'CMake-inline_ASM' into 'master'
- 5c295d57 - Codeblock: fixup sdl2 to sdl
- b32be1b9 - Codeblock: fixup sdl-config to sdl2-config
- 064650d9 - Codeblock: fixup SDL_mixer to SDL2_mixer
- a583225d - CB: disable compiling and linking IMG_xpm.c, it was updated for SDL2
- 8f8724fc - CB: added missing C/header files
- 0835c17d - CB: fixup Mingw target
- fc9a86f6 - Mingw: fixup unsigned/signed compare
- 1c16a4e6 - m_aatree: add newline
- fca398ae - Win32 Debugger: no need for Win32 interface code for SDL
- 97f87827 - hardware: init undef vars in HWR_SortVisSprites
- cdc9bf3a - Merge branch 'cb_update' into 'master'
- 0f526069 - Pass -DLINUX to n/yasm
- 5216da13 - Don't check if SRB2_ASM_FLAGS is defined and add docstring for the assembler
- e7a1c813 - Merge branch 'cmake_nasm' into 'master'
- 8298ed35 - DEBUGMODE -> _DEBUG =)
- e9cb6d03 - -Added a timeout for game state downloading to prevent definitive join freezes i…
- 005485cf - Fixed a warning
- 7cca60a0 - Merge branch 'master' into netcode-shit
- da06b941 - Merge branch 'netcode-shit' of https://github.com/LJSonik/SRB2 into netcode-shit
- 490778cd - Why does DD exist
- b8b72008 - Oh? a cookie on the ground
- 6611b016 - Merge branch 'master' into netcode-shit
- 4a4f0ea7 - Merge branch 'netcode-shit' of https://github.com/LJSonik/SRB2 into netcode-shit
- 0186b90b - Merge pull request #158 from LJSonik/netcode-shit
- 7be8c001 - appveyor: let see what version of GCC are here
- 038a9f19 - appveyor: let use GCC 4.9.3 from Mingw32
- df6d3de8 - appveyor: use mingw32-gcc as compiler
- ab322179 - appveyor: compile with GCC 4.9 warning flags
- f5ae094e - appveyor: fixup PATH
- d79804c1 - appveyor: call up Mingw GCC directly
- 1afe8325 - appveyor: let use CCACHE_PATH
- ad995629 - appveyor: revert MINGW_SDK
- e38329e9 - appveyor: reenable RDP
- ae4f6808 - appveyor: add both Mingw folders into the PATH
- ad328033 - appveyor: disable FTP upload and RDP
- d4f153d3 - Random changes in the netcode lol
- b347b818 - -Fixed broken net commands, thus fixing (or at least greatly improving) chat/com…
- 4373afcd - Cooked a cookie
- 478da436 - Cooked another cookie
- 04747ff7 - Fixed a memory leak on client side
- eb8f608f - Merge branch 'master' into netcode-shit
- 40c8328e - Merge pull request #151 (closed) from LJSonik/netcode-shit
- 8fb9a3b3 - Ignore modifier keys in chat
- d5803160 - Remove all traces of SSN's old port of ZDoom's secplanes for slopes, since our s…
- 5400707a - Merge branch 'remove-secplanes' into 'master'
- 5514cca4 - Merge branch 'master' into appveyor
- c2ddbed9 - appveyor: download GCC 4.8.1-4 and try to abuse it
- 8d1a2e34 - appveyor:fixup download of mingw gcc lzma
- b1c323d8 - appveyor: decompress twice
- 2ac5fef4 - appveyor: fixup 2nd extract and cache lzma
- fd29d77f - appveyor: copy files to C:\Mingw
- 4fe217f1 - appveyor: download GCC DLLs and debug issue
- 72135997 - appveyor: MINGW_BIN, not MINGW_EXE
- 5a55c4ea - appveyor: RDP debug is broken
- 6476cf3c - Merge branch 'appveyor' into 'master'
- c024d313 - Revert "Merge branch 'appveyor' into 'master'"
- 628d1c4d - DD: Mingw 3.4.5 build fix
- a29ced72 - Merge branch 'master' into next
- 3212ee0b - Fix endless loop of R_DrawRepeatMaskedColumn if both sprtopscreen and sprbotscre…
- 66a45c65 - Merge branch 'td-render-fix' into 'master'
- 72bd3e28 - Fix sprtopscreen from getting integer overflows once and for all in R_DrawRepeatMaskedColumn
- 823aa7d2 - Merge branch 'td-render-fix2' into 'master'
- dc249c6c - D_ModifierKeyResponder now checks for ev_console as a "key down" event
- 591fe13c - Merge branch 'dedicated-console-fix' into 'master'
- b0f4bbb4 - Played TD's Stormy Streets enough to know precipitation sprites didn't get an ov…
- 5019077f - Merge branch 'precip-overflow-fix' into 'master'
- 2823c7bf - build: fixup warnings from GCC 6.2.1
- b22417bc - appveyor: buildbot now using GCC 6.3, not 5.3
- e0b2a4a7 - build: add suport for GCC 6.3
- b01d5da6 - build: fixup GCC54 endif
- 42ecca81 - build: disable tautological-compare and logical-op
- 81fe4621 - build: do not overwrite the -Wno-error switchs
- 6bb7a636 - appveyor: output commands passed to GCCwq
- 9cac1e9e - build: fixup WFALGS/WFLAGS mistake
- 4e8972cd - build: no warning or error about logical-ip or tautological-compare
- 538eac7a - appveyor: disable command output
- b29193aa - CircleCI: first try
- 59d91e07 - build: r_bsp.c:213:23: warning: inlining failed in call to 'R_DoorClosed': call …
- c5d15ad5 - CircleCI: force -Wno-unsuffixed-float-constants
- ade354c2 - CircleCI: error on warnings
- aaaab40f - CircleCI: cache APT and ccache
- c85c277a - CircleCI: move GCC49 check to debian's env
- 99b2c888 - README: add CircleCI's Status badge
- ac75267e - CircleCI: build on Ubuntu as well
- 29c19b62 - CircleCi: Ubuntu docker image is broken
- 03ecb0d1 - CircleCI: add upx
- 52a79754 - CircleCI: keep build cache with checksum of depend.dep
- 2d68cb77 - Merge branch 'master' into next
- 5feccaad - Merge branch 'next' into touching_fixes
Toggle commit listNo worries! Oof, thanks for reminding me of this. SECTORSPECIALAFTERTHINK is turned off, so it's good to go in Next, methinks. I still need to dedicate some serious time to attempting to determine the best way to fix the "being lifted off the ground by a painslope but because your center isn't in that sector nothing happens to you" bug, but I don't know when I'll get around to doing that and it doesn't need to be in this branch.