Commit graph

537 commits

Author SHA1 Message Date
Alam Ed Arias
3917b02132 Merge branch 'angles' into 'next'
Slopes and stuff

Adds support for slopes, slopes on FOFs, slopes on translucent FOFs, slopes on FOFs with holes in the flat, slope physics, dynamic slopes, vertex slopes, dynamic vertex slopes, and a ham sandwich to the game. Only for software mode right now, though. (OGL still gets the physics and the sandwich.) Some things still need to be done, but for now this can be merged in to be finished later.

Please make sure nothing in the vanilla game breaks before giving the thumbs up for this merge.

Since this doesn't merge automatically, if the code review turns out positive and nobody else has done it, I'll handle the merging.

See merge request !22
2015-09-03 15:57:01 -04:00
Alam Ed Arias
04c1a507ba Merge remote-tracking branch 'public/hotfix-hook_NetVars' into next 2015-09-03 13:54:12 -04:00
Yukita Mayako
52e2087ee7 Fixed NetVars hook mistakenly assuming index starts from 0. 2015-09-03 13:13:55 -04:00
Alam Ed Arias
f43a7e09eb Merge branch 'F-key-menu-hotfix' into 'next'
F key menu hotfix

Fixes the issues shown here: https://mb.srb2.org/showthread.php?t=40754

See merge request !23
2015-09-01 22:58:13 -04:00
Monster Iestyn
775ccde424 Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown 2015-09-01 22:56:45 -04:00
Monster Iestyn
0f038f9a3b Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown 2015-09-01 12:45:26 +01:00
RedEnchilada
9155fd6c14 Fix unexpected behavior with colormaps in sloped sectors
To be specific: when a sector had a sloped ceiling and a colormap was
placed above it, the colormap wouldn't fill anything above where the
ceiling height is at the sector's midpoint. This is fixed.
2015-08-24 22:09:19 -05: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
96c71c68c8 remove NEED_FIXED_VECTOR and fix angelchk testcase 2015-08-21 21:27:20 -04:00
Alam Ed Arias
c64e4d58b7 git warning: new blank line at EOF 2015-08-21 20:47:00 -04:00
Alam Ed Arias
f3d40c34a0 git warning: trailing whitespace 2015-08-21 20:46:41 -04:00
RedEnchilada
d5884a6957 Add Chee to credits
(she helped port important drawing code!)
2015-08-21 18:23:37 -05:00
Alam Ed Arias
14bb811d25 Merge branch 'fixing-two-gametypes-noone-cares-about' into 'next'
Tag and H&S fix

Do I need to explain again? Tag and Hide & Seek got each other's suicide behavior by mistake, which this branch fixes of course.

See merge request !21
2015-08-15 10:04:11 -04:00
Monster Iestyn
f8b439769a Fixed Tag and H&S getting each other's suicide behaviors by mistake. 2015-08-15 13:00:49 +01:00
Alam Ed Arias
79ecbc407e Merge branch 'pointtoangle-fix' into 'next'
Tweaks to R_PointToAngle and R_PointToAngle2

Exactly what it says in the title! See commit description for more information on what I did, since I'm too lazy to write it all up a second time. =P

Could someone check that these changes don't cause anything else in particular to go wrong in the game or source code? I haven't checked myself that much yet, mostly because I totally forgot about this thing until now, lol.

See merge request !19
2015-08-14 18:10:33 -04:00
Alam Ed Arias
8f8fbf0ccf Merge branch 'spring-fixes' into 'next'
Spring fixes

Remember how a while back I fixed things like being stuck under a spring after jumping from below? Or how you could touch multiple springs at the same time and subsequently cause a loud racket? I accidentally broke something else in the process it turns out! (this sounds familiar...)

Namely, diagonal springs can't send you to their centers anymore, because of several changes I made to player-spring collision towards the other issues. This branch fixes that particular issue, while making sure none of the old bugs were broken again. Took a lot of testing to make sure of this.

As a bonus, the P_DoSpring function returns a boolean now, which can be used by Lua for whatever: true = you touched spring; false = you didn't

