Commit graph

37 commits

Author SHA1 Message Date
toasterbabe 6058eec1c9 Holy shit. I spent two hours staring at how garbage this code was and didn't even realise it was #ifdef'd out behind a define not even mentioned in doomdef.h. It's not actually used anywhere (superseded entirely by the much nicer, much more relevant P_NewVertexSlope()... out with you, ancient, foul demons who should've been SPRINGCLEANed long ago. 2016-05-31 16:14:21 +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
Alam Ed Arias 47ae39ea62 netplay: fix off by 1 2016-05-22 11:03:04 -04:00
Alam Ed Arias 57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn c8cdded81e Multiply downwards thrust on slopes by the actual "gravity" variable. Also account for mobj scale (it affects gravity added in P_CheckGravity, so it makes sense here). 2016-05-05 18:19:06 +01: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
RedEnchilada 6929b6fe4b Make internal slope functions static and remove from header 2016-01-03 10:33:45 -06: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
Alam Ed Arias c64e4d58b7 git warning: new blank line at EOF 2015-08-21 20:47:00 -04:00
RedEnchilada 50b5e978cc Support ceiling/backsector vertex slopes 2015-08-03 23:09:50 -05:00
RedEnchilada 1f5fc04d60 Add vertex slopes 2015-08-03 22:15:59 -05:00
RedEnchilada 14ea936f74 Sync mobj->standingslope in netgames 2015-08-03 18:06:42 -05:00
RedEnchilada 51284c01d8 Start using slope flags/id in creation process 2015-08-03 17:39:33 -05:00
RedEnchilada bddcf98355 Remap slope line specials to 7xx range: shim old values for now 2015-05-24 15:59:17 -05:00
RedEnchilada b121bcca68 Remove P_GetZAtf (it didn't seem to work right anyway) 2015-05-23 12:23:24 -05:00
RedEnchilada 89319b1c2a Dummy out m_vector and use m_fixed's functions instead
These functions were already here before, and I /swear/ the slope
physics became slightly less glitchy after switching to them...
Only issue is the slope plane mapping code hasn't been properly
converted yet, so they don't render properly for now.
2015-05-22 22:07:07 -05:00
RedEnchilada 0e94cc66ff 2-in-1! Fixed slide movement AND climbing when around slopes 2015-05-20 19:08:49 -05:00
RedEnchilada 7b0e98ef35 Change sliding physics and standing/rolling rules on slopes 2015-05-20 13:18:41 -05:00
RedEnchilada 8ba5b66853 Slight optimization (don't get seg ends for slopes if there are no slopes) 2015-05-16 23:55:49 -05:00
RedEnchilada 09f8dec7d1 Optimization/configuration option: No Tails on a slope line makes a slope non-dynamic 2015-05-16 00:04:19 -05:00
RedEnchilada 6fcdac494f Spawned things spawn relative to slope floor/ceiling heights now
This was a headache. :<
2015-05-16 00:02:01 -05:00
RedEnchilada 445e778309 Improvements to slope collision/landing/ejecting/fajitas 2015-05-15 12:35:54 -05:00
RedEnchilada a3358479f0 Improvements related to slope collision, and quantize momentum properly for landing 2015-05-13 16:15:32 -05:00
RedEnchilada 02d63aa011 Tweaks to slope physics + add accel rules for slopes
Your acceleration vector parallel to the slope is reduced based on slope
angle if it's going up the slope. The pull physics' momentum increase was
toned down a bit to go along with this. Also, I removed the ifdefs for
OLD_MOVEMENT_CODE because why should that be kept around?
2015-04-30 00:32:44 -05:00
RedEnchilada db883f6a23 Add a bunch of slope physics
I know giant commits all at once like this are a bad thing, but
too bad I worked without staging commits and now it's all here
at once :)
2015-04-29 00:35:54 -05:00
RedEnchilada de81d01fbc Fixes to slope generation (backfloor crash and wrong zdelta/zangle) 2015-04-29 00:30:39 -05:00
RedEnchilada 10ba850871 Fix dynamic slopes not working right in some cases 2015-04-27 14:07:04 -05:00
RedEnchilada 0c477c685d Removing unused cruft 2015-04-26 22:20:03 -05:00
RedEnchilada 6fa1448f59 More cleanup, and made dynamic sloping more efficient/fixed memory leak 2015-04-26 21:50:50 -05:00
RedEnchilada aeef23e816 MakeSlope_Line cleanup/fixed-point conversion 2015-04-26 13:06:23 -05:00
RedEnchilada 5070a964b9 Starting to clean up a bit of Kal's mess
I still don't know why Git reacts so strangely to the new files' line breaks...
2015-04-25 22:22:50 -05:00
RedEnchilada 7703eae0e8 Actually fix slope generation (also whitespace stuff) 2015-04-20 13:25:39 -05:00
RedEnchilada 12202d94a9 Fix calculation of slope extent, whoops 2015-04-20 12:18:56 -05:00
RedEnchilada 8d35c5064a Fix slope generation
Physics seem to work at least partially, but no rendering yet (not even in OGL)
2015-04-19 16:54:20 -05:00
Ronald Kinard 54f0d0c110 IN PROGRESS: porting eternity slopes from srb2cb 2014-11-18 18:45:57 -06:00