Commit graph

2455 commits

Author SHA1 Message Date
Sally Coolatta
b5334e6b42 Move follower code to its own file 2022-05-23 00:23:46 -04:00
Sal
14053a55cd Merge branch 'tilttrack-absolution' into 'master'
Fix HUD tracking with viewrollangle

See merge request KartKrew/Kart!593
2022-05-23 00:25:34 +00:00
Sal
e492a04976 Merge branch 'lookback-snapback' into 'master'
Fix lookback interpolating

See merge request KartKrew/Kart!596
2022-05-23 00:19:50 +00:00
Sally Coolatta
6f42d84b2a Fix turn prediction in F12 2022-05-22 19:49:33 -04:00
toaster
946beabdf6 Fix lookback interpolating
# Conflicts:
#	src/p_setup.c
#	src/r_fps.c
2022-05-22 22:25:17 +01:00
Sally Coolatta
fa792e3378 Merge branch 'master' into turn-predict 2022-05-22 16:50:19 -04:00
Sally Coolatta
0dc472a255 Try resetting driftend 2022-05-22 15:38:08 -04:00
Sally Coolatta
51bde5c934 Merge branch 'master' into turn-predict 2022-05-22 14:42:54 -04:00
toaster
54b9f3b7cc Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/Sourcefile
#	src/f_finale.c
#	src/m_menu.c
#	src/y_inter.c
2022-05-22 17:22:49 +01:00
toaster
5b13d4f75d Repair character colors and followercolors via the menu, both visually and mechanically.
* Fully reimplement the MenuColor system from 2.2's codebase, so super and emerald colours are now inaccessible again.
* Add FOLLOWERCOLOR_ constants and internal loop support to M_GetColorBefore and M_GetColorAfter.
* Fix improper initialisation of certain menu colour data.
* Repair previously created (or manually-edited) profiles with invalid colours.
* Add an actual function to turn followercolor constants to effective values.
2022-05-22 16:57:26 +01:00
Sally Coolatta
83b5bfef59 Super Circuit hit confirms
After getting hit, you'll hear the person who hit you's hit confirm from any distance
2022-05-22 03:26:32 -04:00
toaster
48d451cfef Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/d_ticcmd.h
#	src/deh_soc.c
#	src/deh_soc.h
#	src/deh_tables.c
#	src/dehacked.c
#	src/f_finale.c
#	src/g_game.c
#	src/m_menu.c
2022-05-21 18:57:46 +01:00
toaster
9c0e793088 Incorporate some of the advances from tilttrack.
* Set view context in the player HUD loop inside `ST_overlayDrawer()`.
* The HUD code now gets all interpolated camera data from the view context instead of half-heartedly recreating it.
* Move Lua HUDlib data to the view context system instead of an else ladder.
* View roll support in HUD tracking, because the other changes made this trivial.
* Remove old_viewrollangle as it is now redundant.
2022-05-21 16:51:03 +01:00
toaster
38e6cba181 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into uncapped-absolution
# Conflicts:
#	src/f_finale.c
#	src/sdl/i_video.c
#	src/st_stuff.c
2022-05-21 13:40:20 +01:00
James R
8718d2c2f3 Merge branch 'rewrite-lightning' into 'master'
Lightning Shield fixes

