Commit graph

6398 commits

Author SHA1 Message Date
Sally Coolatta
d45390f617 Fix lookback interpolating 2022-05-01 23:25:11 -04:00
Sally Coolatta
b5b2810838 Create scores drawlist 2022-05-01 23:11:14 -04:00
Sally Coolatta
bf2b8490ea Partially port newer sky rendering
Not the cause of the black sky bug, but doing this helped me diagnose it & it's cleaner
2022-05-01 21:48:48 -04:00
Sally Coolatta
c35985d595 Fix src_rect size not being init
Fixes Software being a blank screen
2022-05-01 21:07:00 -04:00
Sally Coolatta
c96855f59c Use newer CVar setting code
Fixes weirdness with the named values in fpscap
2022-05-01 21:01:19 -04:00
Sally Coolatta
1ab5a46256 Fix old shadows interpolation 2022-05-01 20:40:51 -04:00
Sally Coolatta
c72f959d5c Fix mixed declarations & code 2022-05-01 20:15:52 -04:00
Sally Coolatta
73a35d3280 Poor whitespace on libd_fadeScreen + const variable that needs changed 2022-05-01 20:15:05 -04:00
Sally Coolatta
ea30cfd8f8 Fix refresh rate on mode change 2022-05-01 20:08:02 -04:00
Sally Coolatta
6a7b43aa2e Fix shadowed declaration 2022-05-01 20:05:35 -04:00
Sally Coolatta
adcdb7f711 Remove unused variable
Makes me unable to compile with harsh compiler settings
2022-05-01 20:00:41 -04: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
JugadorXEI
2864547dc9 banishing hell map forcing 2022-03-30 15:25:35 +02:00
Sal
92c7a1dc80 Merge branch 'freeslot-increase' into 'next'
Freeslot increase

See merge request KartKrew/Kart-Public!268
2022-03-29 22:35:53 +00:00
Sal
750b8bfe20 Merge branch 'load-logging-improvements' into 'master'
Small logging improvements for addon loading

See merge request KartKrew/Kart-Public!272
2022-03-29 22:22:14 +00:00
Sal
7d5a499f38 Merge branch 'small-download-tweaks' into 'master'
Few small tweaks to the connection screen

See merge request KartKrew/Kart-Public!262
2022-03-29 22:19:16 +00:00
Sal
4cec473d6f Merge branch 'cvar-default-suggestions' into 'master'
A few cvar default suggestions

See merge request KartKrew/Kart-Public!263
2022-03-29 22:19:02 +00:00
Sal
7b113b5f39 Merge branch 'Rocket-sneaker-cleanup' into 'next'
Properly detach rocket sneakers when the player dies

See merge request KartKrew/Kart-Public!271
2022-03-29 22:18:30 +00:00
Sal
4d6c57551c Merge branch 'discod-join-minor-improvements' into 'master'
Discord joins now force menu close and title demo stop

See merge request KartKrew/Kart-Public!270
2022-03-29 22:17:55 +00:00
Sally Coolatta
6c8938af6b not on player join 2022-03-29 17:17:57 -04:00
Sally Coolatta
a031998f5f Fix compile errors 2022-03-29 15:46:02 -04:00
Sally Coolatta
fce57a1027 startedInFreePlay 2022-03-29 15:42:31 -04:00
U-DESKTOP-Q6QDT0F\PC
abd7ecef72 from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/840?commit_id=0d92bf3dd09cd4712a63fc79cc7520ed18556bf6 2022-03-23 08:18:56 -03:00
U-DESKTOP-Q6QDT0F\PC
46b1effacd from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1192 2022-03-23 08:18:56 -03:00
minenice55
a88c115b84 port P_CheckSight from vanilla
mostly a copy/paste job, this fixes issues with certain sloped surfaces improperly obstructing sight (ported files from srb2 commit 4c9b83b6bdd8cd3e2626505940de75668e3db0c2)
2022-01-11 19:52:50 -05:00
toaster
71d49bcc3b With Sal's feedback, make nospectategrief get set 20 seconds into the map, not on lap 3 2021-12-15 23:21:43 +00:00
toaster
d398698729 Per Sal's request (slightly modified):
* Do not allow any joining spectators if anybody got onto the last lap while not in FREE PLAY (this is the same condition as nospectategrief, for consistency).
* Reset nospectategrief to 0 if there is literally nobody playing, to prevent a fully locked-out server.
* This means it's not a problem to reset spectatorreentry even with the map command.
* Change the default for spectatorreentry to 30 seconds, from 60.
2021-12-15 17:28:31 +00: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
toaster
bac683085c Disable the "%s became a spectator" message if you haven't actually entered the game, to prevent an avenue for spam. 2021-12-04 15:59:24 +00:00
toaster
d557b7f962 Allow antigrief to be tested in dev builds (copy of internal commit) 2021-12-03 20:41:57 +00:00
toaster
375a635c8a Merge branch 'spectator-little-things' of https://git.do.srb2.org/KartKrew/Kart-Public.git into public_speclil 2021-12-02 18:07:50 +00:00
toaster
71f2d638e6 Merge branch 'next' of https://git.do.srb2.org/KartKrew/Kart-Public.git into public_next
# Conflicts:
#	src/f_finale.c
2021-12-02 17:42:50 +00:00
James R
1cd08dc5f1 Add Ivo's name to the credits 2021-11-29 14:05:33 -08:00
James R
07d5cbcab0 Remove name at contributor's request 2021-11-29 13:53:45 -08:00
SteelT
fd88c139a6 Merge branch 'master' into next 2021-11-21 16:01:29 -05:00
SteelT
651d04f91b Merge branch 'opulence' into 'public_next'
Add Opulence objects

