Commit Graph

143 Commits

Author SHA1 Message Date
toasterbabe c2aba46298 New S_SKIN attributes.
* radius - sets the player's radius for that skin.
* height - sets the player's normal height for that skin.
* spinheight - sets the player's spinheight for that skin.
* shieldscale - see http://i.imgur.com/BQ5DhKC.png for justification
2016-07-13 15:15:45 +01:00
toasterbabe 7c63a96bf1 Logic error. Now works as described previously. 2016-07-10 20:03:08 +01:00
toasterbabe 8431f64300 A thorough reimplementation of Nojumpspin for the SPR2_ age.
* SF_NOJUMPSPIN - Player's height is full whilst jumping, SPR2_JUMP defaults to SPR2_SPNG instead of SPR2_SPIN, and the player goes into fall frames if they start moving downwards or use their ability.
* PA_JUMP - for jumping (upwards in the case of SF_NOJUMPSPIN.
* SF_NOJUMPDAMAGE - Ala rosy.wad, don't damage enemies, etc when jumping into them.
* SF_STOMPDAMAGE - Just for fun. Ala in Mario, always damage enemies when you land on top of them (your gravity reference, not theirs).
* SF_MARIODAMAGE - SF_NOJUMPDAMAGE|SF_STOMPDAMAGE is reasonably accurate to the Mario games, and might as well be surfaced as such.

Also, a minor change:

* Instead of not spawning the revitem if your SPR2_ is SPR2_DASH, don't spawn it if it's set to 0. This requires the player.dta I uploaded a couple days ago to behave as it was previously.
* Don't get stuck in spindash frames if your maxdash is 0, and don't flash rolling frames if you're on goop.
2016-07-10 18:41:38 +01:00
Alam Ed Arias e5a14d859e Merge branch 'public_next' into private 2016-05-27 11:37:09 -04:00
Monster Iestyn 8ceba95bfa Fix slope collision detection for the camera
See http://mb.srb2.org/showthread.php?t=41494
2016-05-25 21:10:46 +01:00
Alam Ed Arias 032313260a Merge branch 'public_next' into master 2016-05-20 17:58:57 -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 e3dac00aa9 If player is at wrong distance from axis, correct x/y position in a similar fashion to how momentum is set for homing attacks. Don't use trig here for most cases since that just re-introduces the side drift issue and friends all over again.
This fixes the CEZS issue where the player start is not actually on the track, preventing the player from going backwards until they hit a wall.
2016-05-16 19:00:34 +01:00
Monster Iestyn 89ce257248 Fix all the NiGHTS issues in one fell swoop (assuming they are fixed, that is, lol)
Basically I kind of worked around any potential trig inaccuracies by not using the player position directly for setting momx/momy. This way, if player->angle_pos == player->old_angle_pos, momx/momy are zero
2016-05-14 23:57:56 +01:00
Monster Iestyn 947e8c56ec Removed redundant momx/momy assignment from NiGHTS movement code.
Specifically, the being-hit code, where P_NightsTransferPoints is called afterwards anyway
2016-05-14 22:52:12 +01:00
Alam Ed Arias 398dbed4ed Merge branch 'public_next' into master 2016-05-07 11:35:05 -04:00
Inuyasha 987f65fde8 Merge branch 'demo-replay-fixes' into 'next'
Demo replay fixes

Changes made/bugs fixed in this branch:
* Replay camera is now controllable when climbing (https://mb.srb2.org/showthread.php?t=38668), and in waterslides
* localangle (read: the angle between you and the camera, I think) now doesn't change during demo replays in most situations, unless the player is in analog mode. Exceptions include zoomtubes and NiGHTS super
* Replay camera now doesn't act silly if the player is in analog mode (assuming you also recorded it in that mode to begin with, anyway)

See merge request !66
2016-05-07 06:17:39 -04:00
Nipples the Enchilada fe20a35aee Disable camera rotate buttons if you aren't viewing yourself
They don't affect what you're viewing anyway and cause cam_rotate to get
messed up.
2016-05-07 04:51:54 -04:00
Monster Iestyn 01debc27a2 Merge branch 'public_next' 2016-05-06 18:06:18 +01:00
Monster Iestyn 300275534f Merge branch 'next' into demo-replay-fixes 2016-05-03 15:10:30 +01:00
wolfy852 969a254cb6 Remove the super float from non-Sonic characters
Should fix conflicts with Lua-scripted jump spin abilities.
2016-04-30 14:59:51 -05:00
Alam Ed Arias fbd9cb73c3 Merge branch 'public_next' into private 2016-04-27 16:54:37 -04: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
Inuyasha b288d8a399 Merge branch 'bp_random2' into 'next'
xorshift* PRNG

This needs testing to ensure I didn't mess anything up switching function names around.

Our PRNG sucks. This is probably obvious. I wish I had known better at the time I implemented it, but oh well.

The replacement is an xorshift* PRNG variant with period 2^32 - 1 (meaning that the PRNG state will loop after four billion calls ... that's not likely to happen), versus the old PRNG's period of about 2^22 (?). The output is also much more random and less predictable; the old PRNG would fall into a predictable loop of output after about 4000 numbers were generated, which isn't much.

The PRNG here also outputs numbers as fixed point from [0,1) (that's 0 to FRACUNIT-1, in other words) instead of single bytes at a time. This makes it much easier to calculate things for, say, P_RandomRange and P_RandomKey. A new macro, P_RandomChance(p), is now in use that returns true _p_ percent of the time, where _p_ is a fixed_t probability from 0 (0%) to FRACUNIT (100%).

This doesn't affect netgames at all; the code for seed saving and restoring is identical (aside from a check to prevent seed being set to 0, which breaks xorshift PRNGs). Demos break, but A: _duh_ and B: they're already broken by all the changes to physics to accommodate slopes.

P_Random is deprecated in Lua, as the function was renamed to P_RandomByte. Aside from that, nothing special.

See merge request !64
2016-04-24 18:03:13 -04:00
Monster Iestyn b8cc36dfd1 P_LookForEnemies should not change the player's angle until the target has been decided
This fixes a quirk with Shadow with chaos control sometimes throwing the player in the wrong direction
2016-04-22 22:28:00 +01: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
Monster Iestyn 60ec0ff294 Merge branch 'next' into demo-replay-fixes 2016-04-20 18:15:36 +01:00
Inuyasha 3b4b7a05fd Better CTF in splitscreen, no death message for spectators 2016-04-06 19:55:58 -07:00
Inuyasha 3117a6a16e Splitscreen fixes
initialize flipcam2
player 2 gets game over music now.
restore the other player's music when the dead player is done sulking about their game over
2016-04-06 18:28:43 -07:00
Monster Iestyn 29f0301540 Whoops 2016-04-05 21:21:45 +01:00
Monster Iestyn e8a4d7b7b8 Fix replay camera not being turnable when climbing, sliding ...and several other things.
If in analog mode, this does not apply (also analog mode replay camera no longer borks)
2016-04-05 20:56:48 +01:00
Inuyasha 50d3fe15b8 Merge branch 'public_next' of http://git.magicalgirl.moe/STJr/SRB2Internal
# Conflicts:
#	src/d_main.c
#	src/doomdef.h
2016-03-31 21:17:29 -07:00
Alam Ed Arias 1c16943be8 Merge branch 'next' into bp_random2 2016-03-31 21:44:03 -04:00
Alam Ed Arias b45b9801d6 Merge branch 'next' into slope-fixes 2016-03-31 21:43:51 -04:00
Inuyasha 816990a3ed Merge branch 'polyobj-teeter-fix' into 'next'
Fix for teetering on PolyObjects

So... somebody goofed and didn't realise PolyObject sectors could be added to the sector node list for each object (which is referenced by mobj->touching_sectorlist), via their linedefs if they are nearby the player (yes, PolyObject linedefs are special and get to move about the level). As it turns out, this allows even INTANGIBLE PolyObjects to make you teeter in a seemingly inexplicable way.

What is happening is that PolyObject sectors, when they are added to the mentioned lists, are then checked under normal sector teetering conditions - if the player is above the floorheight by 24 FUs, you're officially teetering unless stated otherwise. The actual PolyObject teetering code can't help you here if the conditions are right, especially if they're taller than 24 FU in height.

There are a number of things wrong with the teetering code in general that I'd like to sort eventually, but at least now teetering on PolyObjects is fixed at last ...right? Please check the branch out if you can to check this, obviously.

See merge request !54
2016-03-31 20:55:28 -04:00
Alam Ed Arias 6b9fd60f06 Merge branch 'next' into camera-fix 2016-03-31 12:28:31 -04:00
Alam Ed Arias 47bb95f5f5 Merge branch 'next' into polyobj-teeter-fix 2016-03-31 12:26:52 -04:00
Alam Ed Arias 32a950893e Merge branch 'next' into slope-fixes 2016-03-31 12:17:40 -04:00
Alam Ed Arias d77e541f29 Merge branch 'next' into bp_random2 2016-03-31 12:15:09 -04:00
Inuyasha 3812b6bc20 the abs() is necessary; force unsigned shift and signed result 2016-03-31 06:48:08 -07:00
Alam Ed Arias 283c64ee20 Merge branch 'next' into camera-fix 2016-03-30 20:49:44 -04:00
Alam Ed Arias d26c486c6d Merge branch 'next' into polyobj-teeter-fix 2016-03-30 20:42:33 -04:00
Alam Ed Arias 4370459166 Merge branch 'next' into slope-fixes 2016-03-30 20:41:33 -04:00
Alam Ed Arias a935ac21e8 Merge branch 'next' into bp_random2 2016-03-30 20:40:48 -04:00
Alam Ed Arias 75f65c4d44 using abs() on unsigned have no effect 2016-03-30 20:17:09 -04:00
Alam Ed Arias 51aa7692d8 Merge branch 'master' into next 2016-03-30 20:15:08 -04:00
Alam Ed Arias b169529dfd switich to do the angle math in signed, then run it thur abs() 2016-03-30 11:47:27 -04:00
Alam Ed Arias 0fe6ee5339 cleanup abs warnings 2016-03-30 00:22:12 -04: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
Alam Ed Arias 42aa41c552 Merge branch 'next' into polyobj-teeter-fix 2016-03-25 18:44:30 -04: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 5b89164cf7 Fix camera going nuts around intangible polyobjects 2016-03-10 20:50:54 +00:00
Inuyasha 317161221d Merge branch 'public_next' of http://git.magicalgirl.moe/STJr/SRB2Internal 2016-03-09 01:23:48 -08:00