Commit graph

1533 commits

Author SHA1 Message Date
Sally Coolatta
e8b179f7a1 Switch around maxplayers and ingamecap
- ingamecap is now the new maxplayers
- The old maxplayers is now called maxconnections, but can mostly be left alone
- Insert into match race menu
2022-08-29 04:35:14 -04:00
toaster
7edec43d72 Port Gametype Preference and associated changes
Notably, makes the PWR-based Encore scrambling component of G_SometimesGetDifferentGametype WAY less spaghettified.
2022-08-28 23:36:55 +01:00
toaster
1a53836d6a Compilation warning in D_PickVote 2022-08-28 18:34:33 +01:00
JugadorXEI
f17f6b7525 banishing hell map forcing
# Conflicts:
#	src/d_netcmd.c
#	src/y_inter.c
2022-08-28 17:11:19 +01:00
Sally Coolatta
107622968e Merge branch 'master' into new-menus 2022-08-27 22:36:58 -04:00
Sally Coolatta
7d67e02ea3 Bot perfstats
Show how long they take to think on all of their main tasks
2022-08-27 00:04:33 -04:00
toaster
7a7cab67b1 Don't engage in server automation in a restricted context. 2022-08-24 22:38:02 +01:00
toaster
48a1f7f94d Revert the reversion of 2.2 information.
- Corrects the definition for cv_kicktime.
- Moves its registering to the correct place for being saved to the config.
- Restore LUAh_GameQuit.
2022-08-24 22:24:10 +01:00
James R
2ec2873b3e Fix compiler warnings 2022-08-24 21:07:42 +01:00
Sally Coolatta
d6e2410cbb Ban improvements
- Save a note of the username, not just the reason.
- Allow setting a mask with the `banip` command.
- Make ban.txt's formatting a lot more sane. Username and reason are stored in quotes. The mask uses the same formatting as actual CDIR.
- Keep track of if we tried to load ban.txt. If it wasn't, then don't save over it with a blank file.
- Disallow quotes in player names, as it makes player name detection in console more annoying, and saving username in files scary.
2022-08-24 21:07:42 +01:00
Sally Coolatta
eb7e84b961 Automate commands
- `automate_set <event name> <command>` to set a command to run each time an event triggers.
- Currently implemented events are "roundstart", "intermissionstart", and "votestart", all of the ones from HOSTMOD.
- Turn `automate` off to disable this feature entirely. Because of the new safer way this is implemented (in HOSTMOD, this just calls some console aliases), this is turned on by default instead of off.
- This is set up in a way to facilitate adding more automation events very easily, if desired.
2022-08-24 21:07:41 +01:00
Sally Coolatta
0308ab6bd4 Scheduling commands
- `schedule_add <seconds> <command>` to add a command that runs on a recurring timer.
- `schedule_list` to print out all of the scheduled tasks.
- NEW: `schedule_clear` to revert the schedule to a blank slate.
- `schedule` cvar determines whenever or not to run the scheduled tasks. Unlike HOSTMOD, turning this off will reset the timers of the tasks, instead of freezing them.
- I did not implement HOSTMOD's ability to pick from several random command per scheduled task. Would drastically increase the code complexity when you can just use a choose command in your schedule_add for the exact same effect.
2022-08-24 21:07:41 +01:00
Sally Coolatta
2fdd8c1e13 Implement shout commands
- shout command to create a server message, with its own special sound cue & color
- shoutname to control the nametag, by default this is "SERVER"
- shoutcolor controls the color of the message. By default it's red, but there's also a option for player colored.
- autoshout makes any message sent by a admin/server automatically turn into a shout
- Unlike HOSTMOD shout, integrated it with the dedicated server say behavior -- using say on dedicated server is always a shout.
2022-08-24 21:02:39 +01:00
Sally Coolatta
f571e559d4 Playsound command
For scripted global sound cues for the entire server.
2022-08-24 21:02:37 +01:00
Sally Coolatta
70c48fc0e9 Ping measured in frame delay instead of milliseconds
The part of HOSTMOD ministats that I wanted. Can go back to ms using the pingmeasurement cvar.

If Tyron wants to bring ministats fully in I think it'd be better to bring its ideas to replace the current HUD instead, ideally using the existing ping gfx, so they should bring it up with Oni
2022-08-24 21:02:37 +01:00
Sally Coolatta
113dd6a600 Map helper commands from HOSTMOD 2022-08-24 21:02:36 +01:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
James R
cf10ec1711 Merge branch 'follower-by-name' into 'master'
Always set follower cvar to follower name

Closes #261

See merge request KartKrew/Kart!620
2022-08-01 14:51:45 +00:00
James R
638efe18c9 Bail CanChangeSkinWhilePlaying if forceskin 2022-06-11 05:17:50 -07:00
Sally Coolatta
36b8ab1eac Streamline cheats
"cheats" is a proper cvar now. Enabling it allows for cheats to be used any time, even in multiplayer, and disables gamedata saving. Turning it off undoes as many cheat commands as reasonably possible. Based a little bit off of some vanilla work I also did.