See merge request KartKrew/Kart!442
2021-11-04 22:31:12 +00:00
Ashnal
55055b7536 Small logging improvements for addon loading
Adds back the "Loading file" message when a file is loaded
Adds individual file errors for things loaded with W_InitMultipleFiles (-file param)
Errors for a given file will now appear between "Loading file" and
the "Added file" or "not adding file" messages, making troubleshooting easier
2021-09-25 18:04:46 -04:00
Ashnal
f4bf6edfe6 Properly detach rocket sneakers when the player dies
This includes both death pits and spectating
2021-09-12 23:06:18 -04:00
Ashnal
a2900c8811 Discord joins now force menu close and title demo stop
This prevents wierdness from ahving the menu open on teh connection screen
It also prevents the connect command from erroring due to being in a demo
2021-09-10 20:25:13 -04:00
JugadorXEI
ab2bbf3b08 validation against mo (guards against delays) 2021-09-07 22:09:03 +02:00
Ashnal
d303f1b203 Increase Mobj Freeslot limit to 1024 from 512 2021-09-06 16:51:34 -04:00
Ashnal
c8cec767d5 Upgrades P_PatchInfoTables to use 4 digit tempnames, suppoing up to 9999 freeslots 2021-09-06 16:41:50 -04:00
Ashnal
6e7bdc6031 Changed readfreeslots error checking to work like lib_freeslot
Uses loop variable to determine error condition
Also small change to lib_freeslot for SFX for consistent use of I_Error
2021-09-06 16:12:33 -04:00
Ashnal
4b750e0504 Adjust S_AddSoundFx to also use I_Error when exhausting Freeslots 2021-09-06 16:12:13 -04:00
Ashnal
f5bcfc6379 Add I_Errors for when the game exhausts all freeslots of any type. 2021-09-06 16:11:57 -04:00
SteelT
82b1499eb0 Merge branch 'master' into next 2021-09-05 01:30:12 -04:00
James R
0fc6ae9873 Update rendezvous server to kartkrew.org 2021-08-30 20:02:54 -07:00
James R
0f122fd5dd Don't accept hole punch requests to local network 2021-08-30 19:00:28 -07:00
James R
64ff789f2f Add my full name 2021-08-30 18:45:56 -07:00
James R
eab8f99eab Document the hole punching protocol 2021-08-30 18:31:17 -07:00
James R
df59f3580d Don't do anything hole punching related if rendezvousserver is unset 2021-08-30 18:27:52 -07:00
James R
307cdf7039 Don't request hole punch to self, and don't register local server for hole punching 2021-08-30 16:52:15 -07:00
James R
b5086b848b Ignore zero length packets 2021-08-30 16:52:14 -07:00
James R
ba5b6aa7af Hole punching 2021-08-30 16:52:13 -07:00
lachablock
4ed6c3665a Add missing explicit break 2021-08-20 20:03:55 +10:00
Ashnal
452390872b Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into HEAD 2021-08-19 22:50:50 -04:00
Ashnal
dc447c07e9 A few netgame default improvements
Increase timeouts by a few seconds, helps folks joining with slow disks
Beef up the vanilla downloader settings
2021-08-19 22:41:50 -04:00
Ashnal
b0724506bb Set drift and item default axis binds to None 2021-08-19 22:22:23 -04:00
Ashnal
a35d4ea5f4 Switched checking files mode to use a progress bar
Changed the confirmation prompt use MB if >=10MB
Changed the ovearall progress bar to use MB if >=10MB
2021-08-19 21:49:40 -04:00
JugadorXEI
1d62fb8eb3 Fix duplicated matchgenericflags (was causing crash) 2021-08-07 16:41:22 +02:00
lachablock
98142864d7 comment formatting 2021-07-24 19:16:28 +10:00
lachablock
62529f748a Add Opulence objects 2021-07-24 19:08:04 +10:00
SinnamonLat
c839a7c5d8 Fix mixed declaration in K_KartDrift while i'm at it 2021-07-10 12:09:52 +02:00
SinnamonLat
c149ee441a Fix item throws and startboost scale in mobjscaled maps 2021-07-10 12:08:54 +02:00
Sal
a0f0b473ab Merge branch 'more-fixes-jug' into 'next'
Various gameplay & stability fixes

See merge request KartKrew/Kart-Public!256
2021-07-06 13:42:41 -04:00
JugadorXEI
4fdbfb1dc2 Abstain from handling connections instead if the level is loading 2021-05-30 23:36:07 +02:00
JugadorXEI
63f87b4cec Use toaster's approach to fix 0th position 2021-05-30 18:45:38 +02:00
JugadorXEI
4d8d5d7fa9 More robust check against yellow springs on grown players. 2021-05-30 18:28:27 +02:00
JugadorXEI
2c1d5a72b6 We use FRACBITS out there 2021-05-28 16:43:09 +02:00
JugadorXEI
733cf20a10 Set GS_LEVEL after level load, set GS_WAITINGFORPLAYERS during level transition if GS_LEVEL is current GS 2021-05-28 16:32:21 +02:00
JugadorXEI
dfc942a628 Removed superfluous logic that was causing midair drift charge to disappear 2021-05-20 20:21:08 +02:00
JugadorXEI
df769a13e4 Fix grown players no spark/wrongdrift interaction with yellow spring panels 2021-05-20 19:39:32 +02:00
JugadorXEI
bf911d02cb Thunder Shield now has COOLDOWNONSTART 2021-05-20 19:24:56 +02:00
JugadorXEI
e123f4bd53 Fix 0th position bug 2021-05-19 23:19:43 +02:00
JugadorXEI
5882338192 Fix rare sink crash, fix jawz particles hang, fix magnet landing 2021-05-06 03:10:01 +02:00
Sally Coolatta
83349b2473 Not while flashing 2021-04-13 02:06:57 -04:00
JugadorXEI
ea56bd472c Simply return address, don't allow self_ip to be possibly written as something else 2021-04-13 06:56:14 +02:00
JugadorXEI
d7e8642236 Discord Invite Fixes + DUMPCONSISTENCY flag for makefile 2021-04-13 00:33:06 +02:00
Sal
6e33b5281d Merge branch 'discord-invite-fix' into 'master'
DRPC: Wait for join secret to be ready

See merge request KartKrew/Kart-Public!248
2021-04-07 17:47:59 -04:00
Sal
977917e61d Merge branch 'no-gamma-shortcut-v1' into 'master'
Replace gamma shortcut with a fullscreen toggle

See merge request KartKrew/Kart-Public!254
2021-04-07 17:42:53 -04:00
Sal
4c1ae5d649 Merge branch 'mines-no-fullbright' into 'next'
Mines lost their fullbright between inception and v1 release

See merge request KartKrew/Kart-Public!253
2021-04-07 17:38:52 -04:00
Sally Coolatta
4f5d5500f2 Merge branch 'next' into spectator-little-things 2021-04-07 17:14:54 -04:00
Sally Coolatta
a70faeccff Merge branch 'master' into next 2021-04-07 17:14:30 -04:00
Sally Coolatta
967a85db81 Merge branch 'master' into spectator-little-things 2021-04-07 17:14:09 -04:00
Sally Coolatta
163b215b0a Merge branch 'next' into spectator-little-things 2021-04-07 17:14:02 -04:00
Sally Coolatta
35b83ead37 Mines lost their fullbright between inception and v1 release
I got so mad about this I brought the fix to v1 also
2021-04-07 03:16:27 -04:00
Sal
967cff1281 Merge branch 'ogl-respawn-fix' into 'master'
Fix unnecessary texture reloads on respawn in opengl

See merge request KartKrew/Kart-Public!251
2021-03-21 04:02:37 -04:00
toasterbabe
3be489f6dd Fix crash on loading level without a header.
(cherry picked from commit 7556b407b247a9bfb9420781b8fa1ac4facce07d)
2021-03-20 20:58:03 -07:00
Sally Coolatta
6573904ec5 Fuck the gamma shortcut, replace it with a fullscreen toggle 2021-03-12 11:55:54 -05:00
Hannu Hanhi
dbf744845d Fix unnecessary texture reloads on respawn in opengl by removing unneeded V_SetPalette calls 2021-03-12 18:52:58 +02:00
Ashnal
f01697bfdb Prevent the connection from being canceled when in Record Attack
Fixes a crash that can happen when starting RA attempts if you press
keys/buttons that would cancel a netgame connection
2021-03-08 00:48:15 -05:00
Sally Coolatta
ffec5f632b Merge branch 'master' into next 2021-02-27 00:38:43 -05:00
Sally Coolatta
3f150fbe05 If the join secret isn't ready right away, wait for the next update instead of trying to loop for it again immediately
I believe this may be the cause of the invite crash some people have noticed in master, but I'm not sure, needs tested.
2021-02-27 00:37:15 -05:00
himie
1f5e9fd802 Add large address aware flag
This allows the final exe to use more than 2gb of RAM in a 64-bit system
which should get rid of most out of memory errors on 32-bit builds
2021-01-25 17:00:09 -06:00
James R
1a3e883b4e Lua: "defrosting" global to tell how many tics are processing in the preticker 2020-11-24 19:32:01 -08:00
James R
6533a728db Always unmute music on refocus
If the game is paused, music will be resumed when unpause anyway.
2020-11-13 17:30:23 -08:00
Sal
5ec44ba3fa Merge branch 'consoleplayer-dedicated' into 'next'
Fix not being able to access consoleplayer as a dedicated server + other more consistent checks

