Commit Graph

501 Commits

Author SHA1 Message Date
toaster 7564aa466e * FREE PLAY! The necessary corollary to HERE COMES A NEW CHALLENGER...
* Activates when there are less than two non-spectators in a netgame.
	* Shows flashing text at the bottom of the screen.
	* Prevents drawing several UI elements that only make sense with multiple players.
	* Prevents matchesplayed being increased.
* Improve the mapreset timer's behaviour.
	* Now you get to see the HERE COMES A NEW CHALLENGER screen as the starting frame of the relevant map transition, since it happens on mapreset being 1 rather than 0.
	* Make a bunch of normal gameplay stuff that might've activated unnecessarily during mapreset now not able to.
	* Hide some other stuff that might've been visible for no good reason.
* Improve Mirror mode.
	* First person now works with it!
	* Tweaked the minimap player heads. Although the main section of the automap is mirrored, it feels... wrong to mirror the player head? IDK, you may wish to revert this, but given that everything else is the right way around except for the level itself...* Disable the titlescreen demos, at least until we actually gear up for release and make real ones.
* Disable the titlescreen demos, at least until we actually gear up for release and make real ones.
2018-07-22 16:16:03 +01:00
TehRealSalt cac613f3ef Merge branch 'sonicitems' into bumpstuff 2018-07-22 00:32:11 -04:00
TehRealSalt 77165631c4 HERE COMES A NEW CHALLENGER 2018-07-22 00:31:02 -04:00
TehRealSalt 87cc2c28ce Merge branch 'sonicitems' of https://git.magicalgirl.moe/KartKrew/Kart into sonicitems 2018-07-21 17:45:25 -04:00
toaster b818c8a2cf * Make cancelling a join work on the pause menu and console. (You need to write "changeteam spectator" to cancel a PF_WANTSTOJOIN.)
* Stop respawning spectators when their PF_WANTSTOJOIN request hasn't been processed yet.
* Handle PF_WANTSTOJOIN requests in GS_WAITINGPLAYERS.
* Refactor K_CheckSpectateStatus, and make it so PF_WANTSTOJOIN requests are processed if there's only one player in the server, even if they're on lap 2 or up.
* Make the player entry mechanism in P_SpawnPlayer use the PF_WANTSTOJOIN mechanism so that it can also take advantage of the level refresh mechanism with no extra code.
	* NOTE: This does a bad hack in order to not send multiple mapchanges while the joining timer is low! If you can think of a better way to do this, please let me know/commit it.
* Change the timer until you can hit ITEM again when a spectator who has to wait to join shorter.
* (controversial, but I think necessary) - flash the ITEM text when the above-mentioned timer is nonzero.
2018-07-21 16:45:08 +01:00
TehRealSalt 75f339f6c1 Spectator flashing tweak 2018-07-20 23:01:08 -04:00
TehRealSalt a63b172351 Merge branch 'sonicitems' into bumpstuff 2018-07-20 19:13:04 -04:00
TehRealSalt 6eaed1ac7b Spectator overhaul
- New player flag, PF_WANTSTOJOIN, added for setting up a spectator queue. You are allowed to join as long as no one has started lap 2.
- Map resets when two people have entered the game, so matches can start naturally without the need of an admin.
2018-07-20 19:11:36 -04:00
TehRealSalt 584082882c More tweaking
- Getting wipeout bumped into offroad slows you down
- Orbinaut & Jawz are relative to your weight (Jawz is heavier), via new function K_GetMobjWeight
- Reorangized where K_KartBouncing is called so that wipeout changes don't affect Eggman Items
2018-07-20 16:13:02 -04:00
TehRealSalt d25cb1aa56 Wipeout bumps
- You can bump other people during spinout.
- Bumping during spinout activates a "slow down" timer, which increases your friction after a few tics.
- You have a Smash-style dust effect after a spinout bump, indicating clearly if you'll slow down or not.
2018-07-19 22:37:32 -04:00
TehRealSalt 5e51c9b847 Enhance toaster's awesome intermission work a bit further
- Further divide the 2 screens' functionality; the first screen is purely for match results, the second screen is purely for rank results. (only time/score is on the first page, only rank and rank increase is on the second page, instead of time/score and rank increase being on the first page, then rank increase carries over to the rank page...)
- The page switch now happens at exactly the halfway point of the intermission timer
- It now uses a cool picture of the view buffer, like SRB2 SP, except faded, instead of the previous intermission tile.
- Fixed an issue with the previous commit.
2018-07-19 00:07:13 -04:00
TehRealSalt b231421c80 I'll one-up your request, toaster
Just make P_EndingMusic not do anything for non-local players, since P_RestoreMusic wouldn't either.
2018-07-18 22:01:52 -04:00
toaster 7e0d5a479c Fix the egregrious bugs from our last testing netgame.
* Made Got_Teamchange's level-based stuff only happen in GS_LEVEL.
* If, by chance, DoTimeOver gets called on a player without an object, it won't crash either.
* Make ending music play when you get time overed.
* Make changing-to-spectators get removed from the intermission drawer.
2018-07-19 01:27:36 +01:00
toaster a036e9cdc8 A bunch of little things.
* Fix both cv_timelimit and cv_pointlimit as "hidden options" for people to play with if they know about them via the console.
* Show GAME SPEED on the tab screen.
* Fix Invincibility and Grow's music changes being broken. (I didn't test them properly when making them P_RestoreMusic calls, sorry.)
* Stop showing the First Person Kart view in spectator mode, per Sal's request.
2018-07-18 21:40:04 +01:00
toaster 2b7298e959 *A biggie: two-tier intermission screen!
* Have the entire thing slide the fuck away a short while into the intermission.
	* The tab screen is modified to work off similar behaviour and presentation.
* To go with it, a revamp of how Battle's scoring is handled.
	* It's now considered "hits", and is stored in a reuse in one of the vanilla NiGHTS variables, allowing it to use exactly the same ranking mechanisms as race.
	* No more resetting of score between battle rounds.
* Minor, unrelated general code cleanup in places.
* Disable the YEEEAH in splitscreen, otherwise you'll hear it *all the time*.
2018-07-18 20:23:46 +01:00
toaster 69b6845029 * A bunch of intermission related stuff!
* Time overs now supported, see below.
	* Ties now supported!
	* Code cleaned up.
	* Play more sonicy tally sounds when counting your points.
* A bunch of time over related stuff!
	* Exitlevel time overs everyone, which means no points for you.
	* F-Zero-sorta-maybe style death if you're the last person on the course (and not the ONLY one) when someone crosses the finish line! (Or switches to spectator.)
* A bunch of music related stuff!
	* Functionally reverted many of my changes to splitscreen and ending music, although the major changes to simplify music code are still kept.
	* P_EndingMusic is genericised across gametypes, and only switches a single letter (and looping-ness) now!
	* Fix exitlevel in race causing whatever you're listening to to keep playing.
	* Make powerups call P_RestoreMusic.
	* Put a call to P_EndingMusic into P_RestoreMusic.