See merge request KartKrew/Kart!589
2022-05-21 09:13:17 +00:00
Sally Coolatta
4b149c103c Bring back camera turn prediction
REALLY complicated, because just emulating player turning in ticcmd code is broken.
2022-05-21 03:11:37 -04:00
Sally Coolatta
6e8e0ad0f5 Lightning Shield fixs
- Rename to Lightning Shield (it keeps fucking me up when I want to kartgiveitem it to myself)
- Fix inflictors causing damage being considered damage hitlag. Fixes the player using Lightning Shield being in damage hitlag state (most notable in the DI branch because hurting someone with it lets you DI afterwards, which also fucks with your turning)
- Rewrote attack function to use custom blockmap search instead of P_NukeEnemies.
- It can no longer attack below you, only above & around you.
- Increased the attack radius, so that it actually lines up with the sprites...
- Fixed extremely inconsistent ring blockmap search by moving it to playerafterthink (don't ask me why)
- Rings get joulsted by Lightning Shield when you pass by them without
- Added MAXRADIUS to the blockmap checks for lightning shield & mines, to reduce blockmap inconsistencies
2022-05-20 18:12:34 -04:00
Sally Coolatta
56c23339be Directional Influence
Pretty much just copy+pasted from Snap the Sentinel!!
- Hold left/right to adjust the momentum angle after hitlag, up to 22.5 degrees. (Only angle can be adjusted, so you can't adjust your speed, only your direction.)
- It's relative to your angle, so sometimes you need to use forward/back, or even diagonals (forward/back throws now store full analog data for this to work)
- Bananas flip DI direction, to make them not baby easy mode
- Tumble has x3 DI (so angle adjustments of 67.5!!), and hitlag on each bounce to allow even more control.
2022-05-20 01:45:16 -04:00
toaster
0f0786617f Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/m_menu.c
2022-05-17 22:04:42 +01:00
James R
11f97049b1 Merge remote-tracking branch 'origin/master' into uncapped-absolution 2022-05-11 17:09:59 -07:00
Sally Coolatta
72d77f7fb5 Invincibility updates
- You flash white while in invincibility
- Invincibility is not rainbow UNTIL you go above the initial timer.
- Increased visibility of the shield effect around invincible players.
- Invincibility sparkles have trailing afterimages.
- Disabled invincibility speed lines; they now use the normal speedlines but grey/rainbow. (The code/sprites will be used for something later.)
- Using invincibility adds time, instead of setting it.
- Player hitbox is finally bigger, to actually match the shadow size.
2022-05-08 03:43:53 -04:00
Eidolon
f7ec2f182f Uncapped (squashed v2)
Squashed SRB2 2.2 Public uncapped without UDMF merge

Implement interpolation at the renderer level

Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.

Place Frame Interpolation in "Experimental" video options header

This seems like an appropriate way to describe the feature for now.

Add smooth level platter under interpolation, `renderdeltatics`

`renderdeltatics` can be used as a standard delta time in any place,
allowing for smooth menus. It will always be equal to `realtics`
when frame interpolation is turned off, producing consistent
framerate behavior everywhere it is used.

Add smooth rendering to save select screen

Add smooth rendering to Record/NiGHTS Attack, F_SkyScroll

Ensure viewsector is accurate to viewx/viewy

This fixes a potential crash in OpenGL when changing between levels.

Ensure + commands get executed before map start

Always have precise_t defined

Fix misc dropshadow issues

Reset view interpolation on level load

Remove unnecessary precipmobj thinker hack

Add reset interpolation state functions

Reset precip interpolation on snap to ceil

Reset mobj interp state on TeleportMove

Only swap view interp state if a tick is run

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames

Homogenize mobj interpolations

Add sector plane level interpolations

Add SectorScroll interpolator

Add SideScroll interpolator

Add Polyobj interpolator

Intialize interpolator list at a better time

Delete interpolators associated with thinkers

Interpolate mobj angles and player drawangle

Interpolate HWR_DrawModel

Add functions to handle interpolation

Much less code duplication

P_InitAngle, to fix angle interpolation on spawning objects

Fully fix drop shadows

It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.

Do not speed up underwater/heatwave effect in OpenGL

Closer OpenGL underwater/heatwave effect to Software

Interpolate from time of previous tic

Previously interpolated from last 35th of a second, which
may be offset from game time due to connection lag.

Consider this the proper fix to 6ecac4159a too.

Calculate FPS stuff even if frame is skipped

I decided ultimately to actually keep the frame skip optimization disabled, because I think it is actually a little bit helpful that you can still get accurate rendering perfstats while paused, however if we decide otherwise then we can have this optimization back without making the game act like it's lagging.

Keep rect in memory

Feel better about this than creating one all da time

Lots of FPS stuff

- Disabled VSync, due to the numerous problems it has.
- Instead, added an FPS cap.
- Frame interpolation is now tied to fpscap != 35.
- By default, the FPS cap is set to the monitor's refresh rate.
- Rewrote the FPS counter.

(This also consolidates several more commits ahead of this
fixing various issues. -eid)

Misc changes after Kart cherry-picks

Fix renderdeltatics with new timing data

Update mobj oldstates before all thinkers

Allow FPS cap values

Adjust how FPS cap is checked to improve FPS stability

Fix precip crash from missing vars

Improve the framerate limiter's timing for extreme stable FPS

Handle the sleep at the end of D_SRB2Loop instead of the start

Simplifies logic in the other parts of the loop, and fixes problems with it frequently waiting too long.

Reset mobj interp state on add

Add mobj interpolator on load netgame

Move mobj interpolators to r_fps

Dynamic slope interpolators

I_GetFrameTime to try and improve frame pace

(It doesn't feel that much better though.)

Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code

Fix plane interpolation light level flickering

Fix flickering plane interpolation for OpenGL in the exact same way

Funny OpenGL renderer being at least 50% copy-pasted Software code :)

P_SetOrigin & P_MoveOrigin to replace P_TeleportMove

Convert P_TeleportMove use to origin funcs

Revert "P_InitAngle, to fix angle interpolation on spawning objects"

This reverts commit a80c98bd164a2748cbbfad9027b34601185d93f5.

Waypoint polyobjects interpolate z & children

Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)

Reset overlays interp states each TryRunTics

Interpolate model interpolation (lol)

Use interp tracer pos for GL linkdraw

Papersprite angle interpolation

Makes the ending signpost smooth

Move intermission emerald bounce to ticker

Bring back shadows on polyobjects

Also optimizes the method used so rings can show their shadows too. Using just the subsector is a tad bit imprecise admittedly but any more precise methods get really laggy.

Fix a bunch of ticking in hu_ drawing functions

Revert "Reset overlays interp states each TryRunTics"

This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.

Move intro ticking out of the drawer

Adjust 1up monitor icon z offsets

Fixes interpolation issues with 1up monitors.

Delta time choose player menu animations

Add drawerlib deltaTime function

Interpolate afterimages further back

Use old sleep in dedicated mode

Clamp cechotimer to 0

Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).