See merge request KartKrew/Kart-Public!240
2020-11-10 14:50:22 -05:00
Sal
4c5d69b714 Merge branch 'no-aprox-dist' into 'next'
Use R_PointToDist2 over FixedHypot, and FixedHypot over P_AproxDistance

See merge request KartKrew/Kart-Public!243
2020-11-10 14:50:08 -05:00
Sally Coolatta
c23364db12 Actually, lets just fix FixedHypot instead.
Now FixedHypot uses the code from R_PointToDist2, and R_PointToDist2 just calls FixedHypot.

Ultimately, this branch was intended to get rid of a redundant way to retrieve distance and replace it with the one that was actually good at its job. So consolidating FixedHypot and R_PointToDist2 together is just an extension of that.
2020-11-08 00:45:16 -05:00
Sally Coolatta
104208fc84 Use R_PointToDist2 instead
Apparently overflows less often
2020-11-07 23:56:46 -05:00
Sally Coolatta
3ad5c0af48 Merge branch 'master' into next 2020-11-07 22:21:53 -05:00
Sally Coolatta
d6c497065e Use FixedHypot over P_AproxDistance
Not convinced that the small speed benefit from P_AproxDistance is worth the "aproximate"[sic] results it gives. Let's instead try a define to replace it with FixedHypot. In Lua, the function gives a deprecated warning.

Inspired by the hyperwall fix for vanilla, except for everything. From little testing, actively improves waypoint checks, bumping, speed checks, wall collisions, Jawz targetting, Lightning Shield attacks, so on.

The only way I see this as a potential downgrade is A_Look (and related functions) getting slower, which are barely used in Kart.
2020-11-07 19:47:50 -05:00
Hannu Hanhi
8ee560f216 R_FindPlane optimization from SRB2 2020-11-07 20:32:44 +02:00
James R
130a1ccc98 :V 2020-11-05 22:18:41 -08:00
Zachary McAlpin
a9e851bcf5 Execute LUAh_PlayerThink(player) at the end if the player has a valid mobj_t object 2020-11-05 21:26:24 -08:00
Zachary McAlpin
5921d17cc0 Added PlayerThink hook 2020-11-05 21:23:22 -08:00
James R
a5db4ca572 PreThinkFrame and PostThinkFrame hooks
Changes from 58dd578b094639405d452593562e0f8cb2b482ce,
a36920808b74e068d582dda5a3b75bdf64246463,
41c902b819ac8fdef173c4ba76a8c50ad8107190,
60928db0e0b08fee7ceddd5515adf2246bb655c3.
2020-11-05 21:04:25 -08:00
James R
3e31bc9e45 Add CV_Set, CV_SetValue, CV_StealthSet, CV_StealthSetValue and CV_AddValue to Lua
CV_SetValue merged with CV_Set (same with CV_StealthSetValue and CV_StealthSet).
2020-11-05 20:23:43 -08:00
Louis-Antoine
ab7ccbc5d5 Expose "server" and "dedicated" to Lua scripts
Careful! Both are local variables and are always false for clients,
and therefore should obviously not be used in anything gamelogic-related.
2020-11-05 20:19:58 -08:00
James R
9f54ad4ea3 Improve COM_AddCommand boolean deprecated warning 2020-11-05 20:16:28 -08:00
James R
933ee4e961 COM_LOCAL makes your commands NetXCmd free, FUCK NetXCmd 2020-11-05 20:16:28 -08:00
James R
bb97e0805e Fuck magic numbers; COM_ flags for Lua commands! 2020-11-05 20:16:26 -08:00
James R
7890c9b83a Let access spectator mobj 2020-11-05 20:05:04 -08:00
James R
9e586c348c Allow accessing a player even if there is no mobj
The worst part is you could've just saved the player userdata and accessed it
later anyway while player.mo is nil.
2020-11-05 20:04:14 -08:00
James R
29d8e44055 Always allow access to the serverplayer 2020-11-05 20:00:21 -08:00
Sally Coolatta
1d8608c00d Merge branch 'master' into next 2020-11-05 16:15:42 -05:00
Sally Coolatta
8726bb70ac Minor whitespace :p 2020-11-05 16:15:09 -05:00
Sally Coolatta
513652c9fa Actually, let's avoid a future bruh moment 2020-11-03 13:23:41 -05:00
Sally Coolatta
7333177677 Remove strike for finishing normally 2020-11-03 13:23:10 -05:00
Sal
a5ff1bd99d Merge branch 'download-wrong-checksum' into 'master'
Download files if they are found with wrong checksum

See merge request KartKrew/Kart-Public!238
2020-11-03 13:05:26 -05:00
Sal
583eede2b8 Merge branch 'mute-music' into 'master'
Mute music instead of pausing if lose focus

See merge request KartKrew/Kart-Public!235
2020-11-03 13:05:06 -05:00
Sal
a8b37c6ec3 Merge branch 'http-downloads-auth' into 'master'
Command for http downloads with basic auth

See merge request KartKrew/Kart-Public!233
2020-11-03 13:04:43 -05:00
Sal
73d582ba85 Merge branch 'instant-askjoin' into 'master'
Fix servers having a long delay before starting

See merge request KartKrew/Kart-Public!236
2020-11-03 13:04:10 -05:00
JugadorXEI
2714940be9 Polyobject and SPB 'lastlook' interaction fix 2020-11-03 16:41:00 +01:00
James R
dc86206c23 Count any files not already loaded toward filestoload? 2020-10-07 16:09:21 -07:00
James R
d96f93f8a9 Download files that were found with wrong checksum 2020-10-07 16:06:49 -07:00
James R
dc9466a7f4 Add STUN to CMakeLists.txt 2020-09-30 21:15:49 -07:00
James R
88c98970eb Reset asksent before CL_ASKJOIN
It gets pushed forward for ASKINFO.
2020-09-30 12:42:53 -07:00
James R
81a7103b73 Use rand_s for Windoze
unsigned int is always 4 bytes on windows btw, so this should align properly.
2020-09-30 12:22:09 -07:00
James R
b8bfe9b83a Use STUN instead of curl to fetch the public IP address for Discord
RFC 5389 is a standard protocol that can be used for this instead of ip4.me.

