Commit graph

1025 commits

Author SHA1 Message Date
James R
6bc1d65442 Merge branch 'custom-weather' into 'master'
Allow freesloting & editing precipprops

See merge request KartKrew/Kart!612
2022-06-11 03:05:37 +00:00
James R
70e55a0911 Run line 80 (raise things to FOF) after things spawn
Blame 3cad7398f0
2022-06-07 00:56:56 -07:00
Sally Coolatta
0e96aeec84 Add water particles 2022-06-05 06:24:55 -04:00
Sally Coolatta
6106ce1624 Add reversed weather
- Negative speed weather will spawn from a floor in a sector with a sky ceiling, and go up into the ceiling.
- (Not really the same as reverse gravity weather in that aspect, because that would be for sky floors.)
- Fixed invert precipitation flag for linedef type 8 being completely unimplemented. (How long has it been like this...?)
- Fix swapping weather on the fly having reversed momz
2022-06-05 05:39:35 -04:00
Sally Coolatta
4c3f89cdf7 Allow freesloting & editing precipprops
Allows for custom weather types.

In SOC:
```Freeslot
PRECIP_GROOVY

Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```

In Lua:
```freeslot("PRECIP_GROOVY")

precipprops[PRECIP_GROOVY] = {
    type = MT_PARTICLE,
    effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```

Then in level header, simply set `Weather = PRECIP_GROOVY`.

Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
2022-05-31 09:03:06 -04:00
Sally Coolatta
bc3a82b610 Merge branch 'master' into slope-lighting 2022-05-25 04:04:38 -04:00
Sally Coolatta
b6ed17d9fc Allow adjusting map contrast 2022-05-24 23:04:48 -04:00
Sally Coolatta
d053d5f8ba Fix blockmap WILD inconsistency when it's not PIT_CheckThing
An optimized error check was put into P_BlockThingsIterator for tmthing, but this meant that anything that was not using or even setting this variable (the supermajority of them) would exit after finding 1 thing in each block.

To keep this error check & keep it optimized, the PIT_ functions were expanded to three options instead of two: BMIT_CONTINUE lets the search continue. If used as the last mobj, it will return true when the iterator finishes. BMIT_ABORT ends the search and forces the iterator to return false.
BMIT_STOP ends the search and forces the iterator to return true.
2022-05-23 17:37:29 -04: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
toaster
8593074d19 ANIMDEFS now only reports the "flats are disabled" warning for ANIMDEFs in the most recently loaded file.
Notably, this means there are no warnings produced if an added file contains no errors, reducing even MORE of the friction the addons menu has been experiencing in devbuilds lately.
2022-05-14 15:43:50 +01:00
toaster
ea6aaa3321 Merge branch 'master' into fast-addfile
# Conflicts:
#	src/k_hud.c
2022-05-14 13:41:59 +01: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
toaster
78b8def506 Allow fromnetsave to be used in P_SpawnSpecialsThatRequireObjects (missed element of the level load executor fix). 2022-03-18 19:59:28 +00:00
LJ Sonic
66a08a391b Don't call map load trigger linedefs when joining or reloading gamestate 2022-03-18 18:40:27 +00:00
toaster
1f5eb2c442 Correct non-compiling iterators that retained their initialisation from the earlier pushes. 2022-03-18 16:50:13 +00:00
toaster
487103bc47 Remove TAG_ITER_DECLARECOUNTER and the level field on the iterator macros.
Declare the position counters inside the for loops instead; RIP C90.

# Conflicts:
#	src/p_mobj.c
#	src/p_spec.c
2022-03-18 16:43:03 +00:00
toaster
fab0897800 Check against null tmpusher source before attempting to push a thing.
# Conflicts:
#	src/p_spec.c
2022-03-18 14:08:29 +00:00
toaster
9fe2184c08 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into fast-addfile 2022-03-12 17:39:18 +00:00
SteelT
606eb28314 Linedef type 460: Don't award rings while SPB-locked 2022-01-20 03:20:53 -05:00
James R
d06355018d Track skybox within player struct
TODO: Lua

Splitscreen and change viewpoint uses the proper skyboxes!
2022-01-17 22:46:01 -08:00
Sally Coolatta
ef5a4f01d4 Merge branch 'master' into terrain-lump 2022-01-04 12:34:47 -05:00
Sally Coolatta
cc250afd45 P_InitAngle, to fix angle interpolation on spawning objects 2021-12-24 12:45:51 -05:00
James R
ffa2af7e07 Disable flat animdefs
The speed up is significant.
2021-12-16 22:25:08 -08:00
Sally Coolatta
b3d3135c58 Instead of embedding specific textures to be tripwire in hardcode ... make it a TERRAIN flag! 2021-12-09 15:54:22 -05:00
Sally Coolatta
bf4b47a2cf Merge branch 'master' into terrain-lump 2021-12-09 03:46:01 -05:00
Sally Coolatta
e212f947ad Implement the sector special-like effects
Offroad, sneaker panels, trick panels, and damaging floors can now be set via terrain.
2021-12-09 03:20:45 -05:00
SteelT
d0caa79414 Merge branch 'snapify-hitlag' into 'master'
Snapify Hitlag 2