Revert "Remove unnecessary precipmobj thinker hack"

This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.

Fix frame pacing when game lags behind

The frame timestamp should've been made at the start of the frame, not the end.

Fix I_FrameCapSleep not respecting cpusleep

Jonathan Joestar bruh

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.

Make Lua TeleportMove call MoveOrigin

Reset Metal fume interp state on appear

Add interpdebug

Put interpdebug stuff in perfstats instead

Add timescale cvar

Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!

Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!

Force interpolation when timescale != 1.0

Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.

Fix cutscenes in interp

Fix boss1 laser in interp

Interpolate mobj scale

Precalculate refresh rate

Slower PCs can have issue querying mode over and over. This might kinda suck for windowed mode if you have different refresh rate displays but oh well

Fix interp scaling crashing software

Reset interp scale when Lua sets .scale

Disable angle interp on fresh mobjs

Fix interp scale crash for hires sprites

Interp shadow scales

Copy interp state in P_SpawnMobjFromMobj

Fix multiplayer character select

Don't interpolate mobj state if frac = 1.0

Fix Mario block item placement

Interpolate spritescale/offset x/y

Fix offset copies for SpawnMobjFromMobj

THANKS SAL

Add Lua HUD drawlists

Buffers draw calls between tics to ensure hooks
run at the originally intended rate.

Rename drawerlib deltaTime to getDeltaTime

Make renderisnewtic is false between tics

I know what I'm doing! I swear

Completely refactor timing system

Time is now tracked internally in the game using I_GetPreciseTime
and I_UpdateTime. I_Time now pulls from this internal timer. The
system code no longer needs to keep track of time itself.

This significantly improves frame and tic timing in interp mode,
resulting in a much smoother image with essentially no judder at
any framerate.

Ensure mobj interpolators reset on level load

Ensure view is not interpolated on first frame

Disable sprite offset interpolation (for now)

Refactor timing code even more

System layer is greatly simplified and framecap
logic has been moved internally. I_Sleep now
takes a sleep duration and I_SleepDuration
generically implements a precise sleep with spin
loop.

Adjust spawned mobj z by gravity inversion

Only check VERTICALFLIP for old_z calc

Fix Marathon Mode menu for uncapped

Move screenshot code before timing

Only play emerald hunt sounds on new tics

Restore deleted zofs (fixes signpost sparkles etc)

Revert to before screenUpdate boolean was added

Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.

Run UpdateLevelInterpolators in preticker

Fixes KartKrew/Kart-Public#10

Run UpdateMobjInterpolators in preticker

Reset view interp in preticker