I may have gone overboard on the CSPRNG... It was fun though.
2020-09-30 03:57:50 -07:00
James R
a39762a8fd Mute music instead of pausing if lose focus 2020-09-28 11:58:24 -07:00
Monster Iestyn
8a5fd38bca clarify the situation a bit more in the comments
(cherry picked from commit 5c33ff04581abe44e1c8ad03e680ff918b9dc0d2)
2020-09-27 16:50:43 -07:00
Monster Iestyn
31237935da move -warp code to a later part of D_SRB2Main so G_LoadGameData isn't upset by G_SetGameModified
(cherry picked from commit 903cc311a711d80436215e7f7c897a447daf2539)
2020-09-27 16:50:43 -07:00
James R
93a76c10de Don't let us warp to a map that doesn't exist (really!)
Okay so 6464df9876e472d1210aabce4237d02af38377e1, I WAS mistaken! Except that's
not how you check for a map's existence, at least not how the old map command
did it.

(cherry picked from commit 566b4a1626399b1c1621bf8b4ab1f8426c789c36)
2020-09-27 16:50:43 -07:00
James R
9e33e16d26 If we move the -warp code down, map searching can be used
(cherry picked from commit 404f3c13e4ed1d9e1a375bba1c2ae59b4f694e0e)
2020-09-27 16:50:43 -07:00
James R
9885ab164a I'm still an idiot
(cherry picked from commit 0a014755b98fb909aed4a12feba00744bc2af225)
2020-09-27 16:50:42 -07:00
James R
9a2ff50f5a Who cares?
(cherry picked from commit 2ffff56b391235257c65eb23e539926c4da6ac62)
2020-09-27 16:50:42 -07:00
James R
52a863d1fd Split map code checking from Command_Map_f
(cherry picked from commit 19aafbfd0b9bde40809ca91195d4636899504708)
2020-09-27 16:50:42 -07:00
James R
1adae3deea Maybe I'm mistaken but this probably isn't needed
(cherry picked from commit 6464df9876e472d1210aabce4237d02af38377e1)
2020-09-27 16:50:17 -07:00
James R
bd253c0e7e Use a third variable of XOR nonsense
(cherry picked from commit d5816d44f337c6eb82d937959f971fe45a5eec2a)
2020-09-27 16:50:17 -07:00
James R
e5fa66a2a9 Warn if gametype number is out of range to map command
(cherry picked from commit 6ffb18c4b157f9efecec6a104ef930dd71f8b986)
2020-09-27 16:50:01 -07:00
James R
401f30f27d Check for out of range gametype on map change
(cherry picked from commit 9b96964cbbfc20565a8cfdb741f4927f36df7899)
2020-09-27 16:50:01 -07:00
James R
05246f36a6 Fix strcasestr SIGSEGV in the case of only upper case strchr returning NULL
(cherry picked from commit c5d73e37bbc0c9fa8fd1dd874ac782b655068576)
2020-09-27 16:50:01 -07:00
James R
dc23895875 Add back the encore parameter 2020-09-27 16:50:01 -07:00
James R
19443fec4c Merge descrepancies 2020-09-27 16:50:01 -07:00
James R
a5bf7719e7 Warn if the gametype is not valid at all!
(cherry picked from commit 7776c59cddaa4cc09dfdb2f15192a194fda36eb7)
2020-09-27 16:50:01 -07:00
James R
7c3aedc48e Optimizations from LJ and generic functions
(cherry picked from commit 359d8a2c254222d4e44934ec71d56b9511dd9379)
2020-09-27 16:50:01 -07:00
James R
9a054ab989 Warn if the first argument is an option
(cherry picked from commit c9aad2d1862e92fc78d8dfbd5d1f2c5969d90d84)
2020-09-27 16:50:01 -07:00
James R
93c351a38e Get map name from multiple arguments
(This means you don't need quoting.)

(cherry picked from commit 46fbed8b716f96a7e87ac4c68ca3ee98c8c6a25c)
2020-09-27 16:50:01 -07:00
James R
fb858dd64b So you don't like macros?
(cherry picked from commit 5fd6561d464d53521343dd4abae6b08e42719885)
2020-09-27 16:50:01 -07:00
James R
3506ae6d1d :oh:
(cherry picked from commit fb9421893e555629f0fe42705f034e0b639c6905)
2020-09-27 16:50:01 -07:00
James R
c7a31ea5de Oh right, the keywords...
(cherry picked from commit a922de8242143a55eb0c19cc5a65bb9126213f29)
2020-09-27 16:48:50 -07:00
James R
d630706377 Merge remote-tracking branch 'origin/master' into map-by-name 2020-09-27 16:10:44 -07:00
James R
e2749f8fdc Include d_main.h 2020-09-25 11:25:15 -07:00
James R
b70d765144 Prepend srb2home to luafiles 2020-09-24 14:43:21 -07:00
Sal
680b8e3477 Merge branch 'engine-sounds-fix' into 'master'
Fix engine sound volume

See merge request KartKrew/Kart-Public!231
2020-09-20 17:07:31 -04:00
Sally Coolatta
7b6d527bd4 Griefing timer
Spectates/kicks players who aren't making progress, does it even faster if they're going backwards.
2020-09-20 17:03:14 -04:00
Sal
1906bf3817 Merge branch 'link-with-exchndl' into 'master'
Link with exchndl, instead of dynamically loading it.

See merge request KartKrew/Kart-Public!230
2020-09-19 15:42:00 -04:00
James R
0523114f56 Kill some nonsense 2020-09-18 13:11:49 -07:00
Sally Coolatta
eb0a3c9da3 Make it a bit louder 2020-09-18 01:10:59 -04:00
Sally Coolatta
e81a5ee0ca Spectator re-entry cooldown 2020-09-18 00:58:05 -04:00
Sally Coolatta
21422703f5 Fix engine sounds' dampening to a sane value, now that the bug preventing it from working properly was fixed.
You can hear engines in 16P again, but it's not as obnoxiously loud as it was before. Additionally, I commented this function better.
2020-09-17 18:58:44 -04:00
Steel Titanium
13a34e2545 Link with exchndl, instead of dynamically loading it.
It caused problems with crash reports not being made if the current working directory gets changed. Not even recommended anymore per the drmingw readme
https://github.com/jrfonseca/drmingw#exchndl
2020-09-17 15:59:02 -04:00
James R
fbfc305e47 Disable DRPC if dedicated 2020-09-15 19:56:08 -07:00
Sal
85726d7a55 Merge branch 'advertisement-for-rpc' into 'master'
Move master server presence updates to Advertise_OnChange

See merge request KartKrew/Kart-Public!227
2020-09-15 16:22:32 -04:00
Steel Titanium
9b180acdd7 Make "divide by zero" or "modulo by zero" errors show the file and line of where it happened
Shouldn't break scripts as it stops execution as soon it happens, like it already does.
2020-09-14 23:01:47 -04:00
Sally Coolatta
5181ddd67c Move master server presence updates to Advertise_OnChange
This will probably call DRPC_UpdatePresence slightly less?
2020-09-14 16:34:17 -04:00
Sally Coolatta
e8c91b6727 Rename the "small" variable to "isSmall"
Reported by MK, apparently "small" is considered a data type for some systems. After a little bit of research, apparently it can happen when including <windows.h>... whatever, just rename the variable :p
2020-09-14 12:47:55 -04:00
James R
6f8d246db8 Merge branch 'master' into next 2020-09-13 14:39:01 -07:00
James R
5755bab29a Makefile: add WINDOWSHELL=1 for the Windows detect
(cherry picked from commit 6f51c68c7248d616ad16f66b72cfcc36b7c952f5)
2020-09-13 14:25:08 -07:00
James R
1dca1a3f47 Makefile: automatically detect system to compile for, if no system was specified
This should work for mingw and linux so far.

(cherry picked from commit f92026f98b168f4556d50d3dde403ab6bfd97ff3)
2020-09-13 14:25:08 -07:00
James R
00ff94caa2 Makefile: Make WARNINGMODE the default, optionally disable with RELAXWARNINGS
(cherry picked from commit 9495e6354fed1028c6fc502cc9d946cfdd0b7896)
2020-09-13 14:25:07 -07:00
James R
8c7f9f85fe Is it GCC is it gcc, is it????
(cherry picked from commit ef2bff6383b16385f9874e1c9c6b66c9df794f5b)
2020-09-13 14:24:49 -07:00
James R
655c694bbc Update LATEST_GCC_VERSION too
(cherry picked from commit 4059c6a654a5785199cf0d6dd998bf113b57cd0f)
2020-09-13 14:22:46 -07:00
James R
6c7f95e749 Add missing GCC version flags to the Makefile
(cherry picked from commit 00943e9e82ff46a97a2bc1e3179ce47e53345cc3)
2020-09-13 14:22:45 -07:00
James R
61f35c91a7 It's not always GCC, but it probably is gcc (I hope)
(cherry picked from commit 4e1d54c3322c17276e532ab4d9e875a8c8ebc399)
2020-09-13 14:12:36 -07:00
James R
5ec649c852 Forgot a comma
(cherry picked from commit 193c45aa2f555b56f548f70e7fa0d74a1ce4e412)
2020-09-13 14:12:36 -07:00
James R
6de79f1377 Makefile: Move the PREFIX stuff up so version detection can take advantage of
(cherry picked from commit 489bb81d0065299ffea09b20cfa06dbbedcf247a)
2020-09-13 14:12:36 -07:00
James R
deb7bf35b7 Detect the compiler version and set the correct GCC flag
If the version is not supported by the Makefile, the flag for the latest
version supported is set instead.

(cherry picked from commit bf90fbb91f28af30ff79523681e7f73e60121535)
2020-09-13 14:12:36 -07:00
James R
c93d259b77 Make cv_advertise no by default, do not save 2020-09-12 18:54:44 -07:00
James R
0cc38dcbc8 Make cv_advertise NETVAR 2020-09-12 18:36:25 -07:00
James R
0f19b1357c Merge branch 'master-server-2' into 'next'
Master Server 2

See merge request KartKrew/Kart-Public!224
2020-09-12 20:25:42 -04:00
James R
8a687941fb Fix master server token 2020-09-12 10:32:14 -07:00
James R
6609b90457 Update update alert message 2020-09-11 20:12:31 -07:00
James R
9d62bb947f Set masterserver to ms.kartkrew.org 2020-09-11 17:39:01 -07:00
James R
4e24ad125c Strip trailing slashes from masterserver address 2020-09-11 17:33:46 -07:00
Sal
b9310c0563 Merge branch 'battle-item-balance' into 'next'
Battle item balance

See merge request KartKrew/Kart-Public!222
2020-09-11 12:21:06 -04:00
Sal
b4c3cd5e1b Merge branch 'stupid-sound-volume' into 'next'
Apply volume to sounds that have an origin

See merge request KartKrew/Kart-Public!223
2020-09-11 12:17:19 -04:00
Sal
460c627274 Merge branch 'name-change-spam' into 'next'
Don't let players change their name more than five times per minute

See merge request KartKrew/Kart-Public!221
2020-09-11 12:17:00 -04:00
Sally Coolatta
9ccaaafabd 6 -> 2, void the now unused parameter 2020-09-11 12:14:08 -04:00
James R
11ddcfa9a1 int -> INT32 2020-09-11 09:00:18 -07:00
Sal
dc91934d0a Merge branch 'save-renderer' into 'next'
Save renderer to file

See merge request KartKrew/Kart-Public!220
2020-09-11 11:59:51 -04:00
James R
5077b1ffef When changing masterserver_update_rate, only update if elapsed time within the new rate 2020-09-11 06:50:31 -07:00
James R
93d3808307 Register/unregister server by changing cv_advertise 2020-09-11 06:49:41 -07:00
James R
901ea3c18b Basically, update master server code to v2
Removes rooms, replaced with cv_advertise and "Advertise" on the host menu.

According to the new API, SRB2APPLICATION is sent instead of MODID. A contact
field was added, but there is no means of accessing it or setting it.

As a slight change, the server list will be populated even on an outdated
version of the game. (The new API was designed with this in mind.) The update
alert is still presented first of course.
2020-09-11 06:11:41 -07:00
James R
22177753d2 Apply volume to sounds with origin too
Previously sounds with an origin would always start at max volume. This is
because the distance calculation adjusts the volume, and that volume needs to
be updated every tic as distance changes. Storing the original volume works.
2020-09-08 22:40:42 -07:00
Sally Coolatta
2f2e2200f4 Redo Battle item balance
- Far more inclined to give you Orbinaut, Jawz, Invincibility, and Grow. Far less inclined to give you Bananas or Sneakers.
- Item odds no longer scale with bumper count differences.
2020-09-02 02:53:06 -04:00
James R
17f75903b0 Don't let players change their name more than five times per minute 2020-08-31 20:08:22 -07:00
James R
48b018b2b4 Oops :v 2020-08-31 19:34:43 -07:00
James R
83c2a7d178 Save chosen renderer to file, use on startup if no -software or -opengl parameter 2020-08-31 19:29:09 -07:00
James R
3e6b45abe9 Just SetCurrentDirectory to the exe's folder on windoze 2020-08-31 01:23:56 -07:00
Sally Coolatta
328d6d9a36 Increase cipher length 2020-08-31 00:25:28 -04:00
Sally Coolatta
1c47841487 Remove default dirs on Windows
Cause more issues than fixes. Still around for Linux.
2020-08-31 00:06:47 -04:00
Sally Coolatta
da0d0e41df Expand IP_SIZE 2020-08-30 23:41:27 -04:00
Sally Coolatta
651d25a516 Move to D_RegisterServerCommands 2020-08-30 23:35:41 -04:00
Sally Coolatta
85884ad4e2 Bruh, lowercase 2020-08-30 23:31:54 -04:00
Sally Coolatta
6ca451da45 Wrong file 2020-08-30 23:26:00 -04:00
Sally Coolatta
7dea9d28b9 Dedicated servers can change discordinvites without needing RPC support 2020-08-30 23:20:06 -04:00
James R
6d2c7f4ae7 NO_DISCORDRPC to disable rich presence on Windows 2020-08-30 19:11:30 -07:00
James R
7ab1c4a2df Update versions to 1.3 2020-08-30 19:06:31 -07:00
James R
0371a113ef Update patch.kart asset hash 2020-08-30 19:02:31 -07:00
James R
5e9c197f8a Merge remote-tracking branch 'origin/master' into next 2020-08-30 19:01:04 -07:00
Sal
8acc2b6f3c Merge branch 'world-tour' into 'next'
Flush random map pool after all but 3 are played

See merge request KartKrew/Kart-Public!216
2020-08-30 21:49:20 -04:00
Sal
b0f89a5dba Merge branch 'easy-colors' into 'master'
Caret color codes in server name

See merge request KartKrew/Kart-Public!218
2020-08-30 21:49:03 -04:00
Sal
1aca163d12 Merge branch 'discord-rpc-support' into 'next'
Discord Rich Presence

See merge request KartKrew/Kart-Public!207
2020-08-30 21:48:44 -04:00
Sally Coolatta
29f156aac2 Use ENTER and ESC
A and B are v2 terminology
2020-08-30 21:42:04 -04:00
James R
bca656e4ac Merge branch 'master' into next 2020-08-29 18:22:19 -07:00
James R
daf6e66268 Fix stupid NONET
(cherry picked from commit 679bfa21edec6b652def93082da5586e6c755678)
2020-08-29 18:19:39 -07:00
James R
95a026c98d C90?
(cherry picked from commit 1f38db46298181d117432e12e88b326a92b4b785)
2020-08-29 18:19:15 -07:00
James R
3f842937a8 Merge remote-tracking branch 'origin/master' into next 2020-08-29 11:26:52 -07:00
Sally Coolatta
82bfdf9ccc Add join/leave notification sounds 2020-08-27 20:10:25 -04:00
Sally Coolatta
17318ceec7 This should be set for server too!! 2020-08-27 19:36:37 -04:00
Sally Coolatta
51dce9707f Attach initial join discord info to servercfg, so that we don't have a pause from needing to also send XD_DISCORD
XD_DISCORD is now reserved for when the options are changed mid-game
2020-08-27 19:14:45 -04:00
Sally Coolatta
c165b0761c Misc changes to how the program runs
- Call DRPC_Init at the end of D_SRB2Main instead of in the middle
- Call Discord_RunCallbacks in D_SRB2Loop instead of G_Ticker
- Fix errorcount nums in I_Error, an old leftover from when Discord_Shutdown was not handled by I_AddExitFunction
2020-08-27 18:50:36 -04:00
James R
54c3aed86c Convert caret color codes to SRB2 color codes 2020-08-27 15:44:06 -07:00
James R
f802e9fbcb Convert from caret colors when sending SERVERINFO 2020-08-27 15:43:20 -07:00
Steel Titanium
35122d3a22 Expose demo.playback to Lua 2020-08-27 14:58:46 -04:00
TehRealSalt
86754cf820 Flush random map pool after all but 3 are played 2020-08-27 14:32:44 -04:00
James R
4c816f4059 Say DEFAULTDIR not .srb2kart 2020-08-26 23:37:52 -07:00
James R
6e3facf8f4 Check DEFAULTDIR for srb2.srb after cwd 2020-08-26 20:20:40 -07:00
Sally Coolatta
cb5ab33a93 Merge branch 'next' into discord-rpc-support 2020-08-26 12:56:58 -04:00
Sally Coolatta
ee1ea21336 Merge branch 'master' into next 2020-08-26 12:56:38 -04:00
Sal
f87b883ba5 Merge branch 'various-compiling-fixes-2' into 'master'
Fix some compile flags

See merge request KartKrew/Kart-Public!213
2020-08-26 09:58:35 -04:00
ThatAwesomeGuy173
27b72ccbf5 Replace 'ignoring skin' debug print with a proper console warning 2020-08-25 23:13:58 -06:00
Sal
34b6998b2e Merge branch 'various-compiling-fixes' into 'next'
Various compiling fixes

See merge request KartKrew/Kart-Public!212
2020-08-25 18:36:51 -04:00
James R
04d774c765 Fix NOHW compiling 2020-08-24 18:06:00 -07:00
James R
3437b0690a Kill NOHS 2020-08-24 17:58:39 -07:00
James R
16fc87edcf Fix NOMIXER compiling 2020-08-24 17:55:42 -07:00
James R
fbde926497 Fix NOPNG compiling 2020-08-24 17:52:55 -07:00
James R
0d57ba1d02 Fix NOGME compiling 2020-08-24 17:51:01 -07:00
Sal
bea6b6a9d2 Merge branch 'fix-asktime-really' into 'next'
Avoid underflows on connection screen timer (fixes hosting servers)

See merge request KartKrew/Kart-Public!211
2020-08-24 16:09:33 -04:00
Steel Titanium
c6164a1947 Initialize this variable 2020-08-24 01:25:34 -04:00
Steel Titanium
41c742a699 Hopefully the last time... 2020-08-24 01:18:38 -04:00
Steel Titanium
87d2ad0c23 Remind me why NONET exists? 2020-08-24 01:13:59 -04:00
Steel Titanium
04b7051141 This is just stupid 2020-08-24 01:06:10 -04:00
Steel Titanium
84bab3fc9f Turns out compiling with the internal version of curl was broken on CMake the entire time 🙃 2020-08-24 01:00:28 -04:00
Steel Titanium
d4006d00c3 Screw you C90 2020-08-24 00:58:14 -04:00
Steel Titanium
509c57a8d6 Haha NONET... 2020-08-24 00:56:53 -04:00
Steel Titanium
e58c9ac410 It's discord-rpc, not libgme 2020-08-23 17:45:31 -04:00
Steel Titanium
d9cbb69327 Better CMake support
No idea if it compiles on Mac, it does on Linux though, at least for me.
2020-08-23 16:15:33 -04:00
Sally Coolatta
585cb1cfe3 Finish DEVELOP mode functionality 2020-08-23 07:15:33 -04:00
Sally Coolatta
720eced665 Attempt to improve discord-rpc checking in CMake
Haven't ever gotten CMake to compile SRB2, so I'm unable to really check if this works
2020-08-23 06:45:35 -04:00
Sally Coolatta
175fa43c90 Update win 32 bit libraries, implement win 64 bit libraries 2020-08-23 05:47:55 -04:00
Sally Coolatta
e2f3e76db8 Merge branch 'next' into discord-rpc-support 2020-08-23 05:32:32 -04:00
Sal
88e7b6198d Merge branch 'lineriding-b-gone' into 'next'
Kill offroad line riding

See merge request KartKrew/Kart-Public!199
2020-08-23 05:09:55 -04:00
Sally Coolatta
7d380c326b Merge branch 'master' into next 2020-08-23 04:44:27 -04:00
Sally Coolatta
3ce6b8a54f Fix version string 2020-08-23 04:44:05 -04:00
Sal
d0629a9c13 Merge branch 'fix-ogl-timedemo' into 'master'
Fix timedemo in OpenGL mode

See merge request KartKrew/Kart-Public!209
2020-08-23 04:38:57 -04:00
Sal
3f16ef2eaa Merge branch 'misc-optimizations' into 'master'
Remove ESLOPE POLYOBJECTS POLYOBJECTS_PLANES #ifdefs (backport srb2 2.2)

See merge request KartKrew/Kart-Public!204
2020-08-23 04:38:05 -04:00
James R
5daaef7e87 Avoid underflow hacks completely with asktime 2020-08-22 18:38:20 -07:00
James R
89ba08a376 Make join requests options on pause menu selectable even if you're already in the menu 2020-08-22 17:16:49 -07:00
James R
805fb01df9 Skip XD_DISCORD payload in non Discord builds 2020-08-22 16:26:15 -07:00
Hannu Hanhi
4210352be9 Fix timedemo in OpenGL mode 2020-08-23 00:10:50 +03:00
Hannu Hanhi
5c13727aac Fix replay recording memory leak 2020-08-22 22:04:45 +03:00
Sally Coolatta
084756ec72 Fix XOR not working 2020-08-22 09:46:25 -04:00
Sally Coolatta
5de27be169 Merge remote-tracking branch 'public/next' into discord-rpc-support 2020-08-22 07:28:21 -04:00
Sally Coolatta
e5238d095f Remove timer variable
Doesn't feel necessary to me anymore, especially with how the menu works
2020-08-22 07:25:47 -04:00
Sally Coolatta
f61e3a77bd Ask to join is a menu option, rather than trying to replace your menu temporarily. 2020-08-22 07:16:52 -04:00
lachwright
32f2ed4a53 Correct misplaced MT_ARIDTOAD listing 2020-08-22 17:35:31 +08:00
Sally Coolatta
6f9025a14d Merge branch 'discord-rpc-support' of https://git.magicalgirl.moe/KartKrew/Kart into discord-rpc-support 2020-08-22 05:03:43 -04:00
Sally Coolatta
3d5d5ad8b5 Always have XD_DISCORD defined, so that people compiling without Discord support can connect to servers that do. 2020-08-22 05:03:08 -04:00
lachwright
e01c7aef32 Compile m_menu.c without HAVE_DISCORDRPC 2020-08-22 16:58:59 +08:00
Sally Coolatta
3c128660b4 Add envelope icon, add sounds 2020-08-22 04:54:08 -04:00
Sally Coolatta
98f586a2f9 Menu is pretty now 2020-08-22 03:52:07 -04:00
Sally Coolatta
571c670670 Add some options, maxplayer/allownewplayer dont need to be netvars anymore 2020-08-22 01:53:27 -04:00
Sally Coolatta
8ff62cdc7f Base xor off of inital seed 2020-08-22 00:11:33 -04:00
Sally Coolatta
e0d0a3a74e Ignore any duplicate requests
You will still get a message for them, so if they're being annoying you will want to block them anyway, but at least it won't clog up the game.
2020-08-22 00:01:56 -04:00
Sally Coolatta
4d8c65bb73 Don't reset menu in drawing function 2020-08-21 04:17:36 -04:00
Sally Coolatta
983a978c12 Merge branch 'discord-rpc-support' of https://git.magicalgirl.moe/KartKrew/Kart into discord-rpc-support 2020-08-21 04:14:36 -04:00
Sally Coolatta
339be6f90e Invite menu started
Functions! Is not pretty yet!
2020-08-21 04:14:33 -04:00
James R
0b07d0ed6f curl_global_cleanup 2020-08-20 22:36:41 -07:00
Sally Coolatta
7b1e14d017 Don't show map image for title screen demos 2020-08-21 01:18:40 -04:00
Sally Coolatta
6a86d86828 XOR IP addresses before sending them to Discord
Not complex because we aren't sending anything that isn't easily accessible via the Master Server anyway, just means we aren't sending plain-text IPs to Discord. Might be improved by basing the XOR key on other values (base RNG, maybe version) so that it's not like *right* there
2020-08-21 01:16:11 -04:00
Sal
0ca9f8f07d Merge branch 'conenction-screen-improvements' into 'next'
Connection screen improvements

See merge request KartKrew/Kart-Public!187
2020-08-21 00:11:37 -04:00
Ashnal
9e1d7146ad Fixed retry timeout to no ttrigger when starting a local server 2020-08-20 23:38:04 -04:00
Ashnal
247239c2bc Add return false to the connect timeout 2020-08-20 23:09:12 -04:00
James R
5b0cb1afcb Merge remote-tracking branch 'origin/master' into next 2020-08-20 19:55:03 -07:00
FlykeSpice
c09cb6d762 Remove POLYOBJECTS POLYOBJECTS_PLANES #ifdefs(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
FlykeSpice
00137ef4ea Remove ESLOPE #ifdef(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
Sal
79c299bf31 Merge branch 'port-port-port' into 'master'
2.2's random client port

See merge request KartKrew/Kart-Public!201
2020-08-20 12:19:52 -04:00
Sal
67b37e54b6 Merge branch 'snapback' into 'master'
Instantaneous lookback camera (v2 backport)

See merge request KartKrew/Kart-Public!203
2020-08-20 12:19:41 -04:00
lachwright
d0d6128053 Instantaneous lookback camera (v2 backport) 2020-08-20 13:41:03 +08:00
Ashnal
aa2b25e667 Well actually, lets fix all comparisons of askset to use the same comparison
If we initialize to I_GetTime() - NEWTICRATE*3 it never underflows and everything is good
2020-08-20 00:54:18 -04:00
Steel Titanium
e3f07b33bb GME cleanup and fixes
Just some stuff backported from SRB2 2.2, well mostly

get_zlib_error function to reduce code duplication

Return false if it fails to load the VGZ lump

Reduce redundant calls to gme_set_equalizer

Fix sometimes loading a VGZ crashing the game
2020-08-19 22:39:12 -04:00
James R
94512c49e4 -clientport (it's back!) and -serverport, which is an alias to -port
If you ever need to, you can change the client port number.

(cherry picked from commit 843d9b9f0a345330d97c579e94f208eb2b65c156)
2020-08-19 18:16:54 -07:00
James R
b77541b51d Use a pointer for port_name
Using strcpy is stupid because we don't know how long the argument would be.
There's no need for a buffer anyway.

(cherry picked from commit 4e321012894b2aa87e312597f19be26b30545a8b)
2020-08-19 18:16:53 -07:00
James R
b1f5e66a23 Use a random port when connecting
(cherry picked from commit f584b61c93a97e1a9852f306acba673ced21e03a)
2020-08-19 18:16:53 -07:00
James R
65968f00d3 Fix tiny mistake with the last commit 2020-08-19 17:55:01 -07:00
James R
1cd7c3b747 Rearrange time comparsion on asksent to make it underflow friendly
This fixes '-connect'. NEWTICRATE*5 is subtracted from asksent after
CL_LOADFILES. If this happens too early, an underflow will occur.
2020-08-19 17:49:47 -07:00
Sal
a335d6b583 Merge branch 'fix-nocurl' into 'master'
Fix NOCURL compiling

See merge request KartKrew/Kart-Public!197
2020-08-19 20:36:14 -04:00
Sal
c6f85cde59 Merge branch 'httpsource-without-curl' into 'master'
Let servers send httpsource without curl

See merge request KartKrew/Kart-Public!196
2020-08-19 20:36:06 -04:00
Ashnal
cadb4719cf Added m_menu_mutex to M_Drawer in connection screen 2020-08-19 19:52:24 -04:00
Ashnal
648a950ac8 Merge remote-tracking branch 'public/next' into conenction-screen-improvements 2020-08-19 19:08:33 -04:00
Ashnal
7c5740d98f COnfirm box now respects rebindable accelerate and brake on keyboards 2020-08-19 18:01:56 -04:00
James R
1bf0794d6a Copy the saved wad directory to srb2path 2020-08-17 21:27:59 -07:00
James R
c0cac645f8 hate hate hate hate 2020-08-17 21:22:25 -07:00
Sally Coolatta
234983909a Don't show gametype when watching replays 2020-08-17 23:33:55 -04:00
James R
2a2d43a20b Save srb2path to %LOCALAPPDATA%\SRB2Kart\lastwaddir, and chdir here if srb2.srb cannot be found
Windows code goes brrr
2020-08-17 20:11:32 -07:00
Latapostrophe
392b24b769 Merge remote-tracking branch 'stjr/io' into kart-io 2020-08-17 20:22:02 +02:00
Sally Coolatta
c76c1b8420 Show game speed and encore 2020-08-17 09:08:05 -04:00
Sally Coolatta
27654ffb6a Don't allow invites if allowjoin is off 2020-08-17 06:55:43 -04:00
Sally Coolatta
d163f67700 Update presence when maxplayers is changed 2020-08-17 06:52:46 -04:00
Sally Coolatta
83192827dc Fix ZONE being all caps, standardize the function comments 2020-08-17 06:13:32 -04:00
Latapostrophe
d56fdbb933 Kill line riding for offroad 2020-08-17 12:01:16 +02:00
Sally Coolatta
da5bda72ee Add distinct images for map hell & normal custom maps 2020-08-17 04:42:22 -04:00
Sally Coolatta
a04361a151 Check supported skins by name instead of number, so we can have bonuschars images 2020-08-17 04:42:05 -04:00
Ashnal
eb81bea943 Move code down so declarations are above to appease C90 2020-08-17 04:03:02 -04:00
Ashnal
03150e5fe6 Move declaration to appease C90
also remove some extra tab characters
2020-08-17 03:56:13 -04:00
Ashnal
afc6bdbc7e Fixes for file accounting
mainwads+1 to not use the first mainwad
2020-08-17 03:51:19 -04:00
Ashnal
9a9d81bbe0 New message boxes for downloads and full server waiting
Downloads must be confirmed before proceeding
Allows downloading mods for full servers
Client will wait for a slot to open on a full server to join
This has a 5 minute timeout
2020-08-17 03:47:23 -04:00
Sally Coolatta
9f4ad1303e Put the cvar in the menu 2020-08-17 02:31:30 -04:00
Sally Coolatta
886db8cde1 Guard discord.h, add cvar to disable rich presence 2020-08-17 02:25:05 -04:00
Sally Coolatta
41a401f703 Merge branch 'master' into next 2020-08-17 02:05:31 -04:00
Sally Coolatta
8d386fba66 Display time elasped/time limit 2020-08-17 02:05:16 -04:00
James R
7a05a8acf7 Do not do master server things when NOCURL 2020-08-16 21:42:58 -07:00
Sally Coolatta
d709e9782d Use curl to retrieve your own IP address properly 2020-08-17 00:29:52 -04:00
James R
5dc3ca3934 Remove HAVE_CURL guards on sending httpsource 2020-08-16 20:39:46 -07:00
Sally Coolatta
47f95e22d5 Allow lowercase level name / zone title
Might have some other side-effects, we'll need to see
2020-08-16 22:13:21 -04:00
Sally Coolatta
f5bd9d097f Merge remote-tracking branch 'public/master' into discord-rpc-support 2020-08-16 22:12:36 -04:00
Sally Coolatta
07c916f6d2 Little fixes 2020-08-16 21:31:03 -04:00
Sally Coolatta
df0cc6a727 No previous prototype for K_DropKitchenSink 2020-08-16 21:18:33 -04:00
Sally Coolatta
c8fa1dcfb5 Merge remote-tracking branch 'public/next' into discord-rpc-support 2020-08-16 20:57:31 -04:00
Kimberly Wilber
1bfcec9242 [OSX] Fix "SIGILL: illegal instruction" on macOS Catalina
on OSX, strncpy may copy to overlapping (protected) memory. this
sometimes happens when loading WAD files.

This patch eliminates these problems for me
2020-08-15 12:16:05 -04:00
Ashnal
f800159bb8 Improve total downloads bar
Now has total file size AND number of files
2020-08-15 01:03:45 -04:00
James R
a772096757 dumbass doesn't test changes before pushing directly to next
(cherry picked from commit be14b8a564a89a5afb84ac19f1586f3db7f68367)
2020-08-14 08:27:25 -07:00
Sal
06f36224ee Merge branch 'http-mserv' into 'master'
Make the HTTP Master Server official

See merge request KartKrew/Kart-Public!193
2020-08-10 16:49:47 -04:00
James R
1a1c215a91 Add http-mserv to fuck 2020-08-09 23:32:43 -07:00
James R
9d9f8fd8a3 Bump MAXNETNODES to 127 2020-08-09 18:26:34 -07:00
Ashnal
cc78ef2c78 Now that the server doesn't erroneously send the last mainwad
As the first part of fileneeded, we must load file 0
2020-08-09 00:48:53 -04:00
Ashnal
4c5eb0d6bc Redo logic for lots of files vs not
Now new CL state for checking files so it can spread over tics
whether we ask for the extended list or not
2020-08-09 00:47:55 -04:00
Sal
97c4e7dfff Merge branch 'indirectitemcooldown' into 'next'
Fix Shrink, SPB and Hyudoro cooldowns never resetting?

See merge request KartKrew/Kart-Public!191
2020-08-06 12:19:27 -04:00
Sally Coolatta
c63022350d Merge branch 'master' into next 2020-08-06 12:15:55 -04:00
AJ Martinez
3dada09aa5 Fix Hyudoro cooldown never resetting 2020-08-06 10:51:53 -05:00
AJ Martinez
2add55eb04 Fix indirect item cooldown never resetting 2020-08-06 10:34:16 -05:00
AJ Martinez
8284caf1bc Clarify addon-related messages 2020-08-05 00:40:56 -05:00
Sal
8791fd8835 Merge branch 'mine-punt-sync-fix' into 'next'
Fix desyncs caused by K_PuntMine

See merge request KartKrew/Kart-Public!189
2020-07-25 03:55:28 -04:00
Sal
341ce8f4a3 Merge branch 'rocket-sneaker-hnext-fix' into 'next'
Rocket sneaker and sink hnext fix

See merge request KartKrew/Kart-Public!188
2020-07-25 03:55:22 -04:00
Ashnal
6d0b1e93c6 Appease C91 2020-07-23 21:05:00 -04:00
Ashnal
733aefa64a Also lets do this for kitchen sinks
They also ignored in K_DropHnextList
2020-07-23 20:12:35 -04:00
Ashnal
6562c9b755 Moved K_DropRocketSneaker call into K_StripItems
This should catch when DropHnextList misses it
Should probably fix sinks too ...
2020-07-15 09:17:35 -04:00