* Unrelated crap.
	* Make all palette swaps happen at the black point of fades, so they don't stick around awkwardly.
	* Huh, I thought I did more than that. Oh well!
2018-07-18 01:21:36 +01:00
toaster 1d88cdf40d Mammoth commit!
* Deaths in record attack no longer put you into a glitchy singleplayer game-over state that we somehow both kept around and also broke since we branched Kart off of Vanilla..
* Fix non-standard mapscales making the Death Egg respawn octagons dissasemble themselves.
* Allow for MULTIPLE TIME EMBLEMS PER MAP, at least in the emblem UI on the timer. It shows all completed emblems plus the uncompleted emblem up to a total of three.
* Major tweaks to the First Person HUD.
	* I know this was your baby, Sal, and some of the changes may prove controversial - so I've put the ones that are likely to cause the most fuss inside an ifndef block, so that you can toggle it as you please with minimal code changes.
	* Dontdraw-ness, transparency, and colorization match the player's object!
	* Moves around on the screen with respect to the direction of the player object's motion, to make drifting look nicer!
	* Flashes the colour of your drift sparks.
* Did a WHOLE bunch of things with respect to music. I'm not sure how to describe this, so I'll go through step-by-step.
	* Countdowns now play the drowning music again.
	* Removed/disabled extraenous P_RestoreMusics.
	* Made map-ending music called by its own function, P_EndingMusic(player_t *player).
	* Made the ending music play on the LAST player crossing the finishing line in splitscreen, rather than first.
* Make dead players spinout and clip through the floor, at least until we add the new death anims.
* Fix prior pogo spring usage making dead players fall faster.
* Make the time over countdown use the kart font when not splitscreen with 3 or 4 players.
* Removed a weird bonus HWR_DrawCroppedPatch function signature in the hardware header.
2018-07-16 20:19:30 +01:00
TehRealSalt 4032a14581 Change how battle music/patch is decided 2018-07-12 19:04:37 -04:00
TehRealSalt fbcf566874 WANTED recalculates on hit, tons of spectator changes 2018-07-03 21:12:25 -04:00
SeventhSentinel 80c2b56927 Changed all instances of "balloon" to "bumper"
Also changed "It's you!" to "Select character & color..."
2018-07-03 15:14:47 -04:00
TehRealSalt 6698bb5772 Battle finish music, fixed double-wanted bug 2018-07-02 17:57:22 -04:00
TehRealSalt 5c7b66cc0f WANTED 2018-07-01 04:36:09 -04:00
TehRealSalt 4a9c3618c3 Reverted scoring back to what it was before, change order-of-operations to allow switcheroos from bombs. 2018-06-30 23:35:38 -04:00
toaster cf6f85a72a Don't look at this commit too closely until after netgame, I want to surprise yalls!!
* Lots of menu changes!
	* Little arrows next to changeable cvars!
	* Show default value for sliders!
	* Pretty pretty pretty.
	* I don't know how to describe some of these changes.
* Effectively nuke MIDI music support!
* Skiddown at the start of a race is more interesting!
* Spinning in waterslides!
* Tiny bugfix in voting, plus a little celebration...
2018-06-30 23:18:13 +01:00
SeventhSentinel 25cd3cc093 A minor tweak 2018-06-28 21:19:58 -04:00
SeventhSentinel c815e3b791 Fix player afterimages not using correct angle on bounce pads or spinout 2018-06-27 21:02:22 -04:00
SeventhSentinel 1305befcde Disable viewheight cvar and vanilla's irrelevant first person HUD stuff, move Viewpoint HUD to a nicer spot 2018-06-26 11:33:54 -04:00
SeventhSentinel c0aa630c63 Fade-in intro
Also made flashing not-local, again.
2018-06-26 10:14:59 -04:00
SeventhSentinel 501bfae9ac Revert MT_FIREBALL to vanilla, remove MT_FIRETRAIL, MT_BALLHOG added, bigger Jawz explosions 2018-06-25 17:12:01 -04:00
SeventhSentinel 7fdc9c8035 Intro camera can noclip, fix several compile errors 2018-06-25 09:18:30 -04:00
SeventhSentinel 18b3d2d14c Spinout type is now passed through K_SpinPlayer
This means we don't have to reset spinouttype's value immediately after using it, which means no more wipeout timer garbage.
2018-06-25 06:58:23 -04:00
SeventhSentinel aa4398f7b9 Noclip camera
It doesn't FEEL like it noclips, but...
2018-06-25 01:20:22 -04:00
SeventhSentinel 16e1569af1 Lakitu murder & countdown improvements
(I'm not SevenethSentienel! I just don't feel like logging out!)
2018-06-24 22:15:22 -04:00
TehRealSalt a8aec0b9e1 Hundreds of tweaks
- SPB multiplier depending on 1st-2nd distance
- Removed the Battle-only k_poweritemtimer (hold over from when you could easily get invuln items all of the time), replaced it with a 2 invincibility item cap in ALL modes.
- Spinout is affected by boosters, *properly*
- Can no longer strafe while spinning out on speed bumps
- Messed with how other items interact with speed bumps, again.
- Old bounce code has been ported for non-players
- Fixed Karma players being able to do anything after the round has ended.
- Fixed sneaker and spinout timer weirdness
- Fixed Mines still being hold-use
- Fixed rubber-burn turn not working
- Removed redundant k_spinout and unused k_boosting variables
- Filled out the Color_Opposite table with Kart's new colors. Not really relevant right now (besides some extra Lua functionality) since nothing uses it, but will be nice for if we do the signpost from the sky idea.
2018-06-19 20:20:06 -04:00
TehRealSalt a554763128 Maintenence
- Fix merge issues
- Update invincibility flash to use its own object instead of MT_OVERLAY, so extra hacks don't need baked into overlay thinking
- K_SpawnSparkleTrail can accept mobjs now, since there really wasn't any reason it needed a player.
- Comment out a few old MK/vanilla SRB2 effects for now
2018-06-10 16:10:24 -04:00
TehRealSalt 07a18e5185 Merge branch 'master' into sonicitems 2018-06-09 22:50:21 -04:00
Sryder 0f4e8c1eda Merge branch 'next' into public_flatsprite
I also fix papersprites in regards to flipping on one sprite fits all rotation stuff