See merge request !20
2015-08-14 18:09:44 -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
c7b6cd705f Separate P_LoadThings into two functions to make the next commit cleaner 2015-08-03 19:27:10 -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
049bbce5c0 Add data to slope struct that will be useful later 2015-08-03 17:37:50 -05:00
RedEnchilada
6026fa42eb Add masked FOF slopes (+other rendering tweaks) 2015-08-03 14:47:05 -05:00
Monster Iestyn
fa935be129 Fixed the issue where diagonal springs couldn't teleport you to their centers anymore (guess whose fault that was! =D ). Basically I just made P_DoSpring boolean, which probably could be useful to Lua peeps as well. (it returns true if you were sprung, false if not) 2015-07-28 19:28:51 +01:00
Monster Iestyn
6138845930 Removed all "-1"s from R_PointToAngle and R_PointToAngle2, in order to allow ALL basic compass directions at the least to be given the right angle by these functions.
Note: Before this change, North and West directions would be returned as ANGLE_90-1 and ANGLE_180-1. This caused the pusher polyobjects in THZ2 to slowly move sideways as a side-effect (and probably caused similar bugs in the past too, these functions have barely been touched in a decade it turns out.)
2015-06-21 16:58:34 +01:00
Alam Ed Arias
ac5c8f10e9 Merge remote-tracking branch 'public/lua-32bit-changes' into next
Conflicts:
	src/lua_mobjlib.c
2015-06-18 10:22:07 -04:00
Alam Ed Arias
c423547173 Merge branch 'super-sparks-scaling' into next 2015-06-18 10:18:09 -04:00
Wolfy
48d759123d Have super sparks scale with the player
Fixes https://mb.srb2.org/showthread.php?t=40279

Should work fine, but do keep in mind that this fix is untested.
2015-06-18 10:17:56 -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
904c3c227b Merge branch 'trigonometry-fix' into 'next'
finesine table

I pasted in finesine from #11 and made a merge request.

This has been lightly tested to ensure the renderer doesn't immediately break. No ill effects have been observed so far.

See merge request !17
2015-06-18 10:09:04 -04:00
Alam Ed Arias
b2e330d64c Merge branch 'idk-what-to-call-this-branch' into 'next'
A_SetObjectFlags tweak

Only reset the sector/blockmap links on an object calling A_SetObjectFlags if the MF_NOSECTOR|MF_NOBLOCKMAP flags change. Fixes a freeze related to LD442 demonstrated in MascaraSnake's example WAD at https://dl.dropboxusercontent.com/u/27962790/statetest.wad .

See merge request !11
2015-06-18 10:06:46 -04:00
Alam Ed Arias
f0054be951 whitespace fixup 2015-06-18 10:05:51 -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
Alam Ed Arias
f7747f43ba Merge branch 'misc-fixes-tomerge' into 'next'
Miscellanous fixes to merge

These are the commits from the "miscellanous-fixes" branch that are okay to merge in.

Bugs fixed include the following:
* CTF flags respawning incorrectly: they cannot z position themselves correctly, and they cannot flip themselves.
* The weird "jumping" spring/monitor effect: this is the result of an internal mobj_t pointer (tmfloorthing, specifically) not resetting itself to NULL for the next object's thinker, resulting in Z movement code thrusting the object vertically at tmfloorthing->momz.

See merge request !18
2015-06-18 09:51:59 -04:00
Alam Arias
9422ca4427 Merge pull request #44 from STJrInuyasha/patch-1
Make sure "word" in readlevelheader gets reset
2015-06-17 11:01:43 -04:00
STJrInuyasha
45515df790 Make sure "word" in readlevelheader gets reset
... because some things (Lua. custom header entries) move it.
https://mb.srb2.org/showthread.php?t=40580

(Technically breaks netgame compatibility for Lua-heavy mods, so in next.)
2015-06-13 15:56:28 -07:00
Yukita Mayako
0af32ee2fa Move garbage collection out of Lua hooks.
That's supposed to be run once a frame, not once per hook
per mobj per frame you moron. If you just run it seven
thousand times a frame, of course your framerate will drop.
2015-06-10 13:42:45 -04:00
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