Add per-split player view resets
2022-05-06 22:47:39 -05:00
Sally Coolatta
bb510a6a67 Rename to "stumble" :D 2022-04-02 02:01:39 -04:00
Sally Coolatta
794090d026 Make more lenient on the ground 2022-04-02 01:20:23 -04:00
toaster
4cc587b5b2 * Make the scrolling text on the menu interpolate.
* Replace the shitty vidwait option with Sal's shiny new fpscap option.
* Update the item toggles menu for all the new items (and re-enable shitsfree for the new empty spots).
2022-03-29 21:08:36 +01:00
toaster
73dabaeab6 Merge branch 'master' into new-menus
# Conflicts:
#	src/d_clisrv.c
#	src/deh_soc.c
#	src/lua_baselib.c
#	src/m_cheat.c
#	src/m_menu.h
#	src/y_inter.c
2022-03-29 17:14:38 +01:00
Sally Coolatta
f3bb8833a1 Tumble when not landing upright on slopes 2022-03-28 17:10:27 -04:00
toaster
1beee50942 Fixed the conditions where bad splitscreen player reads were occuring in P_EndingMusic.
Was only evident when someone joined and then left the 3p or 4p position of party, which is why we didn't discover it in testing.
2022-03-27 20:19:10 +01:00
toaster
babf630587 Set the target of a spawned ghost to where it came from.
# Conflicts:
#	src/p_user.c
2022-03-18 13:42:57 +00:00
toaster
a45b163bd1 Make P_EndingMusic *also* operate on local players rather than display players. 2022-03-12 19:32:03 +00:00
toaster
31db72256d Merge branch 'master' into boss
# Conflicts:
#	src/y_inter.c
2022-03-12 19:24:23 +00:00
toaster
65feacc16c Merge branch 'musicataparty' into 'master'
Music at a party

See merge request KartKrew/Kart!543
2022-03-12 18:40:03 +00:00
toaster
f794908430 Merge branch 'followtweak' into 'master'
Follower adjustments

Closes #202

See merge request KartKrew/Kart!514
2022-03-12 18:37:15 +00:00
toaster
f518ae5c58 * Fix some music and visual bugs with dying in Battle at the conclusion of the round.
* Fix emeralds HUD overlapping minimap in 2P splits.
2022-03-06 18:19:28 +00:00
toaster
61577e5026 * Re-enable kickstartaccel in battle.
* Add a little "ding" sound and HUD dorito bounce when your kickstartaccel reaches max, so you can let go of accelerate/know when you need to tap to stop.
* Make the name on top of the boss healthbar only show up once the titlecard is over.
* Properly reset boss healthbar fill between maploads.
2022-03-01 18:18:01 +00:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
James R
82377fb001 Merge branch 'invinc-color-fix' into 'master'
Invinc color fix

See merge request KartKrew/Kart!553
2022-02-17 07:59:29 +00:00
Sally Coolatta
39da886447 Merge branch 'master' into invinc-color-fix 2022-02-16 23:01:23 -05:00
Sally Coolatta
a750fdd810 Invincibility wasn't using K_RainbowColor anymore, what the function was designed for... 2022-02-16 23:01:07 -05:00
James R
9095261a18 POSITION music
Play SA2 "shwing" at title card; play POSITION music once
camera is steady (instantly in 1v1).

Encore: play portal warp sound instead of "shwing"; play
portal drone instead of POSITION music, always start
instantly.
2022-02-15 15:51:47 -08:00
James R
f749424de7 Turn kstart into sfx 2022-02-14 15:04:30 -08:00
SinnamonLat
13fb905190 Let ThunderShield combo players 2022-02-14 14:29:55 +01:00
Sally Coolatta
9e5b70ad8f No flashing tics in Battle 2022-02-14 14:26:41 +01:00
Sally Coolatta
a7788f1047 Add terrain splashes 2022-02-14 14:26:39 +01:00
Sally Coolatta
97b45612df Add footstep particles 2022-02-14 14:26:36 +01:00
Sally Coolatta
c355537676 Implement splash & footstep blocks, commentate more of the code
They do nothing atm, but they can be set properly now :)
2022-02-14 14:25:38 +01:00
Sally Coolatta
bfaefe4ee5 P_InitAngle, to fix angle interpolation on spawning objects 2022-02-14 14:22:29 +01:00
toaster
006b6f00ac Rewrite the awayview reset for both Got_Teamchange and P_SpectatorJoinGame. 2022-02-11 12:09:00 +00:00
toaster
913610b1b7 Fixed P_RestoreMusic using displayplayers instead of local players (did not use any of the functions directly and so was missed). 2022-02-11 10:38:16 +00:00
toaster
4567d9c57f Fix allowteamchange (although this code wasn't being run, it still SHOULD return early...) 2022-02-11 00:35:11 +00:00