# Conflicts:
#	src/hardware/hw_main.c
2018-06-09 18:47:42 +01:00
Sryder 2adbcd6dfd Merge branch 'master' into dust-kart 2018-06-09 01:00:03 +01:00
Sryder 17245b2d6b Merge branch 'master' into voice-loss-jpg
# Conflicts:
#	src/k_kart.c
2018-06-09 00:56:39 +01:00
Sryder 3daf6fbfd7 Slightly longer delay between voices
Fix win/lose quotes to work based on actual win/lose criteria
Don't play overtake sound until at least 10 seconds into the race
2018-06-09 00:05:05 +01:00
Sryder f00e3dfd5a New Drift dust
Applies all the time as long as the object is turning tight enough
New Sound
Works on Red Shells too!
2018-06-08 21:13:52 +01:00
TehRealSalt 3dac0e21cc A better method of
Instead of returning at the very start of P_MoveChaseCamera, just set camstill to true, and add another exiting check to momentum. This lets the mirror mode post process effect to continue working.
2018-06-08 01:12:07 -04:00
TehRealSalt 9b3751b30c Merge branch 'master' into sonicitems 2018-06-07 19:39:45 -04:00
Sryder 6023f794ac Restore the removed voices 2018-06-07 19:34:13 +01:00
TehRealSalt 7f996c6dfd P_RestoreMusic fix 2018-06-07 02:51:18 -04:00
TehRealSalt d3793cb19c Lots of cmd restructuring.
- cmd->driftturn exists now, for figuring out how far you're turning. Added to prevent analog sticks from being able to get drift sparks faster.
- Feather bounce strafing moved to use cmd->sidemove, which means it also supports analog now.
- Braking now waits a few tics for you to be stopped for a few tics before it lets you go in reverse, as per Sev's request.
- Removed a lot of unused/redundant/commented out control code, and reorganized some of the existing code.
2018-06-05 17:12:42 -04:00
TehRealSalt 173d780ab7 P_RestoreMusic restores level exit music as well
Splitscreen fix
2018-06-05 02:41:55 -04:00
TehRealSalt dd05edfcc0 Merge remote-tracking branch 'srb2public/next' 2018-06-04 16:58:35 -04:00
TehRealSalt fa125bc18d Leave the camera behind while exiting, for dramatic effect! 2018-06-03 21:01:59 -04:00
TehRealSalt dff33deb52 Fix Battle scoring, hopefully 2018-06-02 10:57:43 -04:00
TehRealSalt bf3910cdca Incredibly rudimentary Jawz stuff 2018-05-31 20:51:05 -04:00
TehRealSalt 75e77189d6 Fix Star/Mega music persisting after death for splitscreen players 2018-05-30 18:38:30 -04:00
Monster Iestyn 4f75ae3a68 Fix both Bouncy FOF and Space Countdown sector specials working on FOFs without the FF_EXISTS flag
Also move the Bouncy FOF sector special check above the FOF heights checking in P_CheckBouncySectors, because it means not having to waste time calculating FOF heights only for it not to be bouncy anyway :P
2018-05-11 20:35:46 +01:00
TehRealSalt eaaf708381 This little thing slipped by the merge 2018-04-02 06:43:03 -04:00
TehRealSalt 428a134cda Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems 2018-04-02 06:39:26 -04:00
TehRealSalt 15f0e16344 Race lap linedef executor
Set up similar to NiGHTS Mare linedef executors. Give a sector the "Race
Lap" sector type, tag it, then set the frontside x-offset on the trigger
line to the lap it should activate on minus 1. There are a few flags you
can check on the trigger line to modify its behavior.
- Normally the executor will only trigger if its exactly on the lap
specified. Check Not Climbable to make it execute on laps equal to or
greater than, or check Block Enemies to make it execute on laps equal to
or less than.
- By default, the executor will check current lap with the person in
last's lap. Check E4 to instead find the current lap from the player who
triggered it. This flag is better for triggering events ahead of the
players, while the default effect is better for triggering events behind
the players.
2018-03-31 14:48:49 -04:00
TehRealSalt 00e913bbcc Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems
# Conflicts:
#	src/k_kart.c
#	src/k_kart.h
#	src/lua_baselib.c
#	src/p_inter.c
#	src/p_spec.c
2018-03-31 00:44:03 -04:00
TehRealSalt fe645f8a53 Actually, I messed this up 2018-03-30 12:17:48 -04:00
TehRealSalt 7516a1dc0c Doing one more step to totally ensure that matchesplayed is unlocking stuff 2018-03-30 12:16:15 -04:00
TehRealSalt d99339ecd0 Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems
# Conflicts:
#	src/info.c
#	src/k_kart.c
#	src/p_enemy.c
#	src/p_inter.c
#	src/p_mobj.c
2018-03-14 16:12:15 -04:00
Sryder 07c7bc05c5 Fix the item box related crashes
Removed Magnet item box pulling code. It's a mess, hacky, doesn't really help in races, and breaks things. We will implement something new for it soon.
2018-03-13 05:20:47 +00:00
TehRealSalt 375f9a9291 Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems
# Conflicts:
#	src/d_netcmd.c
#	src/g_game.c
#	src/k_kart.c
#	src/p_enemy.c
#	src/p_inter.c
#	src/p_map.c
#	src/p_user.c
#	src/sounds.c
#	src/sounds.h
#	src/y_inter.c
2018-03-12 00:58:13 -04:00
Sryder be0e5fe627 Comment out calls to CV_SetValue for cv_analog 2018-03-12 03:18:45 +00:00
TehRealSalt f97ec30493 Made a lot of gametype checks use either G_RaceGametype or G_BattleGametype
Should make it a lot easier to add more gametypes later.
Also some minor fixes:
- Changed up how shell speed scales in mobjscale juuuust slightly, so
it's less messy
- Fixed CHECK showing spectators
2018-03-04 15:27:52 -05:00
TehRealSalt 2a23549d63 Winning positions scale with number of players
Anyone in the top 50% gets winning music & blue position, everyone below
gets the losing music & red position. For odd numbers, it rounds up.
2p: 1st wins, 2nd loses
3p: 1-2 win, 3rd loses
4p:  1-2 win, 3-4 lose
5p: 1-3 win, 4-5 lose
6p: 1-3 win, 4-6 lose
7p: 1-4 win, 5-7 lose
8p: 1-4 win, 5-8 lose (SMK)
12p: 1-6 win, 7-12 lose (modern MK)
16p: 1-8 win, 9-16 lose (max player count)
In big netgames you won't just hear the losing music all of the time now
:V
2018-02-20 19:11:09 -05:00
TehRealSalt 3e7fbad490 Porting over some things from sonicitems 2018-02-13 16:48:09 -05:00
TehRealSalt 00d2038d61 Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems
# Conflicts:
#	src/k_kart.c

