Commit graph

182 commits

Author SHA1 Message Date
X.organic
f009b3d8c9 Fix use-after-frees around mobjs 2022-09-03 02:58:47 +00:00
toaster
4f58842804 Merge branch 'next' into public_next
# Conflicts:
#	src/i_tcp.c
2022-07-09 20:31:49 +01:00
Eidolon
bf3748110c Copy tracer interp state for Jawz reticle 2022-05-06 10:11:08 -05:00
Eidolon
8f354ad9c1 Implement Uncapped (squashed)
Co-Authored-By: Sally Coolatta <tehrealsalt@gmail.com>
Co-Authored-By: James R <justsomejames2@gmail.com>
Co-Authored-By: Monster Iestyn <iestynjealous@ntlworld.com>
Co-Authored-By: katsy <katmint@live.com>

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 54148a0dd0 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.
2022-05-01 17:35:30 -05:00
toaster
19ac63bd6c Fix for beocming a spectator while an SPB is on your trail having it continue to follow you around. Done here because it's related to spectators messing up other people's fun. 2021-12-08 20:57:52 +00:00
Sally Coolatta
7d380c326b Merge branch 'master' into next 2020-08-23 04:44:27 -04:00
FlykeSpice
00137ef4ea Remove ESLOPE #ifdef(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
Snu
6b5eebe54a Use P_SetTarget instead of fast->target 2020-05-14 04:17:24 +01:00
Snu
f24340f46a add targets to MT_FASTLINEs spawned to tell what they're spawned from 2020-05-14 03:13:00 +01:00
Latapostrophe
ee91c4e445 Merge branch 'fix-double-bombs' into awful-mix 2020-04-05 22:30:43 +02:00
Latapostrophe
549eabe9e4 I'm dumb, don't check for flashtics here... 2020-03-22 13:08:46 +01:00
Latapostrophe
4f24f1ae5b Merge branch 'spb-blockmap-fix' of git.magicalgirl.moe:KartKrew/Kart-Public into awful-mix 2020-03-13 22:38:20 +01:00
Latapostrophe
245ac55654 This flag shouldn't have been applied there 2020-03-13 13:50:22 +01:00
James R
fdb54d8e80 Apply BMBOUNDFIX to A_MineExplode 2019-10-15 23:29:02 -07:00
Latapostrophe
9cdd8d85c8 Fix bombs exploding twice in the same frame 2019-08-12 00:14:01 +02:00
James R
6d4cdfaab7 Fix compiler errors
The truncation handling in this one spot is okay, but the compiler isn't smart
enough for it. I'm leaving it as a warning because I'd like to make a dedicated
function for handling snprintf truncation in the future.
2019-05-28 15:11:37 -07:00
Latapostrophe
a40ff75025 SPB intangibility 2019-05-17 03:55:23 -05:00
TehRealSalt
f720dd3ddb Merge v1 2019-05-06 21:23:29 -04:00
TehRealSalt
7bfc394792 Fix normalspeed
Alright fuck this branch it's misery
2019-05-02 02:58:34 -04:00
TehRealSalt
201466b1c1 Merge v1 2019-05-02 01:36:19 -04:00
Latapostrophe
5619e63e39 Fix SPB being way too fast in current sections where the player has no control 2019-04-22 20:40:17 -05:00
TehRealSalt
1f61397545 Huge splitscreen refactor
Did not get to finish all refactoring or even compile this, I'll continue later
2019-04-18 03:08:11 -04:00
fickleheart
7fc1f02b07 Merge remote-tracking branch 'remotes/upstream/master' into new_netreplays
# Conflicts:
#	src/doomdef.h
#	src/g_game.c
#	src/p_user.c
2019-03-19 22:17:25 -05:00
wolfy852
b9264821a2 Merge branch 'upsidedown-brain' into next
# Conflicts:
#	src/k_kart.c
#	src/k_kart.h
2019-02-17 20:45:12 -06:00
fickleheart
78adae109a [WIP, CRASHES] Save ghost data in netreplays 2019-02-16 12:42:24 -06:00
Sally Cochenour
3cb468aec8 Add delay to Jawz target switching, set Jawz target when fired 2019-01-30 15:39:29 -05:00
Latapostrophe
4261e0b61a Start of a fix for antigrav 2019-01-30 00:30:48 +01:00
TehRealSalt
0b299012f7 Reduce easing time, revert changing air speed 2019-01-14 21:37:53 -05:00
TehRealSalt
7d1e630007 Tiny SPB fixes
- Fix typo that could potentially invalidate the wait phase
- Prevent dying during target phase causing it to redirect to someone else
- Ease speed back up to default whenever slowed down
- SPB intensity now biases against high drift sparks + acceleration, instead of only acceleration.
- Slow speed is scaled w/ SPB intensity too
2019-01-14 02:01:00 -05:00
SeventhSentinel
7e936d18d2 Merge branch 'master' into mobj-scale-global 2018-12-27 13:58:42 -05:00
SeventhSentinel
6d19be6412 Make SPB follow the same rules too 2018-12-13 09:34:27 -05:00
SeventhSentinel
2422501ab9 Add a mapobjectscale global
Should be no different than it was before, now it's just less tedious to type :V
2018-12-12 21:55:59 -05:00
SeventhSentinel
bbf8222767 Stupid Orbinaut bullshit
- Fix Orbinaut/Jawz not accepting top speed changes (This means back-spam being slower now for real works, and the speed buff on boosters for real works.)
- Make the top-speed buffs for boosters not work for back-spam
2018-12-12 21:25:18 -05:00
TehRealSalt
9598995150 Un-nerf Mines on activation tic 2018-11-30 03:09:49 -05:00
TehRealSalt
5534017954 Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
TehRealSalt
ecba6a0cb4 Nerf activation range of Mines, keep explosion radius 2018-11-28 02:31:16 -05:00
TehRealSalt
4ad32b23d9 Find bestrank for 7 sec limit enforcement 2018-11-26 07:18:21 -05:00
TehRealSalt
b68a58d5b2 Make sure spbplace is set better during SEEKING 2018-11-25 20:24:47 -05:00
TehRealSalt
e82c7cb230 Make the WAIT phase work better with SPB rush 2018-11-25 20:23:09 -05:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
TehRealSalt
7dcc55951b Make absolute sure spbplace is set in the right places 2018-11-24 20:48:21 -05:00
TehRealSalt
d467399480 Keep track of the place SPB is following
This makes it so that if the SPB'd person is passed, then the person who's getting SPB'd won't get the increased item odds for the weird feedback loop.
2018-11-24 20:41:17 -05:00
TehRealSalt
d3a737f8c1 More SPB tweaks
- SPB can switch off if its target if that person lost the lead for 7 seconds
- Make sure lastlook gets reset when going back to SEEKING
2018-11-24 03:42:25 -05:00
TehRealSalt
3832ffcc42 Make SPB slightly fairer on conveyors
It is possible to outrun SPB on gramet now
2018-11-21 22:26:33 -05:00
TehRealSalt
f65a8796df SPB retargets the same person after death 2018-11-21 19:22:28 -05:00
TehRealSalt
93ab9850a3 Clean-up of unused/removed sfx, replacement of the last remaining Mario sfx, and new sfx in some spots
- Replaced eggitem landing sfx
- Replaced banana landing sfx
- Replaced item tossing sfx
- Replaced item clashing sfx
- Added sfx for drift spark tier changing
- Added sfx for brake drifting
- Reverted Mario Mode sound replacement back to vanilla
2018-11-11 17:30:30 -05:00
Sryder
6c0fae421c Literally a single compiler warning. 2018-11-04 17:37:18 +00:00
TehRealSalt
34baa5ae74 Mixed up validity check... 2018-11-03 22:53:12 -04:00
TehRealSalt
9ae9e7ec3a Check for valid source in A_JawzChase, change 1 target rule 2018-11-02 23:51:06 -04:00
TehRealSalt
5c1cc6e1df Merge branch 'master' into all_hardcode 2018-11-02 01:42:34 -04:00