Many cheat commands are still SP-only, but can reasonably be allowed in netgames now if a net command is created for them.
2022-06-08 12:46:56 -04:00
James R
d299afbb2a Use follower name in cv_follower 2022-06-07 01:48:26 -07:00
James R
e2c64699d0 Strip items when spectating 2022-06-07 01:15:22 -07:00
toaster
d963dea4f9 Merge branch 'master' into new-menus
# Conflicts:
#	src/Sourcefile
#	src/deh_soc.c
#	src/m_menu.c
#	src/p_user.c
#	src/r_data.h
#	src/r_skins.h
2022-05-25 15:12:51 +01:00
Sal
675cb12dba Merge branch 'tester-text' into 'master'
Tester text

See merge request KartKrew/Kart!603
2022-05-25 07:37:17 +00:00
Sal
e3a0945566 Merge branch 'eggbox-cinders' into 'master'
Eggman Mark cinder fix

See merge request KartKrew/Kart!600
2022-05-25 07:37:08 +00:00
SinnamonLat
9364d0b479 better defaults in menus to make navigation easier when you just want to go fast 2022-05-24 01:50:00 +02:00
toaster
b9ee6d1f4e * Show version/DEVELOP info on the title screen, not the top-level menu (necessary in advance of new-menus).
* Add TESTER/HOSTTESTER information to `version` command and title screen DEVELOP info.
2022-05-23 23:57:18 +01:00
SinnamonLat
79831b46cc Default restrictskinchange to yes, change conditions for changing skins 2022-05-23 23:48:23 +02:00
toaster
17d007d418 * Restore player colour and colorization correctly when the Eggman Mark concludes its effect.
* Allow colorisation types to not completely crowd each other out.
    * For example, it's possible for invincibility + grow to flicker Invincibility, Eggman mark, and grow colours if the conditions for each type of flash are true on different frames!
2022-05-23 22:04:14 +01:00
Sally Coolatta
6e3c4dbc34 > numfollowers-1 -> >= numfollowers 2022-05-23 13:40:51 -04:00
Sally Coolatta
b5334e6b42 Move follower code to its own file 2022-05-23 00:23:46 -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
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
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
Sally Coolatta
04aa8259cb Merge branch 'master' into rewrite-lightning 2022-05-21 03:56:12 -04:00
Sal
46b7da8f4b Merge branch 'title-screen' into 'master'
"Dr. Robotnik's Ring Racers" rebranding

See merge request KartKrew/Kart!590
2022-05-21 07:48:30 +00: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
SinnamonLat
30aec86479 Allow P1 to add splitscreen players on command, allow console in menus 2022-05-20 21:36:43 +02:00
Sally Coolatta
852e9b8ce9 Rebrand all console / window stuff 2022-05-19 15:10:47 -04:00
SinnamonLat
51d21ec388 Select profile after title screen 2022-05-18 02:24:29 +02: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
SinnamonLat
66c62b38da Various fixes in charsel / charswitch menus 2022-04-13 00:53:27 +02:00
Sally Coolatta
b9f91cb7ec Increase bot difficulty range to 13
While I finally pushed to do this because of the epic Blue Sphere reference, I was kinda thinking about doing this for a while, because it gives more room for bots to level up during Hard GP.

I thought about just making the new level cap go up normally, but I decided on keeping the bots' passive buffs (like top speed & ring boosts) go up linearly, while rubberbanding range is kept the same.

I don't think I can properly explain it, but this basically means level 13s are a touch harder than old level 9s before, and new level 9s are touch easier than old level 9s. Basically think of it as more level range than actually making the bots harder.

The expanded range means that Hard GP can start off easier, but end harder. (And of course, Master is even more ridiculous c:)
2022-03-30 15:25:55 -04: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
c0678e5016 Check FPS cap further in the main loop
This allows map changes to properly run. (I also seem to be able to hit the framerate cap slightly more often ... maybe placebo lol)
2022-03-27 13:17:26 -04:00
SteelT
dbdaebbb04 Merge branch 'droptarget' into 'master'
"Drop Target" item

See merge request KartKrew/Kart!562
2022-03-22 03:33:54 +00:00
toaster
52d2472ed7 "Drop Target" item initial commit.
Most of the way there, but still a bit left to do.
2022-03-21 23:40:30 +00:00
toaster
f073218532 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into boss
# Conflicts:
#	src/m_menu.c
2022-03-18 09:07:13 +00:00
James R
821fd41d70 Merge branch 'c99-pedantic' into 'master'
Switch compiler mode C90 to C99; enforce stricter standard conformance

See merge request KartKrew/Kart!554
2022-03-18 02:41:57 +00:00
toaster
8de92e8dca Merge branch 'master' into boss
# Conflicts:
#	src/k_bot.c
2022-03-17 16:58:42 +00:00