(Also I added some extra music for voting, because I forgot I didn't
commit the merge :V)
2018-02-11 12:18:25 -05:00
TehRealSalt dbc664d4e7 Minor fixes, mostly mobjscale and spectators 2018-02-10 16:19:22 -05:00
TehRealSalt 4348be7d80 Chaotix sound effects, new music names 2018-02-10 16:01:09 -05:00
TehRealSalt 2889687d1d New invincibility effect, grow/shrink stuff
Whenever grow/shrink effects get made, I'll remove the Mario-style
stuttered growth and whatever else needs doing beyond that
2018-02-10 01:19:33 -05:00
TehRealSalt 85a81ed087 Minor adjustments in hopes that I fixed the resynch bomb on gametype switch? 2018-02-08 17:13:06 -05:00
TehRealSalt d9c49d9527 Merge remote-tracking branch 'refs/remotes/origin/master' into sonicitems
# Conflicts:
#	src/dehacked.c
#	src/hardware/hw_main.c
#	src/info.c
#	src/info.h
#	src/k_kart.c
#	src/p_enemy.c
#	src/p_user.c
#	src/r_things.c
2018-02-05 19:08:49 -05:00
TehRealSalt cbff4bbf44 So much
- Renamed fucking everything
- Threw out all of the item code because it looks at me funny
2018-02-05 18:55:52 -05:00
Sryder13 4b06594dd0 Star colormap is decided to be used per mobj with mobj->colorize
Star creates afterimages that are colorized and fullbright
Star makes the player fullbright
2018-02-05 00:00:36 +00:00
TehRealSalt 37a74cbd94 Double-check legitimacy on match completion 2018-01-28 19:57:38 -05:00
TehRealSalt 403e14e971 Merge remote-tracking branch 'refs/remotes/origin/master' into menus-cvars-unlocks
# Conflicts:
#	src/g_game.c
#	src/m_cheat.c
#	src/p_user.c
2018-01-24 16:24:36 -05:00
TehRealSalt f6cfcd4f89 Restructured some ticcmd stuff, temporary keyboard defaults, commented out mouse options menu
No more weapon number buttons, button constants reordered, and BT_JUMP
renamed to BT_DRIFT, and removed a lot of commented out stuff or stuff
we didn't need. Spectator-only support for looking up/down soon.
Keyboard defaults are just what I use, plan on adjusting it further
after more feedback
2018-01-24 02:45:06 -05:00
TehRealSalt 8b88a2ebd8 Spectating is properly implemented now
- Spectate button works
- Spectating & objectplace controls are usable now
- New spectator HUD
2018-01-22 22:18:57 -05:00
TehRealSalt 41250d1751 Commiting what I have currently, but disabled 2018-01-22 19:19:17 -05:00
TehRealSalt bb6694a72b Camera adjustin's
- Look backward button works
- Increased default cam_speed, from 0.3 to 0.45. This is the highest
value that I think doesn't look overly stiff.
- Removed bobbing in first person
I was trying to do the camera angle thing that we've been talking about
for a while, but I can't get it to work well.
2018-01-22 17:08:31 -05:00
TehRealSalt 6f1dda7b7a Instead of player->laptime, lets add curlap
Since lap time will only ever be used locally, it makes more sense to
just use one variable instead of a player struct variable
2018-01-21 21:03:44 -05:00
TehRealSalt 672c4b5298 Record best lap time in Record Attack
- Record Attack replays now save best lap time
- Removed instances of NiGHTS Attack
- Removed a lot of unlockable that have no use in Kart (ultimate mode,
perfect bonus, score emblems, etc)
- Removed all methods of activating ultimate mode
2018-01-21 19:15:26 -05:00
TehRealSalt db09f7b3d6 Lots of changes
- Menus now have all of the Kart cvars
- Removed any cvars that aren't useful for Kart from the menu (they
still exist in the console, though)
- Removed SP and NiGHTS Mode options from the main menu
- "kartcc" is renamed "kartspeed", uses values 0-2 instead of multiples
of 50, or the terms "Relaxed", "Standard", and "Turbo"
- Many gametype options (game speed, frantic, mirror, & karma comeback)
are now changed on map load instead of instantly
- New cvar, "kartminimap", for disabling the minimap
- The maxplayers cvar now actually matches up with our 16 player limit
- Game now keeps track of matches played. Has a condition type
associated with it, as well.
- Game checks for unlocks and saves gamedata when finishing a match,
even in MP
- Removed most of the normal emblems, added a single emblem for Green
Hills. Didn't know what to do with extra emblems and such so I just left
them (FOR NOW c:<)
2018-01-15 22:31:14 -05:00
TehRealSalt 61a4ea6962 Mobj scale fixes
- MAXSTEPMOVE is affected by mobjscale
- Minimum bump speeds (both wall & object) are affected by mobjscale
- Minimum speed required for drifting is affected by player scale
- Speedometer speeds are proportional to mobjscale
- Camera no longer scales with player scale, to make the fact that
you're either Lightning'd or Mega'd more obvious :V
- Sevvvvvv go work on Dimension Heist
2018-01-15 16:14:45 -05:00
TehRealSalt 349b27e0de Change splitscreen into UINT8, fix HUD slightly more 2017-12-18 20:59:04 -05:00
TehRealSalt 122eb82170 Merge remote-tracking branch 'refs/remotes/origin/battle' into quads
# Conflicts:
#	src/g_game.c
#	src/k_kart.c
2017-12-18 01:02:53 -05:00
TehRealSalt e7abd77299 Merge remote-tracking branch 'origin/quads' into quads
# Conflicts:
#	src/d_main.c
#	src/r_draw.c
2017-12-17 22:32:12 -05:00
Wolfy 0305af3069 Merge branch 'quads' of http://git.magicalgirl.moe/wolfs/Kart into quads
# Conflicts:
#	src/d_main.c
2017-12-17 20:30:37 -06:00
Wolfy 32b9663202 more stuff
nothing too special here
2017-12-17 20:23:11 -06:00
TehRealSalt d2425329ca HUD 2017-12-17 20:42:17 -05:00
TehRealSalt 654e5e482b Mess with camera distance stuff
Also fixed a bug where I made all of the screens in 3p/4p mode in OpenGL
too zoomed in
2017-12-17 17:01:19 -05:00
TehRealSalt 66a9a6bdd4 Fixed local sync fail, among a bunch of other splitscreen check fixes in other files
I don't know how many of the changes in d_clisrv were really necessary,
I was just franticly trying to figure out the source of the local sync
fail
2017-12-17 14:17:07 -05:00
TehRealSalt fc9d426660 More stuuuuff 2017-12-17 01:21:24 -05:00
TehRealSalt 0393e24fa6 A lot lol
The importants:
- Fixed compiling
- Combined G_BuildTiccmd for all players, no more need for a function
for each
- You can actually start 3p/4p mode
2017-12-16 22:32:43 -05:00
TehRealSalt f69270027c Reverted wipeout 2017-12-12 19:58:44 -05:00
TehRealSalt ffbf6e8752 Mirror Mode
- Added kartmirror cvar, flips the screen & player controls. The
post-processing effect is currently Software only; will need an OpenGL
implementation but I don't know enough to make that happen
- Moved adminplayer = -1 setting to SV_ResetServer instead of
SV_StartServer
2017-12-12 00:07:14 -05:00
Wolfy fb976ab26c more quad stuff 2017-12-11 00:12:38 -06:00
TehRealSalt f5650eba09 Wipeout & minor tweaks
- SMK-style wipeout
- Using goldshroom removes some of its timer again
- Karma item boxes follow the player more closely
- "ATTACK OR PROTECT" no longer appears when you die if you've already
seen it
- Lua support for our SOC actions
- Fixed KARTSTUFF_LIST for Lua/SOC
- "Battle" is now an accepted word in level headers for setting
TOL_MATCH
- Default map numlaps is now 3 instead of 4
- Reverted making LF2_RECORDATTACK and LF2_NOVISITNEEDED default menu
flags, needs to be set manually now
2017-12-10 20:58:34 -05:00
wolfy852 8de9c46b68 Merge branch 'multi-admin' into battle
# Conflicts:
#	src/k_kart.c
2017-12-03 16:32:44 -06:00
TehRealSalt 2f23ff466c More tweaks to cards 2017-11-29 02:07:22 -05:00
TehRealSalt addfde0f09 Battle card animations
Was hoping not to waste another variable on this, but oh well
2017-11-29 01:09:46 -05:00
TehRealSalt 198685582f Previous EXE: The Better Edition
- Improve balloon-based items. Much more distinguished differences
between the different ranks
- Reverted Feather strafing. You can now just... properly move in the
air, if you're using a Feather or a Bounce Pad.
- Bounce pads are now stronger while using speed items.
- Fixed the long standing bug about offroad & ziplines working when
you're on FOFs above them. This is a tricky subject, so please report
any issues you may come across related to this.
- Shells should no longer travel to Mars, nor will they  when using
bounce pads. They should now do a gentle hop.
- :WIP: new MP Player Setup screen, now shows character stats. Will
later feature the list of characters in a row of icons, and a backported
2.2 color selector with toast's permission
- Renamed "Match" to "Battle" :p
- Yet MORE minor cases where kartspeed & kartweight were being read as
fixed_t when they're freakin' UINT8's, people!
2017-11-28 01:13:23 -05:00
wolfy852 732cef777f Merge in battle, unfuck the code 2017-11-21 01:23:06 -06:00
TehRealSalt 06eca5fbb5 Minor things
- crash fix
- commented out player 2 spawning with balloons
- double checked battle exiting is 10 sec
2017-11-17 17:36:04 -05:00
TehRealSalt cca30d1095 Lots of small tweaks & fixes, that should make Battle a LOT more bearable
- Comeback timer is now always 10 seconds instead of scaling
- Takes 10 seconds before exiting
- Flashing tics is doubled in Battle Mode
- Removed a bunch of bomb nerfs
- Bombs are back to making only 1 point per hit
- Exposed K_GetKartAccel & K_GetKartFlashing to Lua
- Item boxes should no longer drop while going up slopes
- Trading item boxes with a bomb should turn you back into a bomb
- Balloons should no longer all respawn when dying in pits in 2-player
games
- Flashing players are able to kill *thrown* shells again (shields and
trap items are still unkillable). Prevents red shells from being able to
stick to a flashing player and hurt them again as soon as they're done
flashing
- CHECK appears at a farther distance
2017-11-17 00:48:36 -05:00
TehRealSalt 3d3972fac9 Battle HUD stuff 2017-11-13 20:45:57 -05:00
TehRealSalt 2360516e66 Yet more comeback stuff!
- You can now choose to carry an item to someone instead of bombing
- You need to bomb someone or give an item a combined total of three
times in order to come back.
- Bombing somone gives 2 points while giving items doesn't award you any
points.
- Position number still flashes after you've won, and it flashes rainbow
for people who have won and are in 1st place!
- Flashing players can no longer eat items
- Fixed kartstarsfx playing the alarm in conjunction with music
- Fixed some items no longer causing wipeout
2017-11-12 22:48:32 -05:00
TehRealSalt c5920b431f Lots of misc stuff
- Bomb overlay is invisible during comeback timer, and flickers back in
when it's almost up
- Show comeback timer on HUD
- Feather is stronger & has more gravity
- Option to use SMK star alarm instead of overlapping music
- Using P_MobjDamage normally on players now defaults to normal spinout
instead of shell's instant stop
- Some general gametype case fixes (most notably, being able to spin
people out in Race using a mushroom)
2017-11-10 21:10:01 -05:00
TehRealSalt 890637c4ab Expose some functions to Lua 2017-11-07 18:35:05 -05:00
TehRealSalt cacc9ee97f Made Frantic Mode work in Battle Mode & provide more silly results
Also fixed flashing
2017-11-07 15:04:21 -05:00
TehRealSalt 7fcca8f2d1 Added feather 2017-11-07 00:57:42 -05:00
TehRealSalt 7eb4a958f7 More adjustments
- Comeback timer gets higher the more you get hit
- Your ghost appears over the bomb
- Speed & accel is set to worst while a bomb
- CHECK range scales with kartcc
2017-11-05 23:18:58 -05:00
TehRealSalt 9bea44e5c1 Fix this garbage 2017-11-05 16:34:12 -05:00
TehRealSalt d3e888cc44 Merge remote-tracking branch 'refs/remotes/origin/master' into battle
# Conflicts:
#	src/d_player.h
#	src/k_kart.c
#	src/k_kart.h
#	src/lua_playerlib.c
2017-11-05 02:16:39 -05:00
TehRealSalt a9c1b3e747 Everything.
- Player arrows now show if a player is in the item roulette
- Boo has been improved, and added back to Battle's item roulette
- The CHECK HUD item is now more accurate, and should appear more often
- Early comeback mechanic. Functional, but really unpolished
- Attempted (again) to make the first player to join in a netgame spawn
with balloons
- No longer shows respawn text on death
2017-11-05 01:43:47 -05:00
Sryder13 c9ddb7a4b5 Re-add lost player vibration frames
Separate sprites for fast moving frames
Rename some frames for a more sensible naming convention
2017-11-04 17:32:47 +00:00
Sryder13 81a077b9af New player frameangle used instead of mobj angle for players
Set to mobj angle except when spinning where it's set to spin
Only 1 spin frame needed now
2017-11-04 14:07:53 +00:00
TehRealSalt 69d6d43fea Everything I did today; mainly player arrows
Also some minor tweaks and bug fixes all around
2017-10-26 02:31:01 -04:00
TehRealSalt ac55f0ea4d Okay, battle mode items respawn, for real now 2017-10-24 21:22:09 -04:00
TehRealSalt b36fd5c5f9 Did you know: Battle Mode
- Different sizes for the balloons, depending on how many you have
- Balloons are fullbright, cast shadows, and stick closer to players
- Mega Mushrooms can now appear
- Can steal items with Boo in Battle Mode now, as intended
- Death pits make you lose only 1 balloon
- Balloons disappear properly if you use Boo
- Boo item icon should no longer appear if you're out of balloons
- You can now properly respawn in Battle Mode
- Can no longer collide with items if you are already holding one
2017-10-22 17:26:43 -04:00
TehRealSalt 31a13e245c BATLLE MODE
AAAAAA
2017-10-22 03:06:35 -04:00
TehRealSalt 5fe2f4928f Merge remote-tracking branch 'refs/remotes/srb2public/next' into zarrotsu
# Conflicts:
#	src/doomdef.h
#	src/sdl/i_main.c
#	src/sdl/i_video.c
#	src/y_inter.c
2017-10-17 15:53:34 -04:00
TehRealSalt 727d55b64e Merge remote-tracking branch 'refs/remotes/srb2public/public_flatsprite' into zarrotsu
# Conflicts:
#	src/doomdef.h
2017-10-17 00:40:38 -04:00
TehRealSalt 9c0437bcd1 Thought I heard something about camera changing, it hasn't, so I decided to port work I did for internal
Basically:
1.) farther camera defaults
2.) different camera settings save
3.) cam_dist automatically increases with splitscreen (& analog mode,
but that's irrelevant for kart :p)

(IIRC someone said that this branch is fine to commit directly to,
please feel free to revert immediately if this isn't the case :V)
2017-10-16 23:52:13 -04:00
ZTsukei ba7580d8e2 = Nerfed Megas across the board.
- Rarer
 - Speed reduced from +25% to +20%
 - Getting squished doesn't last as long
= Nerfed the Banana Meta - or at least changed it
 - You don't wipeout for as long
 - You don't lose as much speed from wiping out (1/2 instead of 1/4)
= Respawning after death is faster
 - Lakitu drops you faster, only three floaty sounds instead of four
= Adjusted the camera to the values given by Sev
2017-10-13 15:44:17 -04:00
Monster Iestyn 7d4513f2f1 Don't be stupid with FF_BLOCKPLAYER/FF_BLOCKOTHERS flags please 2017-07-17 20:47:00 +01:00
ZTsukei 8d19d18200 v1.3.17
-------
Lakitu returns from his ironically-not-pillowshaded-cloud grave
Dropboosting works on respawn
Players respawn "automatically after 2 seconds" instead of "*instantaneously* while accel is held"
2017-07-16 12:06:29 -04:00
ZTsukei eaa5167f71 v1.3.16
--------
Fireballs narrower
Fake Item is no longer restricted while held
Held items that are restricted remain in the item wheel until used
Magnet now correctly hits nearby players and objects
2017-05-17 23:11:00 -04:00
Alam Ed Arias 459d8064ee Merge branch 'master' into public_flatsprite 2017-05-12 20:42:55 -04:00
ZTsukei 1372cf55c9 Removed drown, maybe extended post-race time so it doesn't jump to results immediately
Added experimental player distance based items
2017-05-07 19:08:11 -04:00
ZTsukei 04432f7789 v1.3.10
-------
Accelcode now factors in forwardmove value rather than a boolean. This is used to enable clutching (or whatever you call it; accel+brake) to give its own result.
Fixed Thwomps killing players rather than crushing them.
Reverted buggy collision experiment from previous version.
2017-04-19 21:05:17 -04:00
Sryder 8934cf69c7 Account for conveyor belts with no-accelerate movement
use R_PointToDist2 instead of P_AproxDistance for player->speed, more accurate and probably won't cause too much performance trouble
2017-03-10 22:54:54 +00:00
Sryder c6814943ec Account for scale when getting topspeed for accel code 2017-03-10 02:59:16 +00:00
Sryder 16e0dec70d Change momentum to be closer to the direction you're facing when not pressing the controls 2017-03-10 02:22:49 +00:00
Sryder 6dc9339ab0 Get rid of Lakitu and the specific things for the final lap sound
Lakitu is completely commented out currently and we will be able to re-add it back later
Final lap sounds do some wacky stuff with the variables of the local player only, and also block out the music just to restart it at the same speed currently, changed it to just be the lap sound, we can use a new sound for it later
2017-03-08 21:41:52 +00:00
Sryder 6b83d1cdc5 Gradual turn into drift push angle 2017-03-07 03:00:10 +00:00
Sryder cac7171d48 Merge branch 'cleanupv2' into sonickart 2017-03-07 01:07:55 +00:00
Sryder 515054c599 Fix drifting
No longer does all the angle adjustments inside of the player thinker and instead does it with the controls
Should hopefully avoid any desynch from drifting
Also maybe fixed player 2's controls
2017-03-07 01:05:18 +00:00
Sryder 2807c45b03 Merge branch 'cleanupv2' into sonickart 2017-03-06 21:26:25 +00:00
Sryder bdd03bc830 Remove driftfix and disable looking backwards
I believe editing the player data in G_BuildTiccmd will cause desync, especially for anything that would effect gameplay
driftfix didn't seem to do much, will find a way to re-enable looking backwards properly later (probably change one of the buttons, DRIFTLEFT or DRIFRRIGHT?)
2017-03-06 21:24:23 +00:00
Sryder cf2671be77 Fix toaster's slower acceleration on ice surfaces
Will likely act slightly different because of acceleration being reworked and it using a different variable
2017-03-06 03:21:28 +00:00
Sryder 92f33c1d60 Low friction and Disable Jump
We will look into disabling jump a better way later
2017-03-05 22:08:13 +00:00
Sean Ryder be3acfff0b Fix warnings
Possibly fix some whitespace problems
2017-03-04 22:13:19 +00:00
ZTsukei f50ecc0dcd Most items work (netgame needs testing), will do fireballs later. 2017-02-26 17:38:24 -05:00
ZTsukei 98137822b8 Fake Items working - Still a weird bug where the item won't throw if you're turning. 2017-02-26 10:19:33 -05:00
ZTsukei e7280fc53a Some drift adjustments 2017-02-24 20:01:06 -05:00
ZTsukei d9944e9c41 Steering fixes, drifting changed, weight has effect now 2017-02-23 20:37:16 -05:00
ZTsukei 66a206cc55 Driftboosting now increases player accleration
Consolidated the turning and drifting values to k_kart functions for easier editing
Removed 200cc. 50/100/150ccs are a weird amalgamation of the prior values.
2017-02-21 23:42:21 -05:00
ZTsukei 28544af035 Star works, configured to work in multiplayer with just speed items for now... Will return to look for color stuff later. 2017-02-19 19:42:10 -05:00
ZTsukei 7b7a6e5458 Added fancypants mega shroom, fixed drift boosting 2017-02-19 12:19:02 -05:00
ZTsukei d83cbe0b72 BooTake working now, maybe BooSteal does too ¯\_(ツ)_/¯ 2017-02-18 16:46:08 -05:00
ZTsukei 0a782bf79e Fixed thwomp sectors, Added Magnet Item. 2017-02-18 13:39:50 -05:00
Sryder 35b789d330 Fix random duplicate code from merge in hw_main.c and r_segs.c
Whitespace cleanup
2017-02-18 00:25:16 +00:00
Sryder 68d439a783 Merge branch 'upstream/next' into zarrotsu_vanillamerge
# Conflicts:
#	src/Makefile
#	src/doomdef.h
#	src/hardware/hw_main.c
#	src/p_mobj.c
#	src/p_user.c
#	src/r_segs.c
#	src/sdl/i_video.c
#	src/win32/win_sys.c
2017-02-17 20:14:55 +00:00
Sryder 2d6c7959ed Merge branch 'SRB2_release_2.1.15' into zarrotsu_vanillamerge
# Conflicts:
#	.gitignore
#	libs/zlib/projects/visualc10/zlib.vcxproj
#	src/Makefile
#	src/am_map.c
#	src/d_main.c
#	src/dehacked.c
#	src/doomdef.h
#	src/g_game.c
#	src/hardware/hw_main.c
#	src/hardware/hw_md2.c
#	src/info.c
#	src/p_inter.c
#	src/p_map.c
#	src/p_mobj.c
#	src/p_spec.c
#	src/p_user.c
#	src/r_bsp.c
#	src/r_plane.c
#	src/r_segs.c
#	src/r_things.c
#	src/s_sound.c
#	src/s_sound.h
#	src/sdl/Srb2SDL-vc10.vcxproj
#	src/win32/Srb2win-vc10.vcxproj
#	src/win32/Srb2win.ico
#	src/y_inter.c
2017-02-17 20:03:10 +00:00
ZTsukei 370f290a08 Fixed position code, added some item numbers 2017-02-16 21:33:15 -05:00
ZTsukei b0b51f9a61 Some position code 2017-02-12 23:25:06 -05:00
ZTsukei fadcd17022 Some accelcode changes to let CC's work. 2017-02-09 23:57:36 -05:00
ZTsukei 580f909c6c Added Accelcode, start boosting, reverted drifting, etc. 2017-02-07 17:19:58 -05:00
toasterbabe ebd436bf2f Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into touching_fixes 2017-01-02 17:58:47 +00:00
toasterbabe 02d78b355b Smoother ropes and zoom tubes ported from internal. 2016-12-01 14:33:44 +00:00
ZTsukei 66c6b6885f Updates done a while ago... Not 100% sure what they were. :x 2016-11-20 23:23:10 -05:00
toasterbabe e67f48df83 Forgot to revert the other files. 2016-11-02 20:35:53 +00:00
toasterbabe d21b091b96 * Slope/gravity support for quicksand complete.
* Space sector support complete, bounds of drowning now altered slightly.
* Knuckles climb now has symmetrical slope support for both normal and reverse gravity.
* All slope-determining topheight and bottomheight code is now identical in form.
* Camera postimages now support slopes properly.
2016-10-31 22:14:34 +00:00
toasterbabe d13ca362d6 Quicksand now supports slopes and also reverse gravity. 2016-10-31 21:34:43 +00:00
toasterbabe 04a38a683b Okay, this is a biggun. Pay attention, everyone.
Moved the handling of P_PlayerInSpecialSector to P_PlayerAfterThink from P_PlayerThink.
* This allows the player to get hurt on sloped lava surfaces that are moving downwards.
* Also prevents the player from standing on death pits for 1 tic.
* Prevents the player moving 1 extra tic's worth of movement of pain when hit by sector.
* Thankfully, no consequences re conveyors.
* Like, the only consequences I've found have been positive. However, this DOES need to be thoroughly investigated before it can be allowed anywhere near Next itself.
2016-10-31 20:15:11 +00:00
toasterbabe 1bbbe15ee5 Fixed a bug with being able to go under the lava because P_CheckSolidLava doesn't take slopes into account.
(neither does P_CanRunOnWater, but I don't think it's necessary to make that check more complicated as you probably shouldn't be able to waterrun up steep surfaces anyways)
2016-10-31 13:53:52 +00:00
toasterbabe ff443251b1 P_IsPointInSubsector now works in both Software and GL, which means it can be used as the main driver behind support for Knuckles climbing on one-sided walls.
Also, the "teleport" devmode command can now gracefully handle coordinates specified outside maps with no/few thok barriers, which previously prevented teleport via the thok barrier bleed's sector floor and ceiling being equal.
2016-10-29 11:54:47 -04:00
Monster Iestyn 8f02c50c10 Fix players and pushables not accounting for slopes on bustable FOFs 2016-09-02 21:41:45 +01:00
Monster Iestyn eae47c9808 Fix Knuckles in 2D mode attempting to latch onto air when gliding into a slope. Now he just attempts to latch onto the slope directly (which I'll fix another time, if I can figure out how)
(fix for SUGOI's Retro Hill Zone)
2016-09-01 21:21:20 +01:00
ZTsukei 82b0e9962e Toaster's friction code??? 2016-08-23 21:04:06 -04:00
toasterbabe 2a74ea07ee Chee wanted paper sprites' code, so here it is for the public to see.
Note: Won't compile. Need to merge in the NAMEcLcR stuff first, let me do that.
2016-08-22 22:54:30 +01:00
ZTsukei da7a513c9a Some drift code, some control code 2016-08-21 17:55:37 -04:00
ZTsukei 3a3180ce05 Redid control names, some item code, start of drift shenanigans 2016-08-20 22:15:11 -04:00
ZTsukei d631d0ef04 S_PLAY states, HUD stuff 2016-08-14 23:51:25 -04:00
toasterbabe 612575620b Solved the climbing-on-one-sided-lines problem another way, using the last touched line's attributes.
(After talking to Alam, we can't have floats anywhere near P_ functions, so.)
2016-08-13 14:16:06 +01:00
ZTsukei 4112d44529 Some Color code, Kart powers 2016-08-11 21:42:16 -04:00
ZTsukei e4a970f894 Starting from scratch. SRB2 v2.1.15 2016-07-06 00:10:19 -04:00
Inuyasha 26b3f2e0dc Merge branch 'toast_slopes' into 'next'
Some slope improvements/fixes (plus P_GetMobjGravity)

Dear Red, I did some things.

* Made the slope flag SL_NOPHYSICS actually have an effect like we wanted to, but didn't get around to implementing yet - activated by setting the slope's linedef flags to have ML_NOSONIC.
* Made downhill slope thrusts proportional to an object's gravity and friction.
* To make the above happen - seperated out the gravity value finding code in P_CheckGravity into a seperate function, P_GetMobjGravity. (p_mobj.c, p_local.h) I also made this function available to Lua.
* Turned those PANIC n console messages (which would inevitably be followed up with a crash, since we're accessing invalid memory immediately after) into a descriptive I_Error.
* Put the SRB2CB type-shimming behind an ESLOPE_TYPESHIM ifdef.
* Removed SPRINGCLEAN-ifdef'd code.
* Cleaned up some eosteric comments.
* NEW SINCE RED +1'd THIS: The teetering code now takes slopes into account pretty well. There are edge circumstances as outlined in commit 9d221f4f3f, but this is unilaterally better behaviour in every way and the teetering code was kind of a mess anyways.
* NEW SINCE RED AND ALAM +1'd THIS: P_ReverseQuantiseMomentumToSlope. Simple function that replaces the inverse angle stuff (which also wasn't using InvAngle, just ANGLE_MAX - angle - which is inaccurate!!)

Current testing files available at /toaster/slptst3.wad and /toaster/gravitytest.lua on the ftp.

I want to do more to the branch like implement SL_ANCHORVERTEX in the near future, but this is probably safe to merge in its current state.

See merge request !77
2016-06-22 19:03:58 -04:00
toasterbabe 20ffbbdc41 Climbing now supports one-sided linedefs.
The whole thing needs a refactor in general, but it's almost 2am here, I need my sleeb, and this fix would probably break something with 2.1 climbing if I made it any more/less (depending on viewpoint) complicated.
2016-06-20 01:50:47 +01:00
toasterbabe fa58993bda Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into toast_slopes
# Conflicts:
#	src/p_user.c
2016-06-19 16:59:49 +01:00
toasterbabe 1147428904 Revert "Changed teetering to match the discoveries made about it in the sectorlist_traversal branch in a way that matches my revamps here, since I DID change a lot."
This reverts commit 19b186e52e.
2016-06-19 16:38:11 +01:00
toasterbabe f5f2c4ad48 Revert "Okay, NOW I fixed the compile error. Forgot to stage this."
This reverts commit 1723bb55f9.
2016-06-19 16:38:04 +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 1723bb55f9 Okay, NOW I fixed the compile error. Forgot to stage this. 2016-06-09 15:24:23 +01:00
toasterbabe c5ff41d6a6 Fixed compile error and placed the #undefs for xsign and ysign in more logical places. 2016-06-09 15:20:45 +01:00
toasterbabe 19b186e52e Changed teetering to match the discoveries made about it in the sectorlist_traversal branch in a way that matches my revamps here, since I DID change a lot. 2016-06-09 15:16:25 +01:00
toasterbabe 7af14c20ed Everywhere in the code that was doing things wrong has been changed.
Two interesting points of note:
* The touchspecial sector flag seems to actually do its job now.
* Detection of sectors with polyobjects in seems to have done this incorrectly, but this doesn't mess with anything about touching the polies themselves so it seems to really only handle edge cases where the polyobject was too close to the border of another sector (which would've likely made rendering glitches anyways).
* There was a whole swathe of teetering code that was basically never run properly because of this mistake. I did a simple fix at first, but you started teetering whenever you were slightly less than your radius away from a sector's edge, which was completely different and undesirable behaviour. Instead, I cut out the code that was never running, and just left the hacky method in instead since it was more accurate to what we want in general.
2016-06-09 14:56:24 +01:00
toasterbabe 17e0adcbac Renamed some struct variables so the problem this branch sets out to fix is more obvious at a glance.
* m_snext ==> m_thinglist_next
* m_sprev ==> m_thinglist_prev
* m_tnext ==> m_sectorlist_next
* m_tprev ==> m_sectorlist_prev
2016-06-09 14:16:02 +01:00
toasterbabe 0b920ee249 You know that problem where you bumped on the edges of Mario blocks and Bustable blocks and Bouncy FOFs sometimes? Wham. Bam. In the van.
Issue was caused by attempting to traverse the sector's thing-touching-list across all the things in the sector (which would inevitably have the same sector as the first node in mobj->touching_sectorlist) instead of traversing the thing's sector-touching-list (which has the same thing but different sector references).

I wonder how many times AJ copypasted this code with absolutely no idea why it wasn't working properly. I'll figure that out tomorrow, maybe set up some compiler macros so this mistake is never made again. For now, I must sleeb.
2016-06-09 00:02:50 +01:00
toasterbabe 51c769247a Compiling fixes. 2016-06-07 19:44:43 +01:00
toasterbabe aa113045d7 MI pointed out opportunity for more optimisation, and who could resist? 2016-06-07 18:18:47 +01:00
toasterbabe 9df72a966e Some simplifications after MI pointed out that the sector heights are the only thing accessed outside of the iteration. 2016-06-07 17:55:03 +01:00
toasterbabe 9d221f4f3f Teetering now supports slopes properly.
Behaves ALMOST as you'd expect. It gets the z position of the slope at the player coordinates when it comes to the sectorlist check (which is first), though, so there's a few oddities that are amplified with steep slopes:
* If the slope's sloping away from you at a steep angle, you might not be able to step down onto it, but you won't teeter (because it's at a step-down-able height if it extended to directly beneath you)
* If the slope's sloping towards you at a steep angle, you might end up in teetering frames when you're able to step down onto it (because it's NOT at a step-down-able height if it extended to directly beneath you)

HOWEVER, it would be pretty obnoxious to hold back code which is functionally superior in every way otherwise, and it doesn't really seem like there's a good way to get that checked tbph
2016-06-07 17:37:25 +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
ZTsukei f05816ce69 The devil. The behemoth. p_user.c. Still lacking item roulette code, which needs to be rewritten anyway. 2016-05-28 15:25:06 -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
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
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 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
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
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 6aa708b5af I don't think we need the BLUE_SPHERES define anymore... 2016-03-09 00:49:35 -08:00
Alam Ed Arias 407bf4f39d Merge branch 'next' into polyobj-teeter-fix 2016-03-07 16:46:32 -05:00
Alam Ed Arias 55a6355e15 Merge branch 'next' into slope-fixes 2016-03-07 16:45:51 -05:00
Inuyasha a8bca89dbd Merge branch 'backport_unslot-music' into 'next'
BACKPORT: removal of music slots

Relevant commits cherry-picked. Basically everything except the internal music track name switches.

See merge request !43
2016-03-03 22:31:21 -05:00
Inuyasha fc35c8557e Super color code cleaning, speed 50%, nothing special 2016-02-29 01:18:33 -08:00
Monster Iestyn 4b447b3d0d Don't add polyobjects to a mobj's sector nodes list. This causes the player to teeter whenever they are above the polyobject's bottom, whether or not it is solid
Also, a minor tweak for the teetering code itself, though it looks a right mess and probably should be redone in the future
2016-02-28 18:30:29 +00:00
Alam Ed Arias 2b12e5ff20 Merge branch 'next' into backport_unslot-music 2016-02-26 02:11:29 -05:00
Alam Ed Arias 07d331676b Merge branch 'next' into slope-fixes 2016-02-26 02:09:03 -05:00
Monster Iestyn 3058648fdc Fix elemental flame trails not spawning when going up slopes 2016-02-16 17:58:08 +00:00
Inuyasha 7c5adacc6f Fixed chain launching
In the process, the stasis flags work like you'd expect them to.
You can now set them in Lua or code and they'll actually do something.
2016-02-14 12:28:03 -08:00
Alam Ed Arias 6000b5c980 Merge branch 'master' into next 2016-02-09 14:13:50 -05:00
Inuyasha 8c17dac589 The concept of "music slots" doesn't exist anymore.
Use whatever names you want for your music. So long as you prefix the lumps with O_ or D_, it doesn't matter anymore.
DISCLAIMER: Linedef type 413 (change music) and Lua scripting is not tested.

(cherry picked from commit 025ca413a2a01a8ec7c104748c2f510e350aa457)

# Conflicts:
#	src/p_user.c
2016-02-09 02:48:33 -08:00
Alam Ed Arias 3ba827f33d Merge branch 'master' into travis-ci 2016-02-07 00:39:25 -05:00
Alam Ed Arias 07fc74eaf5 clang: fixup a few clang warnings 2016-02-05 22:38:40 -05:00