Commit Graph

87 Commits

Author SHA1 Message Date
toasterbabe 1493537dfc Moved the standingslope check in P_ZMovement to after the FOF and height adjustment as it is in P_PlayerZMovement, as reccomended.
Doesn't actually stop Crawla jittering, but might as well make it happen for consistency's sake.
2016-06-02 14:39:41 +01:00
toasterbabe ad61050bb0 Whitespace removal. 2016-05-31 16:01:05 +01:00
toasterbabe fa002e58ad Did a bunch of things to/for slopes.
*The No Physics flag now works (Red, you might want to doublecheck this to see whether I haven't missed any eosteric stuff out). Going downhill is a little bumpy, and I'm not sure whether that's good or not. Someone help me out here?
*The SRB2CB typeshims are now behind #ifdef ESLOPE_TYPESHIM instead of #if 1 for easier disabling.
*Slopes' downhill thrusts are now scaled with regards to object gravity. This is actually untested in gravities other than normal and reverse normal but it's one line which can be easily reverted in that circumstance. I also checked with MI to make sure this is how it's calculated elsewhere, so fingers crossed this doesn't cause any edge cases.
*As a consequence of the above point, there's now a function in p_mobj.c/h that returns an object's internal gravity - seperated out from the logic of P_CheckGravity, which really didn't need to be so monolithic. Multiply by global gravity to get the thrust. This should probably be available to Lua somehow, but I have absolutely no idea where to start with that. Wolfs, maybe?

Non-comprehensive test file available at /toaster/slptst3.wad on the ftp.
2016-05-31 15:01:19 +01:00
Monster Iestyn 2c73e2a2cd Fix flung emeralds not disappearing in death pits
(assuming it wasn't an intentional behaviour thing of course)
2016-05-29 16:47:38 +01:00
Alam Ed Arias 57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Alam Ed Arias 7058baed44 Merge branch 'master' into next 2016-05-18 20:07:27 -04:00
Alam Ed Arias a4b0f89caf MSVC: fixedup SDL2 build 2016-05-18 20:01:50 -04:00
Inuyasha ab7af594d9 Merge branch 'nights-hotfix' into 'next'
NiGHTS hotfix

Fixes the following issues relating to playing as NiGHTS Super Sonic that apparently popped up between 2.1.14 and next (mostly due to the changes to SRB2's trig stuff it seems):
* Super Sonic drifts to the side at some angles around an axis, and is unable to go directly upwards or downwards as a result
* Drilling to the side when on the ground causes the drill sound to constantly restart
* CEZS's start not actually being lined up properly with the first axis means the player is not able to go backwards along the track (because the player is not actually aligned with the track properly, preventing you from touching the attached line transfer)
* trying to hug some walls such as the tall wall before the library section of CEZS allows Super Sonic to go through them

These fixes needs proper testing before this branch can be merged in, in case they accidentally break other things as a result or something.

See merge request !71
2016-05-18 07:09:05 -04:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn ea1cac8e24 Fix NiGHTS drill constantly starting if you're moving sideways on ground
Also disabled normal mobj friction from NiGHTS and tweaked bouncing code just in case?
2016-05-15 22:09:22 +01:00
Inuyasha a595f2369c fix infinite bounce rings 2016-05-12 13:52:41 -07:00
Monster Iestyn 8fd8f2c316 Disable "splats" command unless WALLSPLATS is enabled
apparently it was never used for what exists of floor splats' code, huh
2016-04-29 18:01:05 +01:00
Monster Iestyn ac3de70c93 Merge branch 'slope-fixes' into 'next'
Slope fixes

This branch fixes the following slope-related physics and rendering bugs:

* Rings in multiplayer stages respawning inside slopes (even despite being able to spawn ABOVE them on map load)
* Player starts spawning players inside slopes
* Elemental flame trails not appearing if a player spindashes UP a slope; see issue #21
* Dying players "jumping" off slopes to the side if they were previously standing on one
* Some issues with FOF slope rendering
* Various issues with sprites displaying through walls adjacent to slopes

Other features added:
* Objectplace now supports slopes (this is Inuyasha's doing)
* Automap in DEVMODE now supports slopes (my doing)

Just making this merge request now rather than later, ~~in case I decide not to make any more fixes for the time being~~ (this branch doesn't seem to want to die lol), and so we can get these merged in as soon as the code's all been checked over.

See merge request !50
2016-04-26 17:21:27 -04:00
Monster Iestyn c833f3845f Merge branch 'next' into bp_random2 2016-04-20 18:18:28 +01:00
Monster Iestyn e05951e213 Merge branch 'next' into slope-fixes 2016-04-20 18:17:14 +01:00
Inuyasha 3b4b7a05fd Better CTF in splitscreen, no death message for spectators 2016-04-06 19:55:58 -07:00
Monster Iestyn b1e736242f fixed all compiling errors relating to ESLOPE being undefined 2016-04-06 22:19:39 +01:00
Monster Iestyn 1df25050be Merge branch 'next' into bp_random2 2016-04-05 17:26:05 +01:00
Monster Iestyn 93a1e46f1c Merge branch 'next' into slope-fixes 2016-04-05 17:19:28 +01:00
Monster Iestyn 7a369a5650 Turns out boss thing types re-setting mthing->z is a left-over from 1.09.4 and older versions
Apparently bosses and players used to use options >> 5 instead of 4 for z heights, or so it seems
2016-04-05 12:39:53 +01:00
Inuyasha 1db51f5a23 doomed# 750 shouldn't ever spawn objects 2016-04-03 19:49:27 -07:00
Inuyasha ac03ce39c8 *_Random is now *_RandomByte.
P_RandomChance is now a macro for something that should happen a
certain percentage of time.

P_SignedRandom was moved to a macro. Nobody cared.

# Conflicts:
#	src/p_inter.c
2016-03-29 16:27:55 -07:00
Monster Iestyn 13f4ef2f34 Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into slope-fixes 2016-03-12 23:06:37 +00:00
Monster Iestyn accab7da6a Fixed precipitation not checking for slopes 2016-03-12 23:03:56 +00:00
Inuyasha 6aa708b5af I don't think we need the BLUE_SPHERES define anymore... 2016-03-09 00:49:35 -08:00
Inuyasha 694220155e Revert "MF2_PUSHED is now MFE_PUSHED, for the simple reason that it makes more sense as an eflags object flag than a flags2 object flag!"
This reverts commit c8c7878005.

# Conflicts:
#	src/dehacked.c
#	src/p_mobj.c
#	src/p_mobj.h
2016-03-08 21:30:12 -08:00
Alam Ed Arias 55a6355e15 Merge branch 'next' into slope-fixes 2016-03-07 16:45:51 -05:00
Inuyasha f10279d61b Very minor performance improvement. 2016-02-25 14:35:05 -08:00
Monster Iestyn 3802ec33de Fixed how dying players who were standing on slopes just jump off to the side 2016-02-23 22:53:24 +00:00
Monster Iestyn fa1bc5a09b Whoops forgot this for last commit 2016-02-15 20:55:57 +00:00
Monster Iestyn b5673ed101 Fix player spawning on slopes 2016-02-15 20:46:56 +00:00
Monster Iestyn ef6430c23e Fix respawning rings on slopes 2016-02-15 20:34:53 +00:00
Inuyasha 1bdd4cf641 backport state-animations from internal master to public next
most other code in the branch did not come along for the ride.
2016-02-09 02:39:16 -08:00
Monster Iestyn ccb0abb853 Diagonal ring springs should now be able to face any angle 2016-01-21 20:19:43 +00:00
Monster Iestyn 529f5af614 Removed a few old OpenGL-specific hacks that compensated for lack of dispoffset
(I won't touch overlays for now)
2016-01-13 22:50:16 -08:00
Monster Iestyn 8cad9a6dc8 We can compile the slopes code now, yay! My brain hurts.
Compiling errors fixed in this commit:
* Various cases of mixed declaration and statement code
* Implicit declaration of slope functions (read: you forgot to put "include "p_slopes.h" in MORE than a few places)
* an odd case of a bad fixed_t to float typecase, cause by using P_GetZAt directly inside FIXED_TO_FLOAT
* a few minor cases of bad unsigned-signed comparisons
* no prototypes for some of the new slope functions. For goodness sake Red, this is basic stuff!
2016-01-03 10:30:36 -06:00
Yukita Mayako 2fb03a7cff Merge branch 'next' of git@git.magicalgirl.moe:STJr/SRB2.git into angles
Conflicts:
	src/p_map.c - Automatically resolved by mergetool
2015-08-22 09:52:11 -04:00
Alam Ed Arias c4ac9643ad Merge branch 'goop-dampen' into 'next'
Goo Water (THZ Goop) adjustements

At Nev3r's request:
Adjusted goop so that you spend less time bouncing around in it. The goop will become a walkable surface with a higher velocity threshold.

The actual goop physics haven't been altered as far as the initial entrance and underwater time is concerned, only leaving goop and subsequent bounces has been dampened significantly.

See merge request !7
2015-06-18 10:11:27 -04:00
Alam Ed Arias a03fc205b4 Merge branch 'hotfix-pltz' into 'next'
Re-add/fix broken platform momz mobj code.

The changes in this branch re-add the platform's momentum to players and mobjs which leave the platform (eg. by jumping) so that they move with relative velocity as expected. This behavior was unintentionally broken in SRB2 2.0, which adds a lot of artificial difficulty to certain segments of the levels, where you have to jump between high velocity moving platforms which seemingly cut your jump height to nothing.

Not only has the behavior been fixed, but it has now been enhanced to move the camera while free-falling between platforms as well, completing the illusion of full relative velocity with minimal hiccups. [Observe.](http://i.imgur.com/zmSfUyp.gifv)

See merge request !14
2015-06-18 10:04:54 -04:00
Yukita Mayako fc649ce195 Merge branch 'next' of git@git.magicalgirl.moe:STJr/SRB2.git into hotfix-pltz
Conflicts:
	src/dehacked.c
	src/p_mobj.h
2015-06-09 07:38:21 -04:00
Monster Iestyn b88600dac6 tmfloorthing and tmhitthing are set to NULL at the start of P_MobjThinker, preventing any weird cases of carrying over the previous mobj's floor object or such.
This fixes the issue with upside-down springs shooting downwards if you touch another of its kind. Also fixes one of the issues with monitors in Icicle Falls (after you phase inside the East-most float-bob FOF's monitor via the other bug and jump up to break it while there, the NEXT monitor moves upwards too)
2015-05-31 13:57:27 +01:00
Yukita Mayako c16516ef0d Partial revert.
This partially reverts commit a1c67e7e67.
2015-05-29 17:22:31 -04:00
Yukita Mayako a1c67e7e67 Add MFE_APPLYPMOMZ to fix camera movement.
Here's how it works: When a player walks off the
moving platform, it applies their pmomz once, and
then _keeps pmomz set_ so that the camera still
adds pmomz to its movements until they hit another
floor. This way, the camera doesn't jerk around.
2015-05-29 13:53:06 -04:00
Monster Iestyn c6ade27b6a Fixes to CTF flag respawning, particularly reverse gravity and z-positioning. 2015-05-29 14:59:13 +01:00
Yukita Mayako 213a0caa23 Hotfix amendment
Also gain velocity from walking off an "up" elevator normally?

This _looks_ incorrect because the camera stops matching
the platform movement the moment you step off, but I
assure you it is a correct and accurate movement.
(Try it with chasecam off.)
2015-05-29 05:47:01 -04:00
Yukita Mayako 3bc56a91b2 Hotfix for platform movement being dropped on players.
Now players will apply platform movement when jumping,
but only if the platform is moving the same direction
as their jump is, and all other objects will have an
appropriate pmomz in reverse gravity FOF situations.
2015-05-29 04:34:53 -04:00
RedEnchilada e00d682185 Fix issue with objects getting stuck IN floors 2015-05-25 13:25:23 -05:00
RedEnchilada 5e18db79e9 Fix mobjs sometimes clipping through floors (whoops!) 2015-05-25 12:16:19 -05:00
RedEnchilada a9d49cd9fa Make all specials reliant on floor touch work right with sloeps
(I might've missed some, though)
2015-05-24 12:53:30 -05:00
RedEnchilada a9dba0ffd1 Condense GetFloor/CeilingZ into fewer functions, and use macros for the rest 2015-05-24 11:27:52 -05:00