Commit graph

52 commits

Author SHA1 Message Date
toasterbabe
71f5d4ea85 ...completely misunderstood the reasons we weren't merging toast_slopes, mom holy fuck i'm stupid and bad
Enjoy your slopes without physics, people :D
2016-06-20 00:20:20 +01:00
toasterbabe
86721f1457 Compilation fix of the patch to disable this feature ( :c ). 2016-06-19 17:29:04 +01:00
toasterbabe
3fe87eff97 Disabling the functionality of SL_NOPHYSICS for 2.1 patches by never applying it 2016-06-18 23:55:43 +01:00
toasterbabe
2c676eea43 P_ReverseQuantiseMomentumToSlope is now a function. (I was thinking about a macro, but couldn't get it down.)
Also, the teetering angle on slopes is now FRACUNIT/2 because there's literally no way to stand still on a slope that steep unless it doesn't have physics.
2016-06-12 19:27:34 +01:00
toasterbabe
661da15146 Reinforcing encapsulation I originally broke down to allow for P_GetMobjGravity.
When I first wrote this, I thought the .h file that contained a function declaration needed to have the same name as the .c file the function was in. Now I know that's not the case, off to p_local.h with you.
2016-06-09 18:16:13 +01:00
toasterbabe
ba528a075e Last few changes as reccomended by Red. (<3 u, no hetero) 2016-06-04 19:47:40 +01:00
toasterbabe
c1caf21323 Reccomended by MI: Dividing by the original friction value just so slopes with normal friction don't behave differently between next and this branch. 2016-06-02 16:51:12 +01:00
toasterbabe
882622d2e7 ...I made two major mistakes with P_GetMobjGravity.
*Didn't take into account object scale
*Doubled force when on the ground (ignore what the comment of the line I moved says, it was relevant for slopes...)

This also led to a mistake with slopes, where I was double-multiplying by the gravity constant to get half (because of a quirk of numbers...)
2016-06-02 16:42:07 +01:00
toasterbabe
213a9632ca Let's multiply the thrust by the mobj's friction. You should have less chance of purchase on a slippery slope (tee hee) and more on a rough one, but the slopes were basically identical during testing before I implemented this change. 2016-06-02 16:09:33 +01:00
toasterbabe
44a6e8bb54 I_Error description syntax consistency (buzzword buzzword buzzword). 2016-06-01 19:52:12 +01:00
toasterbabe
ae8b45965c No Size_t --> int
in an I_Error print!
[/rhyme]
2016-06-01 16:45:10 +01:00
toasterbabe
7071fbe29e I made a mistake. Fuck git reverts, they are a nightmare, let's just do this the old fashioned way. 2016-05-31 18:13:17 +01:00
toasterbabe
d4d44777f4 Okay, now vertex slopes aren't placement-order-dependent any more. Hopefully this is the best way to handle things. 2016-05-31 17:43:27 +01:00
toasterbabe
d998ddfae4 When you haven't found all the vertices, it's just not safe to carry on. Hit them with a descriptive I_Error so they don't get confused as hell like Glaber did. http://mb.srb2.org/showthread.php?t=41455 for reference.
Also took the opportunity to nuke or otherwise neuter a bunch of Kalaron's bizzare ramblings (most are questions which have long-been answered by Red's efforts) at the same time.
2016-05-31 17:07:28 +01:00
toasterbabe
da2abbb39f Failed a build because C is an obnoxious language. 2016-05-31 16:24:51 +01:00
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