Commit graph

122 commits

Author SHA1 Message Date
NepDisk
bd6b529b01 Global init
these were found by alug
2026-01-17 02:04:31 -05:00
NepDisk
ba2b525172 Remove CLIENTMIS
based on this commit from SRB2Classic 5d977d4297
2025-12-24 12:22:59 -05:00
Lactozilla
ea16baa1a1 Merge branch 'push-back-acktosend' into 'next'
Clean up d_net.c and push back missed acks to acktosend (Chatbug attempt 3)

See merge request STJr/SRB2!2591
2025-12-16 01:26:11 -05:00
NepDisk
72e5148ce6 Revert "netcode: replace some stuff with memsets + add a little bounds safety in some places"
This reverts commit b964df8137.
2025-12-11 20:59:05 -05:00
GenericHeroGuy
bcb0eb95cc More fastcmp cleanup 2025-12-11 21:58:37 +01:00
NepDisk
6d6cb09280 Convert most strcmp/stricmp to fastcmp/fasticmp 2025-12-11 13:00:32 -05:00
Alug
f792afd288 try to fix nodes being occupied if connection didnt recieve any acks
partial port from srb2classic
2025-12-11 10:17:49 -05:00
Alug
b964df8137 netcode: replace some stuff with memsets + add a little bounds safety in some places 2025-12-11 09:56:05 -05:00
NepDisk
c4fdeeb4b0 Revert "Expand textcmd size byte to 16-bit word"
This reverts commit 039a73ce6482b9724a20466f71acae6056fb690b.
2025-12-09 20:37:41 -05:00
NepDisk
ffaac79a80 'fix' some undefined behaviour 2025-12-09 20:19:08 -05:00
NepDisk
e346443551 Fix undefined behaviour in HSendPacket 2025-12-09 19:26:26 -05:00
NepDisk
d4ed32a799 Port packetloss cycles commit as well 2025-11-17 03:49:35 -05:00
NepDisk
fcba6319d3 Port SRB2Classic Packetloss indication logic 2025-11-17 03:40:15 -05:00
NepDisk
d7ed03fab9 Remove M_Memcpy
Was quite literally a wrapper that did nothing.
2025-11-08 02:00:30 -05:00
NepDisk
50c7019f44 Add KZ speedometer and fix many compiler warnings 2025-09-12 19:43:43 -04:00
NepDisk
69ad164bbc Get rid of netbuffer global
Thx SRB2classic
2025-08-13 19:49:22 -04:00
NepDisk
24ab3fa171 RR Packetloss display Port 2025-07-22 18:51:59 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
NepDisk
6ac11da6e4 Try to fix issues with clients locking up due to never receiving acks back in case of dropped packets
https://github.com/Indev450/SRB2Kart-Saturn/pull/151
2025-06-28 22:53:20 -04:00
Alug
c0b1458acc bugfixes for sock stuff + kinda fix ipv6
thx srb2!
sadly we cannot really make use of ipv6 since vanilla clients cant really handle stuff well ontop of the server browser not supporting them anyways, sad!
its probably better to just disable ipv6 compile completely
however this also has minor cleanups and bugfixes for ipv4 too (server browser now should work proper if you rerfresh it often and then close and open it again etc)
2025-04-02 16:24:54 -04:00
Alug
a3b50ad518 better check for destinationnode 2025-04-02 16:12:48 -04:00
James R
febde8d181 Remove NONET 2025-02-25 00:31:59 +01:00
toaster
a9f1408376 Remove mapname buffer from serverinfo_pak 2025-02-11 15:28:17 +01:00
James R
9e801c66d5 Merge branch 'universal-typedef' into 'master'
Move all typedef into one file

See merge request KartKrew/Kart!791
2024-10-15 04:16:58 -04:00
NepDisk
3de35a78d4 Use qs22j for qsort 2024-09-05 03:11:40 -04:00
James R
05ff2f9ce9 Expand textcmd size byte to 16-bit word
Raises hard limit from 255 to 65535
2024-08-21 15:43:03 -04:00
Sal
a4d475dc4c Merge branch 'hostcode' into 'master'
HOSTCODE initial pass

Closes #240

See merge request KartKrew/Kart!615
2024-07-31 03:01:45 -04:00
toaster
287dd0bed5 Merge branch 'asan-internal' into 'master'
ASAN fixes for Internal

See merge request KartKrew/Kart!678
2024-07-31 02:12:15 -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
LJ Sonic
4b1ba2974d Do not attempt to disconnect when a packet checksum is invalid 2022-03-18 20:35:07 +00:00
James R
59c04ae041 pedantic: resolve flexible array member in nested struct
ISO C forbids a structure that has a flexible array member
to be a member of another structure or element of an
array.

filetx_pak and fileack_pak are two such structures. These
have been removed from doomdata_t's union.
2022-02-20 03:10:27 -08:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
James R
c8d4ef64f9 Hole punching 2020-11-12 17:08:34 -08:00
Louis-Antoine
8471f9e71f Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into resend-gamestate
# Conflicts:
#	src/d_clisrv.c
#	src/d_clisrv.h
#	src/d_net.c
#	src/p_saveg.c
#	src/p_saveg.h
2020-08-13 13:53:10 +02:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
Sally Coolatta
6ddae4728f Merge d_net.c 2020-08-02 14:15:29 -04:00
LJ Sonic
05e8d12427 Merge branch 'next' into 'better-download'
# Conflicts:
#   src/sdl/i_system.c
#   src/win32/win_sys.c
2020-06-01 08:16:53 -04:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
Louis-Antoine
dc527a8afb Use per-node reference tics in ExpandTics 2020-05-17 20:23:07 +02:00
Louis-Antoine
24bd03cd22 Store starttic as a raw value in PT_SERVERTICS packets
This avoids some desynch issues and is simpler to handle.
Those packets are always big anyway, so the difference is irrelevant.
2020-05-17 20:09:11 +02:00
Louis-Antoine
ebeac311af Add missing packet name 2020-05-16 23:22:33 +02:00
Louis-Antoine
c221b76716 Rewrite file transfer code
This code uses a custom packet acknowledgement system,
which is more suited for file transfer and does not suffer from
the small sender window used by the default acknowledgement system
2020-05-16 22:09:00 +02:00
Wolfy
f35bdf3bb7 Revert basically every attempted join passwords fix 2020-04-26 01:20:46 -07:00
James R
6613b19220 Merge remote-tracking branch 'lat/remove-passwords' into awful-mix-fucked 2020-04-26 01:16:27 -07:00
Wolfy
7444dd34ab Add PT_CLIENTCMD back to allowed packet types
Fixes unexpected CLIENTCMD prints
2020-04-07 07:09:51 -05:00
Wolfy
6ea0492008 Potentially fix join passwords 2020-04-05 18:57:47 -05:00
Wolfy
e6d7af623a Revert "PT_CLIENTCMD test"
This reverts commit e2feca3dc7.
2020-04-05 17:18:22 -05:00
Wolfy
e2feca3dc7 PT_CLIENTCMD test 2020-04-05 17:01:40 -05:00
Wolfy
2c54c32eb3 Fix packet type desync 2020-04-05 16:11:30 -05:00
Latapostrophe
29781688e8 Merge branch 'v1-ignore-posthumous-ackret' into awful-mix 2020-04-05 11:23:49 +02:00