Commit graph

550 commits

Author SHA1 Message Date
Yukita Mayako
c139e93fe6 Applied new finesine table.
finesine[0] == 0 now. This naturally fixes a bunch of math fudging.
No ill effects have been observed so far.
2015-06-10 12:07:08 -04:00
Yukita Mayako
06b82d172b lua_pushfstring only allows %d not %x
Stupid JTE.
2015-06-10 11:06:56 -04:00
Yukita Mayako
6ac5013802 Only push userdata to the stack when needed!!
Dummy, what do you think you're doing? If you
just push mobjs and players into Lua all willy-
nilly everywhere, you'll wind up generating
tons of metatables and stuff you arne't even
gonna use!

Oh. Thanks me, I'm really smart.
2015-06-10 08:06:16 -04:00
Yukita Mayako
120c9c5ad5 Change int32_t to __int32 on MSC.
I can't just say screw it and include the full
doomtype.h here (windows.h conflict?) so a
small hack here will have to do. :I
2015-06-10 07:41:44 -04:00
Yukita Mayako
ecdf3412c0 Rewrote the entirety of lua_hooklib.c
This _should_ solve some significant performance
issues Lua experiences. If not, I will be very
upset for having wasted so much time and effort.

There will be bugs, this kind of thing needs to
be thuroughly tested and this is just the first
iteration of it.
2015-06-10 07:28:09 -04:00
Yukita Mayako
36cf4c1bd2 Fix comma error. 2015-06-09 19:53:35 -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
Yukita Mayako
9a9025b1ee Remove pmomz from players who are on ground.
Assume that every frame the player is on the ground, their pmomz will
be re-set properly if the floor is moving, therefore if the platform
STOPS, we need this to set it to 0.
2015-06-09 06:59:34 -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
d9d3752b4e Unbreak FOF specials 2015-05-25 11:46:09 -05:00
RedEnchilada
32759312a1 Shut up the Kalaron 2015-05-24 18:22:56 -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
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
RedEnchilada
e0d97e4b1a Slope planes should now not turn into static in 99% of cases 2015-05-23 16:27:15 -05:00
RedEnchilada
109d379980 Fix conveyor slopes eventually turning to static 2015-05-23 15:44:53 -05:00
RedEnchilada
b121bcca68 Remove P_GetZAtf (it didn't seem to work right anyway) 2015-05-23 12:23:24 -05:00
RedEnchilada
485f671f23 Sloped planes now respect flat offsets 2015-05-23 02:18:32 -05:00
RedEnchilada
a5d7356fd2 Sayonara, m_vector.c 2015-05-23 01:32:28 -05:00
RedEnchilada
3629a2141b Slope planes work again. I hacked an alignment fix in too. 2015-05-23 01:19:38 -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
3f8e7b1739 Revert/remove unused/broken junk from original slopes port
m_vector removal to come later. The little thing commented out in it
is so I could revert the weird tables.c change.
2015-05-22 20:57:58 -05:00
RedEnchilada
8c54ee44e7 Slopey physics for some things that aren't players
This is incredibly messy and probably needs redone differently at
some point, but... fuck it.
2015-05-22 12:33:12 -05:00
JTE
f783df718c Reset tmthing after P_CheckSector calls from Lua
tmthing must not be set outside of P_MapStart and P_MapEnd
or the game will fail a sanity check which ensures that
mobj references are not persistent across frames and crash.
2015-05-22 01:51:40 -04:00
JTE
c91cd3860b Revert "Wrapped Lua MapLoad hook in P_MapStart / P_MapEnd."
This reverts commit 6ee50e803b.
2015-05-22 01:46:59 -04:00
RedEnchilada
fb9d07b8ba Bugfixes to sloped FOF plane clipping 2015-05-21 22:13:51 -05:00
JTE
6ee50e803b Wrapped Lua MapLoad hook in P_MapStart / P_MapEnd.
This fixes a crash if a script tries to use a MapLoad hook
to immediately edit the map in some way the moment it
finishes loading.
2015-05-21 19:55:22 -04:00
JTE
dfa8ac7ccb Added sidedef texture and offset manipulation to Lua. 2015-05-21 19:05:17 -04:00
RedEnchilada
0d9f8028b7 Players now bounce off of slopes on bouncy FOFs 2015-05-21 15:49:49 -05:00
RedEnchilada
f23f5d4379 Fix flat slopes eating jumps 2015-05-21 15:49:26 -05:00
RedEnchilada
e24595ed52 Make the crumble check account for slopes for... some reason 2015-05-21 10:17:53 -05:00
RedEnchilada
3d2b71b24c Make cameras properly collide with slopes 2015-05-21 09:36:20 -05:00
JTE
ef0e61fc33 Change LUA_NUMBER to fixed_t, change angle_t handling in Lua.
Angles now go from 0 to 0xFFFF (360 degrees == FRACUNIT) instead
of using a full UINT32. Lua only has one number type, so signedness
gets in the way of using angle_t directly. This handling of angles
matches up with how ZDoom ACS scripting and the like does it.

I also changed all the integer casts and pushes of fixed_t to
their own macro in preperation for possible future seperation.
2015-05-20 23:54:04 -04:00
RedEnchilada
7a3c5b3dd9 Scenery objects (notably, bubbles) now use slope when finding water surfaces 2015-05-20 19:21:44 -05:00
RedEnchilada
0e94cc66ff 2-in-1! Fixed slide movement AND climbing when around slopes 2015-05-20 19:08:49 -05:00
JTE
9d36cf37bd Removed EvalMath from base Lua.
EvalMath is for SOC only.
It spawns an entirely seperate instance of Lua and requires
uppercase-only strings, and it's ability to parse strings to
enums is redundant to Lua's _G table (try using
_G["MT_BLUECRAWLA"] for instance)
2015-05-20 18:44:03 -04:00
JTE
1e62be15ce ALL7EMERALDS is a boolean you idiot, not an integer. 2015-05-20 17:29:32 -04:00
RedEnchilada
7b0e98ef35 Change sliding physics and standing/rolling rules on slopes 2015-05-20 13:18:41 -05:00
RedEnchilada
1376f399d3 Sprite lighting obeys the slope overlords now 2015-05-18 00:23:44 -05:00
RedEnchilada
e7bc004bbf Sloped lights n shit 2015-05-17 23:51:38 -05:00
RedEnchilada
e83844796e Proper sorting fix for sloped FOFs and sprites 2015-05-17 21:49:13 -05:00
RedEnchilada
41573b118c I'm a dumbass 2015-05-17 12:36:06 -05:00
RedEnchilada
0af3852273 Add translucent slope renderer 2015-05-17 12:24:20 -05:00