See merge request KartKrew/Kart!461
2021-12-08 01:53:28 +00:00
James R
2276304c1d Don't skip other line specials if a trip wire is passed 2021-11-28 04:09:15 -08:00
James R
8e20ca4c04 TRIPWIRE
Set a sidedef's midtexture to "TRIPWIRE" to turn that line
into a tripwire.

Players can't drive through a tripwire and will bounce
back at high speed if they're in one of the following
states:

1. Invincibility / Grow
2. Sneakers
3. Flame Shield dash
4. >200% on the speedometer

Hitting a tripwire plays a sound, sends you into hitlag,
then plays another sound when the hitlag is over. The
sounds used depend on whether you can drive through the
tripwire.
2021-11-28 03:03:43 -08:00
Sally Coolatta
c1b34d4d4f A few more instances 2021-11-28 00:32:07 -05:00
Sally Coolatta
15556dce0b Quakes are scaled with map scale
Finally
2021-11-28 00:25:40 -05:00
toaster
c08c716682 Merge branch 'master' into purple-spark
# Conflicts:
#	src/k_kart.c
#	src/p_spec.c
2021-04-20 09:59:22 +01:00
lachablock
b96394415b Spawn electric sparks on first blood 2021-04-20 16:25:43 +10:00
lachablock
5e327e09c6 Merge master (resolve structgunch conflicts) 2021-04-20 16:09:59 +10:00
toaster
00972a83d2 remove the prefix since everything seems to function 2021-04-17 11:30:08 +01:00
Sally Coolatta
0e2b36e484 Purple sparks 2021-04-16 23:00:58 -04:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
toaster
ebe38ff518 * Add a blend field to FOFs.
* Set via a fourth digit in the upper midtexture for transparent FOFs
        * For example - #2551 is additive solid, #1282 is subtractive half...
    * The original method of setting the upper midtexture to #900 or 901 still works, since I'm not out to break existing maps.
* Software: Remove the horrible `else if` ladder for FOF translucency. Algorithms, baby!
* OpenGL: Move to using `HWR_GetBlendModeFlag` in more places, for more long-term extensible support for multiple blendmodes.
2021-04-01 23:45:21 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Sally Coolatta
f540156bbf Fully fix taglist for james scroller 2021-02-28 23:11:51 -05:00
Sally Coolatta
7dca95da14 Fix scroller merge 2021-02-28 23:01:46 -05:00
Sally Coolatta
caa5314866 Get past some taglist stuff 2021-02-28 22:58:30 -05: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
toaster
08d087c6b5 Acceleration Kickstart, my little hobby project.
It's no secret that holding down a button a lot can fuck with your wrists and fingers. It's too late for me to be damageless, but I can at least create an option to reduce further harm.

This accessibility feature, when enabled (kickstartaccel and kickstartaccel2/3/4 in the console) behaves with the following properties:
* Hold accelerate for 1 second to lock it down.
* Press again to release.
* Short holds/presses do nothing (good for POSITION).
* Continue holding it during the releasing press to re-lock it.
* A small triangular UI element is added next to the speedometer sticker, which displays the current state of the acceleration kickstart for visual feedback. (NO SPLITS SUPPORT YET)

In addition:
* Add PF_ACCELDOWN and PF_BRAKEDOWN, and BT_REALACCELERATE (which ACCELDOWN tracks). Even if this feature never gets merged, BT_REALACCELERATE is required because sneakers and boosters force it on too (extending this is how I implemented it).
* Fix the dehacked playerflag list being out of shape.
* I replaced some existing flags during development of this branch, so their old uses have been whittled away.
2021-02-20 23:10:18 +00:00
Sal
ea2223abe6 Merge branch 'once-in-battle' into 'master'
Don't disable linedef executors other than 308 outside of Race

See merge request KartKrew/Kart!380
2021-02-14 21:13:51 -05:00
James R
d6ea8549d2 Scale end sign 1.5x 2021-02-13 21:38:22 -08:00
James R
a9a1779e19 Only disable 308 outside of Race 2021-02-13 20:10:12 -08:00
LJ Sonic
85cd429d1d Revert "Replace all instances of P_AproxDistance with FixedHypot"
This reverts commit 498ff708bb.
2021-02-13 17:45:20 +01:00
Sally Coolatta
1849f70359 Merge branch 'master' into waypoints-disable 2021-02-12 20:28:16 -05:00
Sally Coolatta
1f7fd96e32 Bot controller linedef
Controls bot behavior while they're touching a tagged sector.

X texture offset is angle to force the bot in (0 is east, 90 is north, 180 is west, 270 is south)

Y texture offset is trick type -- if a bot enters the sector while in trick panel state, then they'll do the input for the trick. Without the effect present, they'll do nothing and eventually tumble.
Y offset 1 does a left trick, 2 is right, 3 is forward, 4 is back/up.
2021-02-11 19:08:44 -05:00