Compare commits

...

1063 commits

Author SHA1 Message Date
Sal
0905f55cf9 Merge branch 'sprint-finish' into 'master'
Disable bot controls after sprint map finish (resolves #260)

Closes #260

See merge request KartKrew/Kart!613
2022-06-07 20:35:22 +00:00
Sal
b3cddc1d1c Merge branch 'spb-hitlag' into 'master'
Make SPB match its target's hitlag

See merge request KartKrew/Kart!614
2022-06-07 20:34:55 +00:00
Sal
e75cb04a44 Merge branch 'bounce-followers' into 'master'
Add bouncing followers

See merge request KartKrew/Kart!611
2022-06-07 20:34:05 +00:00
AJ Martinez
79cf985380 Allow bot control if knocked backwards after sprint finish 2022-05-31 21:00:59 -05:00
Sally Coolatta
3164199512 Reset state when bouncing 2022-05-31 21:53:19 -04:00
AJ Martinez
bf976a7bca Make SPB match its target's hitlag 2022-05-31 17:04:41 -05:00
AJ Martinez
12563d254a Disable bot controls after sprint map finish (resolves !260) 2022-05-31 16:40:00 -05:00
Sally Coolatta
c3bb2c8539 Add bouncing followers
Set `BobAmp` on a ground follower to set its bouncing velocity.
2022-05-31 07:28:30 -04:00
Sal
30f60585be Merge branch 'colour-persistence' into 'master'
Player colour persistence (resolves #255).

Closes #255

See merge request KartKrew/Kart!610
2022-05-30 21:58:07 +00:00
toaster
80f2111f00 Correct player colour persistence, *actually* resolving #255.
An explanation for the approach: I started writing a whole system where an extra pflag would be defined for "colour is not currently the player's ACTUAL colour". Then I looked at the actual code flow that would be affected by it - the single line guarded by `if (forcereset)` - and decided it was simpler to just do an extra write in this once-per-player-per-frame function instead of increasing across-the-board complexity.
2022-05-30 16:37:01 +01:00
Sally Coolatta
286f1c34a5 Prevent bots crash when there's no waypoints 2022-05-28 03:58:49 -04:00
James R
f1e119527d Merge branch 'draw8uno' into 'master'
draw8 cleanup

See merge request KartKrew/Kart!598
2022-05-27 23:04:42 +00:00
Sally Coolatta
d5c384bf02 Fix even slope lighting being inconsistent 2022-05-27 18:34:52 -04:00
Sal
ea96a33e41 Merge branch 'bot-rubberband-edit' into 'master'
Drastically simplified bot rubberbanding

See merge request KartKrew/Kart!604
2022-05-27 06:49:51 +00:00
Sally Coolatta
8b8933fa1a Fix incorrectly gotten bot controller line ID 2022-05-27 02:49:36 -04:00
Sal
1a4a599d96 Merge branch 'slope-lighting' into 'master'
Directional Lighting

See merge request KartKrew/Kart!608
2022-05-27 05:17:13 +00:00
Sally Coolatta
828e5e7c81 Rival bot in GP gets x2 tether power increment 2022-05-26 00:29:51 -04:00
Sally Coolatta
2cbcc8f914 Adjust acceleration for rubberbanding
Since your acceleration is tied to your top speed, we need to do this to ensure we're ONLY increasing the top speed, and not how fast they make it to that top speed.
2022-05-26 00:25:54 -04:00
Sally Coolatta
8815b065b3 Merge branch 'master' into bot-rubberband-edit 2022-05-25 23:29:04 -04:00
Sally Coolatta
f05ac93633 Fix the two big problems with the lighting
- FULLY fix light offset still being applied on full bright walls
- Fix ceiling lighting being reversed
2022-05-25 16:16:20 -04:00
Sally Coolatta
1b5c9e47c5 Fix 255 / 0 prevention not working on lines 2022-05-25 05:08:35 -04:00
Sally Coolatta
8d8650c5f1 Merge branch 'master' into slope-lighting 2022-05-25 04:06:25 -04:00
James R
0bcabbb88a Merge branch 'grow-adjustments' into 'master'
Minor Grow scale corrections

See merge request KartKrew/Kart!605
2022-05-25 08:05:40 +00:00
Sally Coolatta
bc3a82b610 Merge branch 'master' into slope-lighting 2022-05-25 04:04:38 -04:00
James R
1f54579c03 Merge branch 'blockmap-cock' into 'master'
Fix blockmap WILD inconsistency when it's not PIT_CheckThing

See merge request KartKrew/Kart!601
2022-05-25 08:03:01 +00:00
James R
dac2f4495e Merge branch 'hyu' 2022-05-25 00:43:32 -07: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
Sally Coolatta
ec02e75f0d Implement directional lighting
(Sloped ceilings are reversed and not sure what to do about it)
2022-05-25 02:51:08 -04:00
Sally Coolatta
b6ed17d9fc Allow adjusting map contrast 2022-05-24 23:04:48 -04:00
Sally Coolatta
dc890caef3 Add slope lighting
Makes slopes at a great enough steepness able to match the contrast of walls.

COMING SOON: Directional lighting & contrast modifier, as options for map header.
2022-05-24 22:23:04 -04:00
Sally Coolatta
ea477cb69a Make OpenGL use hwLightOffset instead of calculating every time
Fake contrast setting is no more
2022-05-24 20:09:32 -04:00
Sally Coolatta
b777b3f96a Don't apply wall light offsets on brightness 255 or 0
Makes skyboxes look better
2022-05-24 19:24:57 -04:00
Sally Coolatta
abb5cf71b8 Waypoint sight improvements
- Reorganized bot traversal
- Blocking line traversal includes tripwire
- Next waypoint detection uses blocking line trace now (this means bots can't sit outside of a tripwire wanting to go through it)
2022-05-24 17:30:42 -04:00
Sally Coolatta
6afa7dfc4b Set tmx & tmy for P_LineOpening in bot code
(The more this issue happens, the more we need to take the GZDoom approach of keeping this shit in a struct that you have to put in as a function argument, instead of global variable hellzone...)
2022-05-24 15:44:27 -04:00
Sally Coolatta
a896d73334 Precalculate bot controller & rubberbanding
These both require a couple loops to preform each, which probably adds up over multiple bots. Let's just precalculate them at the start of bot ticcmd.
2022-05-24 15:28:36 -04:00
Sally Coolatta
529a99bc17 Bot Controller E2 disables their movement entirely 2022-05-24 14:37:43 -04:00
toaster
bf6d257cfb Prevent rings from suddenly growing in size when a Grow player interacts with them, to match how using rings while grown or shrunk have them at mapobjectscale. 2022-05-24 18:41:13 +01:00
toaster
0d82b075b0 Fix Grow on Trick Panels sending you to ridiculous heights. 2022-05-24 18:09:40 +01:00
Sal
8b9adb1b4c Merge branch 'follower-maintenence' into 'master'
Follower angle lag + lookback

See merge request KartKrew/Kart!597
2022-05-24 06:49:15 +00:00
Sal
5c2477348a Merge branch 'trick-threshold' into 'master'
Trick threshold

See merge request KartKrew/Kart!599
2022-05-24 06:48:59 +00:00
Sal
7b64b07494 Merge branch 'shorter-turn-lockout' into 'master'
Adjust steering lock after successful DI

See merge request KartKrew/Kart!602
2022-05-24 06:48:46 +00:00
Sally Coolatta
c678146f0c Drastically simplified bot rubberbanding 2022-05-23 23:59:18 -04:00
Sally Coolatta
052e72c409 PIT_CheckThing valid checks more consistent 2022-05-23 19:20:21 -04: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
AJ Martinez
849dd2926f Futureproof loss-of-control check 2022-05-23 16:57:48 -05:00
AJ Martinez
3bc5fac430 Adjust steering lock after successful DI 2022-05-23 16:47:27 -05: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
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
4b70a64b3f Ground follower mode 2022-05-23 15:51:00 -04:00
toaster
0e31d2e9a6 * Tricks now have a minimum stick tilt of 1/4th of the data range to activate.
* This tilt is a *difference* between the axes, so a slight diagonal shouldn't intefere.
2022-05-23 20:12:31 +01:00
Sally Coolatta
6e3c4dbc34 > numfollowers-1 -> >= numfollowers 2022-05-23 13:40:51 -04:00
Sally Coolatta
d8b7967a22 Make all instances of this sine use M_TAU_FIXED 2022-05-23 13:38:53 -04:00
Sally Coolatta
0e60a3ef26 Increase default horzlag to 3
This value is closer to how the old value felt before the tracking was improved.
2022-05-23 04:10:20 -04:00
Sally Coolatta
d1d9a5bd10 Fix follower menu crash 2022-05-23 03:03:16 -04:00
Sally Coolatta
69023a96ee More bobspeed fix 2022-05-23 02:59:52 -04:00
Sally Coolatta
ab9d474e9b Fix follower color on menu
(not that it even uses the real color, buuut...)
2022-05-23 02:57:46 -04:00
Sally Coolatta
6574f822a4 Fix bobspeed + menu z offset 2022-05-23 02:57:20 -04:00
Sally Coolatta
fcff62fc9e Lag of FRACUNIT matches your position exactly 2022-05-23 02:45:32 -04:00
Sally Coolatta
d67c658643 Fix angle lag not working
(Why was angle being set again above this...)
2022-05-23 01:09:58 -04:00
Sally Coolatta
f8ad0a28e7 Fix anglelag typo 2022-05-23 00:40:37 -04:00
Sally Coolatta
cda0441abb Follower angle lag + lookback
- ANGLELAG lets you set how fast the followers swivel around. Default is 8*FRACUNIT, old behavior can be returned with FRACUNIT.
- Followers reverse their angle when you hold the lookback button.
- All lag values can't go below FRACUNIT instead of 1.
2022-05-23 00:36:03 -04:00
Sally Coolatta
b5334e6b42 Move follower code to its own file 2022-05-23 00:23:46 -04:00
James R
a12c88c5e2 Strip items after stealing with Hyudoro 2022-05-22 19:20:27 -07:00
Sally Coolatta
800dcc6302 Revert "Some asserts in hyu code"
This reverts commit 0ce466e7ef.
2022-05-22 22:02:31 -04:00
Sally Coolatta
61d61dcf25 Revert "EVEN MORE"
This reverts commit 5ef78cbc16.
2022-05-22 22:02:21 -04:00
Sally Coolatta
098304bd99 Allow hyu thru tripwire 2022-05-22 22:00:54 -04:00
Sally Coolatta
5ef78cbc16 EVEN MORE
(also removed the define replacements since didn't work)
2022-05-22 21:41:40 -04:00
Sally Coolatta
0ce466e7ef Some asserts in hyu code
Instead of letting it crash due to a NULL subsector later, let it crash earlier so I can see what is happening...
2022-05-22 21:34:24 -04:00
Sally Coolatta
c8718b25ff REMOVE hyubgone + all of the other bullshit we did to try and make it show up less 2022-05-22 21:17:14 -04:00
Sally Coolatta
543928b5bb Adjust Hyuu frequency 2022-05-22 21:04:52 -04:00
Sally Coolatta
fa8dab86c2 Merge branch 'master' into hyu 2022-05-22 20:27:37 -04:00
Sally Coolatta
644b9e1acd Merge branch 'master' into hyu 2022-05-22 20:27:14 -04:00
Sal
14053a55cd Merge branch 'tilttrack-absolution' into 'master'
Fix HUD tracking with viewrollangle

See merge request KartKrew/Kart!593
2022-05-23 00:25:34 +00:00
Sal
e492a04976 Merge branch 'lookback-snapback' into 'master'
Fix lookback interpolating

See merge request KartKrew/Kart!596
2022-05-23 00:19:50 +00:00
Sal
d7591b0656 Merge branch 'turn-predict' into 'master'
Bring back camera prediction

See merge request KartKrew/Kart!592
2022-05-23 00:18:22 +00:00
Sally Coolatta
6f42d84b2a Fix turn prediction in F12 2022-05-22 19:49:33 -04:00
toaster
9a02a6466c Make all inline increments of dest and dsrc occur on seperate lines, for extra clarity and making it easier to identify future issues with these functions. 2022-05-23 00:09:03 +01:00
Sally Coolatta
85aa7361c2 Put a comment about camera easing 2022-05-22 18:03:32 -04:00
toaster
f6df8200d2 Increment ds_x1 regardless of whether pixel is BRIGHTMAP'd or not. 2022-05-22 22:59:15 +01:00
Sally Coolatta
ada9336137 OK go back to easing, but now actually work 2022-05-22 17:49:34 -04:00
Sally Coolatta
4f9642f537 Do not register servers twice
Advertise_OnChange is CV_NETVAR, so the server will get registered by CV_LoadNetVars when the server starts.

This race condition occasionally pops up in master, but got very consistent with uncapped.
2022-05-22 22:29:02 +01:00
toaster
946beabdf6 Fix lookback interpolating
# Conflicts:
#	src/p_setup.c
#	src/r_fps.c
2022-05-22 22:25:17 +01:00
Sally Coolatta
fa792e3378 Merge branch 'master' into turn-predict 2022-05-22 16:50:19 -04:00
toaster
47f3992cef Merge branch 'kickspindash' into 'master'
Kickstart Accel Spindash Fix

See merge request KartKrew/Kart!595
2022-05-22 20:49:42 +00:00
toaster
0498ed531a Spindashing now considers kickstart accel-produced BT_ACCELERATEs to be legal. 2022-05-22 21:47:37 +01:00
Sally Coolatta
c9e685be66 Nope, that didn't work, move by your max turn speed until you reach it 2022-05-22 16:30:27 -04:00
Sally Coolatta
986bcddbfc Ease prediction angle
Might feel laggier, might feel better because it gets rid of jitter? idk
2022-05-22 16:21:07 -04:00
Sally Coolatta
0dc472a255 Try resetting driftend 2022-05-22 15:38:08 -04:00
Sally Coolatta
51bde5c934 Merge branch 'master' into turn-predict 2022-05-22 14:42:54 -04:00
Sal
0973f8e806 Merge branch 'mksc-hit-confirm' into 'master'
Super Circuit hit confirms

See merge request KartKrew/Kart!594
2022-05-22 18:40:33 +00:00
Sally Coolatta
f1f45c651c not local 2022-05-22 14:39:54 -04:00
Sally Coolatta
83b5bfef59 Super Circuit hit confirms
After getting hit, you'll hear the person who hit you's hit confirm from any distance
2022-05-22 03:26:32 -04:00
Sally Coolatta
7891b10328 Merge branch 'master' into hyu 2022-05-21 22:38:15 -04:00
Sal
15a4601a30 Merge branch 'uncapped-absolution' into 'master'
Uncapped (squashed v2)

Closes Kart-Public#10

See merge request KartKrew/Kart!579
2022-05-22 01:27:01 +00:00
Eidolon
25e9815d82 Update interpolation during objectplace 2022-05-21 14:41:06 -05:00
Eidolon
2742467f9e Tweaks for kart v1 MR comments 2022-05-21 12:43:28 -05:00
toaster
9c0e793088 Incorporate some of the advances from tilttrack.
* Set view context in the player HUD loop inside `ST_overlayDrawer()`.
* The HUD code now gets all interpolated camera data from the view context instead of half-heartedly recreating it.
* Move Lua HUDlib data to the view context system instead of an else ladder.
* View roll support in HUD tracking, because the other changes made this trivial.
* Remove old_viewrollangle as it is now redundant.
2022-05-21 16:51:03 +01:00
toaster
dff5fc37f1 Fixed effective viewroll doubling. 2022-05-21 15:33:35 +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
James R
ef8a8061ed Merge branch 'shortcut-waypoints-fix' into 'master'
Small waypoint fixes

See merge request KartKrew/Kart!591
2022-05-21 09:13:26 +00:00
James R
8718d2c2f3 Merge branch 'rewrite-lightning' into 'master'
Lightning Shield fixes

See merge request KartKrew/Kart!589
2022-05-21 09:13:17 +00:00
James R
7962a0a851 Merge branch 'di' into 'master'
Directional Influence

See merge request KartKrew/Kart!588
2022-05-21 09:12:56 +00:00
Sally Coolatta
04aa8259cb Merge branch 'master' into rewrite-lightning 2022-05-21 03:56:12 -04:00
Sally Coolatta
50f26624fd Merge branch 'master' into di 2022-05-21 03:50:04 -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
8035f7afaf Merge branch 'master' into di 2022-05-21 03:46:22 -04:00
Sally Coolatta
97b7178d36 Move to new Discord rich presence app 2022-05-21 03:36:17 -04:00
Sally Coolatta
4b149c103c Bring back camera turn prediction
REALLY complicated, because just emulating player turning in ticcmd code is broken.
2022-05-21 03:11:37 -04:00
SteelT
8e67946a58 Replace default home folder name and base filename used for screenshot/gifs 2022-05-20 23:08:28 -04:00
Sally Coolatta
e02ebfa20d No respawn waypoints are transparent 2022-05-20 22:41:52 -04:00
Sally Coolatta
a3592da4f1 More waypoint debug visualizations
- Shortcut waypoints are pink now instead of blue. (barkley's ran into the issue of a shortcut waypoint on the main path too many times)
- Waypoint debug uses a shaded blue sphere sprite instead of a thok sprite, because it makes the color easier to see on different backgrounds.
- Use 1 splat for waypoint radius instead of shittons of orbs
2022-05-20 22:32:23 -04:00
Sally Coolatta
69aa74b9bf Allow pathfind traversal thru shortcuts when starting from one
Fixes shortcut pathfinding behavior when the entire shortcut's waypoints have the flag instead of only the entrance.
2022-05-20 21:59:45 -04:00
James R
36cd517dce Revert wrong replace 1d79eb70c 2022-05-20 17:24:13 -07:00
SteelT
0906252f41 Replace SDL_icon.xpm with copy exported from GIMP
Wasn't actually being displayed on the window before
2022-05-20 20:13:11 -04:00
James R
1d79eb70c1 Replace just a few more instances of SRB2Kart 2022-05-20 17:08:18 -07:00
James R
34f40c48ca Makefile: change EXE name to ringracers 2022-05-20 17:01:25 -07:00
James R
45606cadd9 Fix SDL_icon.xpm compile 2022-05-20 16:55:21 -07:00
Sally Coolatta
98016ef390 Icons + other tweaks to rebranding
Replaced most drrr (mostly only used in system / exe stuff) with the more verbose "ringracers"
2022-05-20 19:42:34 -04:00
James R
1835605619 Merge branch 'yeaaaa-bots-lets-go' into 'master'
More Bot Improvements (Again (Again))

See merge request KartKrew/Kart!570
2022-05-20 23:32:01 +00:00
Sally Coolatta
99a5290e2e Lightning Shield has infinite draft distance now
It's really pointless on Flame Shield, and Lightning Shield is boring.

Flame Shield should just get a different passive.
2022-05-20 18:18:41 -04: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
Sally Coolatta
56c23339be Directional Influence
Pretty much just copy+pasted from Snap the Sentinel!!
- Hold left/right to adjust the momentum angle after hitlag, up to 22.5 degrees. (Only angle can be adjusted, so you can't adjust your speed, only your direction.)
- It's relative to your angle, so sometimes you need to use forward/back, or even diagonals (forward/back throws now store full analog data for this to work)
- Bananas flip DI direction, to make them not baby easy mode
- Tumble has x3 DI (so angle adjustments of 67.5!!), and hitlag on each bounce to allow even more control.
2022-05-20 01:45:16 -04:00
Eidolon
8dc3890e11 Make character cursor framerate-independent 2022-05-19 21:10:35 -05:00
Sally Coolatta
5ae8664b70 Try putting lagless camera stuff back 2022-05-19 16:51:26 -04:00
Sally Coolatta
76b4804e44 Use double instead of precise_t for FPS counter
Makes the displayed FPS more accurate to what it's actually displaying.

Also removed HUDTRANS from it -- stop it fading out during level transitions, it's annoying when I actually want to see the FPS during those bits.
2022-05-19 16:44:26 -04:00
Sally Coolatta
852e9b8ce9 Rebrand all console / window stuff 2022-05-19 15:10:47 -04:00
Sally Coolatta
4a9cf76f37 Remove old kart title screen sounds 2022-05-19 14:51:13 -04:00
Sally Coolatta
a83504c1a4 WIP title screen 2022-05-19 03:19:33 -04:00
Eidolon
64d0649c90 Defensively recreate title drawlist
Avoids a crash when connecting to a server in the Intro
2022-05-18 21:06:46 -05:00
Eidolon
2c36a8cefe Don't interpolate during net lag 2022-05-17 20:04:26 -05:00
toaster
ee21b2493a Merge branch 'powerup-clash' into 'master'
Add FX for powerup clash collision (implements #250)

Closes #250

See merge request KartKrew/Kart!587
2022-05-17 23:31:11 +00:00
toaster
a9f6897618 Merge branch 'fast-addfile' into 'master'
Improve addfile performance

See merge request KartKrew/Kart!500
2022-05-17 23:30:28 +00:00
toaster
a044ea76f7 I made skin loading 2/15ths faster on my machine by inverting this jump conditional 2022-05-16 21:47:20 +01:00
toaster
80c14cd6ac use missingnum instead of re-calling W_GetNumForName 2022-05-14 19:18:57 +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
884064049e * Allocate the "MISSING" patch only once, statically, at first boot via missingpat, and prevent it from being freed.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
    * If desired graphic is not present in resources:
        * If required is true, return `missingpat`.
        * If false, return NULL as before (font compatibility).
    * Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.
2022-05-14 14:56:02 +01:00
toaster
ea6aaa3321 Merge branch 'master' into fast-addfile
# Conflicts:
#	src/k_hud.c
2022-05-14 13:41:59 +01:00
AJ Martinez
d837961c7b This table is not a place of honor 2022-05-13 16:07:43 -05:00
AJ Martinez
dd48ec2df5 Add FX for powerup clash collision 2022-05-12 17:54:12 -05:00
Sally Coolatta
9795f21c33 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart 2022-05-12 17:35:17 -04:00
Sally Coolatta
4e740ea683 WHY IS IT NOT ON BY DEFAULT 2022-05-12 17:35:14 -04:00
James R
11f97049b1 Merge remote-tracking branch 'origin/master' into uncapped-absolution 2022-05-11 17:09:59 -07:00
James R
7568e84f2e Merge branch 'fix-wrong-mainwads' 2022-05-11 17:09:31 -07:00
James R
900d9e0276 Merge branch 'tiny-try-move-16' into 'master'
Cap TryMove radius to 16x map scale

See merge request KartKrew/Kart!586
2022-05-12 00:05:36 +00:00
James R
d541651937 Merge branch 'brake2' into 'master'
Brake dust

See merge request KartKrew/Kart!585
2022-05-12 00:05:18 +00:00
James R
b89bf775df DEVELOP: don't let clients download mainwads 2022-05-11 17:04:18 -07:00
James R
6fe36193a2 Scale brake drift sparks up to 3x 2022-05-11 15:40:09 -07:00
James R
86cea709ef Fix brake dust double scaling 2022-05-11 15:34:22 -07:00
James R
1f73f98e7a Remove fullbright from Brake Dust 2022-05-11 13:09:18 -07:00
James R
266f1c9a65 Cap TryMove radius to 16x map scale 2022-05-11 12:45:00 -07:00
James R
730e00ab19 Brake dust
- Spawns outward from both front wheels, from outer wheel
only if brake-drifting.
- Scales with speed, up to 200%. Also applies to drift
sparks.
2022-05-11 12:34:42 -07:00
James R
364651ac39 Remove Brak Eggman 2022-05-11 12:25:58 -07:00
toaster
e28295635c Merge branch 'gcc-12-warnings' into 'master'
Fix GCC 12 warnings

See merge request KartKrew/Kart!584
2022-05-11 19:24:53 +00:00
James R
7579cf1b10 Fix misc warnings for GCC 12 2022-05-11 12:21:18 -07:00
Roberto Ierusalimschy
199c40a14d useless test removed (pointed by lint) 2022-05-11 12:17:49 -07:00
James R
71833862b2 Make tripwire speed lines Lilac and additive 2022-05-09 18:45:35 -07:00
James R
8164d63078 Merge remote-tracking branch 'origin/tripwire-leniency' 2022-05-08 22:19:27 -07:00
James R
5293b151be Merge branch 'rewrite-mines' into 'master'
Rewrite mines

See merge request KartKrew/Kart!581
2022-05-09 05:15:31 +00:00
James R
6df43062b0 Merge branch 'invinc-efx' into 'master'
Invincibility updates

See merge request KartKrew/Kart!583
2022-05-09 05:14:57 +00:00
SteelT
7255690482 Restore refreshdirmenu = 0 line that was removed
Fixes the "file was loaded with error" semi-softlock
2022-05-08 12:32:45 -04:00
Sally Coolatta
72d77f7fb5 Invincibility updates
- You flash white while in invincibility
- Invincibility is not rainbow UNTIL you go above the initial timer.
- Increased visibility of the shield effect around invincible players.
- Invincibility sparkles have trailing afterimages.
- Disabled invincibility speed lines; they now use the normal speedlines but grey/rainbow. (The code/sprites will be used for something later.)
- Using invincibility adds time, instead of setting it.
- Player hitbox is finally bigger, to actually match the shadow size.
2022-05-08 03:43:53 -04:00
Sally Coolatta
5d0ed5e9e0 Tripwire leniency efx 2022-05-08 01:44:12 -04:00
Sally Coolatta
9ab0e028d4 Tripwire leniency
1 full second after entering a tripwire state, you can still go through tripwires
2022-05-08 01:03:11 -04:00
Sally Coolatta
1381a56077 Rewrite mines
Get rid of the tons of extra objects it uses for sounds & collision, do it all from the actual object PLEASE...
2022-05-07 22:59:38 -04:00
Sally Coolatta
cb393a87f5 Readd NOTHINK since interpolation is handled outside of thinker 2022-05-07 20:42:40 -04:00
toaster
c0830d1ddc Merge branch 'testers220430' into 'master'
Minor prep for 220430 test

See merge request KartKrew/Kart!576
2022-05-07 13:53:03 +00:00
toaster
1fbe04bd6d Merge branch 'spindash-tweaks' into 'master'
Spindash tweaks

See merge request KartKrew/Kart!578
2022-05-07 13:09:20 +00:00
Sally Coolatta
e3a51b1a5a Use multiplier for FPS counter 2022-05-07 07:33:03 -04:00
Sally Coolatta
d262190faf Fix compiling with da strict settings
Moved from gnu99 to gnu11 because I think unnamed union is reasonable, and will also cause a lot of problems down the road if we ever need changes!!
2022-05-07 07:23:26 -04:00
Eidolon
f7ec2f182f Uncapped (squashed v2)
Squashed SRB2 2.2 Public uncapped without UDMF merge

Implement interpolation at the renderer level

Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.

Place Frame Interpolation in "Experimental" video options header

This seems like an appropriate way to describe the feature for now.

Add smooth level platter under interpolation, `renderdeltatics`

`renderdeltatics` can be used as a standard delta time in any place,
allowing for smooth menus. It will always be equal to `realtics`
when frame interpolation is turned off, producing consistent
framerate behavior everywhere it is used.

Add smooth rendering to save select screen

Add smooth rendering to Record/NiGHTS Attack, F_SkyScroll

Ensure viewsector is accurate to viewx/viewy

This fixes a potential crash in OpenGL when changing between levels.

Ensure + commands get executed before map start

Always have precise_t defined

Fix misc dropshadow issues

Reset view interpolation on level load

Remove unnecessary precipmobj thinker hack

Add reset interpolation state functions

Reset precip interpolation on snap to ceil

Reset mobj interp state on TeleportMove

Only swap view interp state if a tick is run

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames

Homogenize mobj interpolations

Add sector plane level interpolations

Add SectorScroll interpolator

Add SideScroll interpolator

Add Polyobj interpolator

Intialize interpolator list at a better time

Delete interpolators associated with thinkers

Interpolate mobj angles and player drawangle

Interpolate HWR_DrawModel

Add functions to handle interpolation

Much less code duplication

P_InitAngle, to fix angle interpolation on spawning objects

Fully fix drop shadows

It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.

Do not speed up underwater/heatwave effect in OpenGL

Closer OpenGL underwater/heatwave effect to Software

Interpolate from time of previous tic

Previously interpolated from last 35th of a second, which
may be offset from game time due to connection lag.

Consider this the proper fix to 6ecac4159a too.

Calculate FPS stuff even if frame is skipped

I decided ultimately to actually keep the frame skip optimization disabled, because I think it is actually a little bit helpful that you can still get accurate rendering perfstats while paused, however if we decide otherwise then we can have this optimization back without making the game act like it's lagging.

Keep rect in memory

Feel better about this than creating one all da time

Lots of FPS stuff

- Disabled VSync, due to the numerous problems it has.
- Instead, added an FPS cap.
- Frame interpolation is now tied to fpscap != 35.
- By default, the FPS cap is set to the monitor's refresh rate.
- Rewrote the FPS counter.

(This also consolidates several more commits ahead of this
fixing various issues. -eid)

Misc changes after Kart cherry-picks

Fix renderdeltatics with new timing data

Update mobj oldstates before all thinkers

Allow FPS cap values

Adjust how FPS cap is checked to improve FPS stability

Fix precip crash from missing vars

Improve the framerate limiter's timing for extreme stable FPS

Handle the sleep at the end of D_SRB2Loop instead of the start

Simplifies logic in the other parts of the loop, and fixes problems with it frequently waiting too long.

Reset mobj interp state on add

Add mobj interpolator on load netgame

Move mobj interpolators to r_fps

Dynamic slope interpolators

I_GetFrameTime to try and improve frame pace

(It doesn't feel that much better though.)

Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code

Fix plane interpolation light level flickering

Fix flickering plane interpolation for OpenGL in the exact same way

Funny OpenGL renderer being at least 50% copy-pasted Software code :)

P_SetOrigin & P_MoveOrigin to replace P_TeleportMove

Convert P_TeleportMove use to origin funcs

Revert "P_InitAngle, to fix angle interpolation on spawning objects"

This reverts commit a80c98bd164a2748cbbfad9027b34601185d93f5.

Waypoint polyobjects interpolate z & children

Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)

Reset overlays interp states each TryRunTics

Interpolate model interpolation (lol)

Use interp tracer pos for GL linkdraw

Papersprite angle interpolation

Makes the ending signpost smooth

Move intermission emerald bounce to ticker

Bring back shadows on polyobjects

Also optimizes the method used so rings can show their shadows too. Using just the subsector is a tad bit imprecise admittedly but any more precise methods get really laggy.

Fix a bunch of ticking in hu_ drawing functions

Revert "Reset overlays interp states each TryRunTics"

This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.

Move intro ticking out of the drawer

Adjust 1up monitor icon z offsets

Fixes interpolation issues with 1up monitors.

Delta time choose player menu animations

Add drawerlib deltaTime function

Interpolate afterimages further back

Use old sleep in dedicated mode

Clamp cechotimer to 0

Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).

Revert "Remove unnecessary precipmobj thinker hack"

This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.

Fix frame pacing when game lags behind

The frame timestamp should've been made at the start of the frame, not the end.

Fix I_FrameCapSleep not respecting cpusleep

Jonathan Joestar bruh

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.

Make Lua TeleportMove call MoveOrigin

Reset Metal fume interp state on appear

Add interpdebug

Put interpdebug stuff in perfstats instead

Add timescale cvar

Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!

Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!

Force interpolation when timescale != 1.0

Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.

Fix cutscenes in interp

Fix boss1 laser in interp

Interpolate mobj scale

Precalculate refresh rate

Slower PCs can have issue querying mode over and over. This might kinda suck for windowed mode if you have different refresh rate displays but oh well

Fix interp scaling crashing software

Reset interp scale when Lua sets .scale

Disable angle interp on fresh mobjs

Fix interp scale crash for hires sprites

Interp shadow scales

Copy interp state in P_SpawnMobjFromMobj

Fix multiplayer character select

Don't interpolate mobj state if frac = 1.0

Fix Mario block item placement

Interpolate spritescale/offset x/y

Fix offset copies for SpawnMobjFromMobj

THANKS SAL

Add Lua HUD drawlists

Buffers draw calls between tics to ensure hooks
run at the originally intended rate.

Rename drawerlib deltaTime to getDeltaTime

Make renderisnewtic is false between tics

I know what I'm doing! I swear

Completely refactor timing system

Time is now tracked internally in the game using I_GetPreciseTime
and I_UpdateTime. I_Time now pulls from this internal timer. The
system code no longer needs to keep track of time itself.

This significantly improves frame and tic timing in interp mode,
resulting in a much smoother image with essentially no judder at
any framerate.

Ensure mobj interpolators reset on level load

Ensure view is not interpolated on first frame

Disable sprite offset interpolation (for now)

Refactor timing code even more

System layer is greatly simplified and framecap
logic has been moved internally. I_Sleep now
takes a sleep duration and I_SleepDuration
generically implements a precise sleep with spin
loop.

Adjust spawned mobj z by gravity inversion

Only check VERTICALFLIP for old_z calc

Fix Marathon Mode menu for uncapped

Move screenshot code before timing

Only play emerald hunt sounds on new tics

Restore deleted zofs (fixes signpost sparkles etc)

Revert to before screenUpdate boolean was added

Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.

Run UpdateLevelInterpolators in preticker

Fixes KartKrew/Kart-Public#10

Run UpdateMobjInterpolators in preticker

Reset view interp in preticker

Add per-split player view resets
2022-05-06 22:47:39 -05:00
SinnamonLat
7a65dbfe8e use other magnetic sound for ebrake 2022-05-04 10:55:19 +02:00
SinnamonLat
3bcf4fd33b fix exploit where releasing only accel mid spindash would cancel it 2022-05-04 10:50:07 +02:00
SinnamonLat
bf09bdd642 ebrake sound 2022-05-03 23:51:37 +02:00
SinnamonLat
f80ef0e051 ignore offroad while in tiregrease 2022-05-03 23:37:32 +02:00
SinnamonLat
03056eb3b5 better ebrake/spindash visuals 2022-05-03 23:23:46 +02:00
SinnamonLat
464e4a338a wip: ebrake visuals 2022-05-03 03:35:01 +02:00
SinnamonLat
d843cc5b5c Spindash iframe ring drain based off of speed/weight 2022-05-03 02:16:22 +02:00
SinnamonLat
784a541c09 Spindash charge time rebalance + release thrust 2022-05-03 01:53:20 +02:00
James R
2de756d077 Fix typo 2022-05-01 18:31:17 -07:00
James R
64b8da086f Readjust race item odds for Hyudoro 2022-05-01 14:39:19 -07:00
James R
38ab22f022 Netsave player.hoverhyudoro 2022-05-01 14:04:25 -07:00
James R
2196ccef62 Add k_objects.h 2022-05-01 13:36:17 -07:00
James R
8fd251b54c Revert wrongly committed code 2022-05-01 13:36:01 -07:00
James R
3e8d50a44a Fix/finish hyudoro return delivery
- Fix item detection, matches paper sprite pickups
- Stacked hyudoros deliver item once player is not holding
2022-04-30 00:25:42 -07:00
James R
39ff9ce383 Remove orphaned MT_SHADOW 2022-04-29 23:43:25 -07:00
James R
c6e7fe2d29 Hyudoro object code 2022-04-29 22:02:22 -07:00
James R
910ebe9d0f Add objects subdirectory
For game object-specific code
2022-04-29 22:01:51 -07:00
James R
61399981a2 MT_SHADOW + SPR_NONE, teleports to tracer and renders only a shadow 2022-04-29 21:14:10 -07:00
James R
cd9777f0cb MT_GHOST: dont flicker tracer's DONTDRAW flags 2022-04-29 21:14:10 -07:00
James R
505e2db2c4 Add Hyudoro states 2022-04-29 21:14:10 -07:00
toaster
b88a34e07b Make the "DEVELOPMENT EXE" string on the title screen change in TESTER and HOSTTESTER builds. 2022-04-29 22:16:44 +01:00
toaster
2036a62043 Change when the kstart sound occours, because getting a lag spike at a bad time can still make it happen inaccurately early. 2022-04-29 21:54:22 +01:00
toaster
f13149c061 Merge branch 'droptargetsound' into 'master'
Dynamic sounds for drop target collision

See merge request KartKrew/Kart!575
2022-04-27 19:45:17 +00:00
AJ Martinez
87eed3ed1c Double droptarget sound range 2022-04-25 21:21:53 -05:00
AJ Martinez
4655df9d9e Dynamic sounds for drop target collision 2022-04-25 18:49:08 -05:00
toaster
2fc1770dc0 Merge branch 'sep-decringe' into 'master'
[minor refactor] Sep Decringe

See merge request KartKrew/Kart!573
2022-04-18 16:37:15 +00:00
toaster
2b2ba53e93 Minor refactor: Handle *sep entirely within S_AdjustSoundParams, instead of having a component partly outside. 2022-04-18 17:13:27 +01:00
Sal
346a93475d Merge branch 'split-somethings' into 'master'
Split Somethings

Closes #237 and #233

See merge request KartKrew/Kart!572
2022-04-18 15:19:51 +00:00
toaster
dfbff49a52 Delete accidentially-committed whitespace 2022-04-17 23:50:43 +01:00
toaster
440203ff89 Resolve #233 - Sounds with non-NULL sources now work when two or more players are near the sound origin. 2022-04-17 23:22:48 +01:00
toaster
8563074ee0 Resolve #237 - water ripple effects no longer show garbage in splitscreen. 2022-04-17 21:57:06 +01:00
Sally Coolatta
358cc9f215 Bad function declaration 2022-04-02 15:24:19 -04:00
Sally Coolatta
5ffba0a678 review 2022-04-02 15:24:18 -04:00
Sally Coolatta
6bdd11533c Don't replace bots on the final race. 2022-04-01 21:48:28 -04:00
Sally Coolatta
59cd9e6157 Harder rubberbanding
The old one is too difficult, the new one is too easy ... let's get an inbetween.
2022-04-01 21:47:50 -04:00
Sally Coolatta
0eb5c29448 Don't do for tire grease again, but for the opposite reason. 2022-04-01 17:33:41 -04:00
Sally Coolatta
18dc75e6ca Make more accurate to how it used to work 2022-04-01 17:23:27 -04:00
Sally Coolatta
56875c59e9 Improve bot friction rubberbanding 2022-04-01 16:39:24 -04:00
Sally Coolatta
1a25fcee4e Improve spindash conditions 2022-04-01 16:05:49 -04:00
Sally Coolatta
3fb1ebbbb0 Fix Sub Zero Peak opening
Bots adjust their speed caluclations with slopes, so they anticipate moving faster going downhill and will stop sooner. They also EBrake instead reversing when trying to reverse up a hill.
2022-04-01 16:00:28 -04:00
Sally Coolatta
af3499c024 Make bots RETIRE when they NO CONTEST
They get replaced with another bot when they NO CONTEST, swapping their skin and resetting their difficulty & points.
2022-03-31 18:21:03 -04:00
Sally Coolatta
76bb14bd3e Scale some bot speed calculations with friction
Makes them handle better on ice.

Also includes some code to do the same with slopes, but it didn't work for subzero, so I gave up on it.
2022-03-31 17:02:12 -04:00
Sally Coolatta
d9b1bdb851 Remove bots without GTR_BOTS 2022-03-31 15:45:50 -04:00
Sally Coolatta
9475c80b9a Fix typo preventing reversing from working 2022-03-31 15:45:18 -04:00
Sally Coolatta
85c03a51d6 Add perfstats for bot ticcmd
Cuz bot ticcmd generation is kinda chunky, and was curious how much time it takes. (It's actually a lot less than I thought ... still pretty hefty though)
2022-03-30 22:38:07 -04:00
Sally Coolatta
46dad4b7dd Start on better bot position 2022-03-30 20:28:08 -04: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
cc76f4d052 Merge branch 'reverttransferline' into 'master'
Revert "Add flag to line slopes for copying their slopes to the other side."

See merge request KartKrew/Kart!568
2022-03-29 12:57:51 +00:00
Sal
2f3064c225 Merge branch 'endingmusicfix' into 'master'
P_EndingMusic repairwork

See merge request KartKrew/Kart!567
2022-03-28 17:44:29 +00:00
SteelT
5db877ab35 Merge branch 'finish-update-optimize' into 'master'
Interpolation optimization

See merge request KartKrew/Kart!566
2022-03-28 04:52:28 +00:00
Sally Coolatta
db7e71d418 Fix gif recording 2022-03-28 00:25:52 -04:00
Sally Coolatta
74eac3e3f2 Wait did this legitimately mostly fix it?!
I think it was the realtics check...?!

The issue is still here but significantly better... I THINK?? I can't tell if I just hate this code so much I'm telling myself that it's better so I don't have to look at it anymore
2022-03-27 22:16:51 -04:00
Sally Coolatta
8933fe12f6 Haven't fixed netgames yet but pushing what I have at least 2022-03-27 20:26:46 -04:00
toaster
a6690e02fa Revert "Add flag to line slopes for copying their slopes to the other side."
This reverts commit 7f969705b4.
2022-03-27 20:46:07 +01:00
toaster
1beee50942 Fixed the conditions where bad splitscreen player reads were occuring in P_EndingMusic.
Was only evident when someone joined and then left the 3p or 4p position of party, which is why we didn't discover it in testing.
2022-03-27 20:19:10 +01:00
Sally Coolatta
ebd4197f5c Increase delay granularity for more stable framerate 2022-03-27 13:58:11 -04:00
Sally Coolatta
d8bef70171 Add PAL hz standard as an FPS cap option 2022-03-27 13:20:42 -04: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
Sally Coolatta
12353c2d6f Do the alternative interp failsafe CORRECTLY. 2022-03-27 03:39:19 -04:00
Sally Coolatta
d00f2e0622 Nothing fucking works 2022-03-27 02:56:48 -04:00
Sally Coolatta
24f870a262 Let's try this instead 2022-03-27 02:20:39 -04:00
Sally Coolatta
23b0a5fcaf Wait until fully loaded before using framerate cap 2022-03-27 02:05:00 -04:00
Sally Coolatta
35b1a0d63f go back to avg fps 2022-03-27 01:37:24 -04:00
Sally Coolatta
93dd4dc119 Give names to fpscap values 2022-03-27 00:25:27 -04:00
Sally Coolatta
e5fce1138e This got a different fix in master... oops! 2022-03-26 23:53:10 -04:00
Sally Coolatta
090fc59d12 Merge branch 'master' into finish-update-optimize 2022-03-26 23:51:47 -04:00
Sally Coolatta
369d5398c5 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.
2022-03-26 23:48:08 -04:00
Sally Coolatta
417bbd1bf2 Keep rect in memory
Feel better about this than creating one all da time
2022-03-26 17:16:13 -04:00
Sally Coolatta
33f316ded2 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.
2022-03-26 16:32:43 -04:00
James R
af1177a92e Merge branch 'spring-level-up' into 'master'
Increase spring strengths by ONE

See merge request KartKrew/Kart!560
2022-03-24 19:39:48 +00:00
SteelT
44c95916b6 Merge branch 'battlesync' into 'master'
BATTLE SYNC

See merge request KartKrew/Kart!564
2022-03-24 01:28:28 +00:00
SteelT
da7a8e09cf Merge branch 'mergeladder-colormap-plane-fix' into 'master'
Fix colormap bug on Software renderer planes

See merge request KartKrew/Kart!565
2022-03-24 01:27:52 +00:00
James R
db619f1ed6 Fix bad merge @ 37e16db41e 2022-03-23 13:52:59 -07:00
toaster
b9864c9294 BATTLE SYNC
* Fix majority of Battle resyncs.
    * Change how Paperitem spawners work. Instead of rerolling the RNG if a map spot is already used, maintain a list of available spots...
    * Correct over-the-network type of player->spheredigestion.
    * Remove the condition that prevented the spheres' spawnpoints from being sent over the network, which meant they were only respawning on the host's end...
* Fix itemroulette on Battle playerarrow. (Rarely seen these days but still possible to observe as spectator for Break the Targets)
* Change draw order of Position Faces and Tab Rankings to allow for players' numbers to draw on top of the big out-of-bumpers X.
2022-03-23 00:34:23 +00:00
toaster
982c6d9a2e Merge branch 'boss-code-extras' into 'master'
Extra code changes for boss

See merge request KartKrew/Kart!563
2022-03-22 13:06:15 +00:00
SteelT
002e07dceb Merge branch 'mergeladder' into 'master'
Merge Ladder

See merge request KartKrew/Kart!558
2022-03-22 03:34:08 +00: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
SteelT
60948d887a Merge branch 'unnerf-wall-transfer' into 'master'
Unnerf wall transfer speed

See merge request KartKrew/Kart!559
2022-03-22 03:33:40 +00:00
toaster
3aba8084d4 FORGOT 2022-03-22 01:34:12 +00:00
toaster
1d74dae951 Change order of item constants (Capsules makes them hard to change, now...) 2022-03-22 01:31:14 +00:00
toaster
e2640cbe9e Shadow adjustment (per VC discussion) 2022-03-22 01:00:22 +00:00
toaster
ee18d281bd Merge branch 'boss' into 'master'
Battle-related cleanup + Boss API

See merge request KartKrew/Kart!556
2022-03-21 23:44: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
James R
6dd38f001a Fix boss flash in opengl 2022-03-21 13:05:01 -07:00
James R
fbe3106890 Refactor R_SpriteIsFlashing into R_ThingIsFlashing
Checks for boss fret AND hitlag.
2022-03-21 13:03:30 -07:00
Sally Coolatta
48160b6417 Increase spring strengths by ONE 2022-03-21 00:46:58 -04:00
Sally Coolatta
995ebae2bd Unnerf wall transfer speed
(Sorry Ramp Park...)
2022-03-20 23:50:42 -04:00
toaster
2a40ab39fa Made a HOSTTESTERS build for Tyron, fixed some stuff that came up:
* Grand Prix temp menu now won't open if there are no cups available
* No more Boss Missions entry on the menu, since that won't exist post-newmenus
2022-03-19 11:43:12 +00:00
toaster
60ff5de92d Made a HOSTTESTERS build for Tyron, fixed some stuff that came up:
* Grand Prix temp menu now won't open if there are no cups available
* No more Boss Missions entry on the menu, since that won't exist post-newmenus
2022-03-19 11:42:00 +00:00
toaster
a6f4890421 Figured out what was wrong with splatsprites by comparing their drawing functions to the current state of 2.2's codebase. 2022-03-18 21:55:31 +00:00
toaster
ef0de0dec2 Splat stretch and squash isn't on the same axis, so just... don't do it, at least for now. 2022-03-18 21:31:22 +00:00
toaster
6cbeda5ec6 Add Encore support to splats (software; GL can come later). 2022-03-18 21:20:34 +00:00
toaster
09a99fa06d * Make RunOverlays and A_OverlayThink more consistent.
* Incorporate drawangle support for both (flattened merge of STJr/SRB2!1599)
2022-03-18 20:59:18 +00:00
toaster
b270b67c1d Limit array access for placed emblems.
(Partial merge of STJr/SRB2!1757)
2022-03-18 20:52:53 +00:00
spherallic
07901a6364 oops 2022-03-18 20:50:24 +00:00
toaster
ed00874f5f wip: staterange actions
# Conflicts:
#	src/doomdef.h
2022-03-18 20:50:03 +00:00
Hannu Hanhi
09885ce34b did not mean to remove this line 2022-03-18 20:44:14 +00:00
toaster
336010e616 Fix portals
- Resetting portalcullsector fixes the major visual glitches

- Using 32 bits for nummasks and i fixes crashes when rendering lots of portals

# Conflicts:
#	src/r_main.c
2022-03-18 20:44:07 +00:00
GoldenTails
5dc9df4c6a Allow people to update their Master Server listing on command. 2022-03-18 20:41:49 +00:00
toaster
786d263019 Make dedicated servers not pop up that annoying SDL error window
So they don't mess with shell scripts that expect SRB2 to exit when it crashes (like most other programs)

# Conflicts:
#	src/sdl/i_system.c
2022-03-18 20:41:11 +00:00
Hannu Hanhi
b7c23b9187 Fix software splats breaking and crashing in skyboxes 2022-03-18 20:39:02 +00:00
Hannu Hanhi
3083d97e16 Fix software splats not being clipped by ceiling walls 2022-03-18 20:38:17 +00:00
Hannu Hanhi
115004d704 Add missing optimization to npo2 sloped floor sprites 2022-03-18 20:37:16 +00:00
LJ Sonic
4b1ba2974d Do not attempt to disconnect when a packet checksum is invalid 2022-03-18 20:35:07 +00:00
MascaraSnake
b42715a5ca Fix offset calculation for segs that represent linedef backsides 2022-03-18 20:34:29 +00:00
toaster
5783c5aace Only load map lumps that are WADs or have no extension
# Conflicts:
#	src/w_wad.c
2022-03-18 20:31:17 +00:00
Hannu Hanhi
2a92a80e7a Improve OpenGL GDI Generic error message 2022-03-18 20:24:34 +00:00
katsy
7ddaf60a54 alternate fix to #555 which doesn't crash the game 2022-03-18 20:24:06 +00:00
MascaraSnake
6cabe55d3b Speed up taglist creation 2022-03-18 20:23:31 +00:00
Vincent Robinson
1d7fa9e0f5 Make linedef 96 apply to tags from 97-99, but not to itself 2022-03-18 20:20:39 +00:00
GoldenTails
96976fdba3 You probably don't want to memorise the formula to convert arccos to arcsin so 2022-03-18 20:16:23 +00:00
MascaraSnake
a6d921e37c Fix "all players" check in T_EachTimeThinker 2022-03-18 20:15:10 +00:00
katsy
45f848c4ed null gamestate during pre-intermission to prevent unwanted interaction 2022-03-18 20:14:17 +00:00
toaster
c2f427d858 Call the Lua timestamp function getTimeMicros
# Conflicts:
#	src/lua_baselib.c
2022-03-18 20:08:45 +00:00
toaster
9577dc26b9 Timestamp function for Lua
# Conflicts:
#	src/lua_baselib.c
2022-03-18 20:07:49 +00:00
Jaime Ita Passos
d5d8124ab8 Remove misplaced line from R_DrawTiltedSplat_NPO2_8 2022-03-18 19:59:58 +00: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
toaster
134f3b5df5 fix water fof height calculation on slopes
# Conflicts:
#	src/p_mobj.c
2022-03-18 19:54:19 +00:00
spherallic
6cfe9ad4b3 Add toggle for linedef action 401 to not change the ceiling texture. 2022-03-18 19:45:40 +00:00
toaster
1a12b7b58e Give userdata that needed names some names.
Partial reimplementation of commit 8110473643e6b6e541a7f8e8217bed45dd64d671 due to referencing un-merged MR
2022-03-18 19:41:14 +00:00
James R
976f05a002 Remove mixed code and declarations warning 2022-03-18 19:37:59 +00:00
James R
df1c0fddcb Fix GCC 11 array-bounds warning in P_SetupStateAnimation
Removing inline here silences the warning somehow, it
could be a GCC bug?
2022-03-18 19:37:34 +00:00
toaster
ca7e7b5d91 Fix Debian (.deb) build from making (Project_root)/bin/Linux
Flattened version of STJr/SRB2!1595
2022-03-18 19:36:45 +00:00
Jaime Ita Passos
0a9fd2c9fa Fix #555 2022-03-18 19:33:57 +00:00
toaster
2c55477161 Revert "Make the colormap returned by v.getColormap() writable."
This reverts commit 53ec972887.
2022-03-18 18:59:25 +00:00
toaster
9c1ca3e2c0 Revert "Copy colormaps so Lua cannot modify cached colormaps! (And Z_Free them on garbage collection.)"
This reverts commit 134f94474c.
2022-03-18 18:59:10 +00:00
toaster
1a8f07d53c Add a missing scale assignment to A_Boss3ShockThink
(flattened version of SRB2 repository SMS_Alfredo:oneline/merge request 1588)
2022-03-18 18:50:31 +00:00
lachablock
d92f4d6d50 Split up x/y/z averages in A_Boss3ShockThink 2022-03-18 18:48:36 +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
Shane Ellis
4ef77365a4 Add VERSIONSTRING_RC to DEVELOP builds for compiler compatibility 2022-03-18 18:37:20 +00:00
LJ Sonic
c977a7d451 Fix again 2022-03-18 18:31:46 +00:00
LJ Sonic
ef1ff6c94b Fix incorrect error message during Lua archiving 2022-03-18 18:31:38 +00:00
toaster
7f969705b4 Add flag to line slopes for copying their slopes to the other side.
# Conflicts:
#	extras/conf/SRB2Kart2.cfg
2022-03-18 18:30:40 +00:00
toaster
3794bea729 Accidentially killed P_InitSpecials whilst handling a previous commit; correct. 2022-03-18 18:18:48 +00:00
toaster
86f2a551e6 Fix floor sprite projection
# Conflicts:
#	src/r_plane.c
#	src/r_things.h
2022-03-18 18:16:31 +00:00
Nev3r
65a339ec12 Fix the equation constant fields not being filled properly. 2022-03-18 17:54:13 +00:00
Nev3r
c7b7079ec6 Let equation slopes be read from textmaps. 2022-03-18 17:54:03 +00:00
Nev3r
9992d36bf3 Add slope equation constant parsing functionality. 2022-03-18 17:53:53 +00:00
toaster
dd8acd4c61 Initialize slopes before the map loads.
# Conflicts:
#	src/p_setup.c
#	src/p_slopes.h
2022-03-18 17:53:45 +00:00
GoldenTails
134f94474c Copy colormaps so Lua cannot modify cached colormaps! (And Z_Free them on garbage collection.) 2022-03-18 17:49:46 +00:00
GoldenTails
53ec972887 Make the colormap returned by v.getColormap() writable.
I mean it was already readable anyway...
2022-03-18 17:49:37 +00:00
Jaime Ita Passos
0abc659168 Update r_opengl.c 2022-03-18 17:46:18 +00:00
Jaime Ita Passos
5539341ebc Allocate a buffer for non-RGBA to RGBA texture conversions.
UpdateTexture will I_Error (from AllocTextureBuffer) if the allocation fails.
2022-03-18 17:46:09 +00:00
James R
4c9c54e44e Revert netvars after demo finishes playback
(Demos do not call CL_Reset BTW.)
2022-03-18 17:41:14 +00:00
toaster
e07fb31f72 P_ZMovement: add a P_MobjWasRemoved check after P_CheckPosition, so we can bail out if the mobj was removed (by Lua most likely)
# Conflicts:
#	src/p_mobj.c
2022-03-18 17:35:34 +00:00
Nev3r
2e7e61f787 Remove &, since args and stringargs are arrays 2022-03-18 17:28:15 +00:00
Nev3r
de0119fd78 Forgot the stringargs. 2022-03-18 17:28:06 +00:00
Nev3r
7c8beb9229 Bugfix - Fix sporadically occurring incorrect userdata types in Lua, caused by previously loaded userdata which didn't get invalidated in previous sessions.
Invalidate userdata for line and mapthing args.
Invalidate userdata for slopes and their normal, origin and direction vectors.
2022-03-18 17:27:57 +00:00
sphere
6d58afe071 Use floating-point math for polyobject planes as well. 2022-03-18 17:25:29 +00:00
sphere
167d30efc2 Ignore a linedef tag of 0 when using linedef action 96. 2022-03-18 17:22:28 +00:00
toaster
a15a2f1ef2 Restore P_AproxDistance Lua parity
# Conflicts:
#	src/lua_baselib.c
2022-03-18 17:16:11 +00:00
SwitchKaze
18f0ece073 Fix console text bleeding edge case
A single character could prematurely read if there were enough special characters to push 'c' past 'con_width'.
2022-03-18 17:15:13 +00:00
SwitchKaze
8ef8cb5b5f Fix console text bleeding 2022-03-18 17:15:00 +00:00
toaster
fe204dbc87 Change variable from previous commit to the one used in Kart startup. 2022-03-18 17:14:25 +00:00
GoldenTails
168fc18357 Fix the console splitting up halfway through startup. 2022-03-18 17:13:05 +00:00
lachablock
c331bac825 Fix models interpolating to frame 0 from a same-sprite2 FF_SPR2ENDSTATE state 2022-03-18 17:10:32 +00:00
toaster
1289e08887 Enhance the multitagging functionality added in previous commits.
* Flattened version of commits from SRB2 repository's flarn2006:multitagging_plus/merge request 1524.
* New linedef special 96: "Apply Tag to Tagged Sectors".
* New flags for linedef specials 97-99
2022-03-18 17:06:22 +00:00
Monster Iestyn
2d50b76323 A_Custom3DRotate: don't scale hspeed and vspeed - they are angular speeds, not linear!
(I added the scaling to this action somewhere between 7-9 years ago, and somehow never knew I made this mistake until now, welp.)
2022-03-18 16:58:28 +00:00
toaster
9deeb79ac4 My mistake, P_PreTicker calls P_MapStart and P_MapEnd too, so rework my earlier fix a bit
# Conflicts:
#	src/p_setup.c
2022-03-18 16:58:00 +00:00
Monster Iestyn
e3ead54561 Fix Lua versions of P_ZMovement and its clones as well as P_MovePlayer so tmthing changes don't linger afterwards 2022-03-18 16:56:46 +00:00
toaster
5fa9ba1be0 move P_MapEnd call in P_LoadLevel further down, so that the P_MapStart/End pair also encloses cached actions and the MapLoad Lua hook
# Conflicts:
#	src/p_setup.c
2022-03-18 16:56:39 +00:00
flarn2006
b0aeb6ce03 Expose M_MapNumber to Lua 2022-03-18 16:54:48 +00:00
toaster
2cfdf80fca Remove FRACUNIT/2
# Conflicts:
#	src/r_main.c
2022-03-18 16:54:26 +00:00
toaster
1f5eb2c442 Correct non-compiling iterators that retained their initialisation from the earlier pushes. 2022-03-18 16:50:13 +00:00
namishere
230b301455 Expose P_ButteredSlope to lua 2022-03-18 16:44:41 +00:00
Nev3r
a7b128b9bc Update example comment. 2022-03-18 16:43:35 +00:00
Nev3r
368a83ccb8 Fix __LINE__ macro expansion via recursive macro expansion; C macros sure are something sometimes... 2022-03-18 16:43:11 +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
5ac3709d43 make a few messages more helpful
# Conflicts:
#	src/d_clisrv.c
2022-03-18 16:27:48 +00:00
toaster
b75bea40b2 Add ease Lua library
# Conflicts:
#	src/lua_mathlib.c
2022-03-18 16:25:57 +00:00
toaster
3c5e19bb06 Easing functions
# Conflicts:
#	src/CMakeLists.txt
#	src/Makefile
2022-03-18 16:23:58 +00:00
Hannu Hanhi
955bbeed42 Take slopes into account even more in FOF wall cutoff in HWR_ProcessSeg 2022-03-18 16:20:25 +00:00
Hannu Hanhi
8f22ccccdb Take slopes into account in FOF wall cutoff in HWR_ProcessSeg 2022-03-18 16:20:08 +00:00
Hannu Hanhi
6a6c8a2baf Clarify license file mention in libdivide.h 2022-03-18 16:19:01 +00:00
Hannu Hanhi
c0302174c3 Clarify licensing-related text in libdivide.h 2022-03-18 16:18:51 +00:00
toaster
0c12a389e1 NPO2 slope span optimization
# Conflicts:
#	src/CMakeLists.txt
#	src/r_draw.c
#	src/sdl/Srb2SDL-vc10.vcxproj
2022-03-18 16:18:47 +00:00
toaster
37e16db41e Fix slope plane rotation and alignment.
A flattened-commit port of the SRB2 repository's software-slope-plane-uv-fix-attempt/merge request 1464 due to the vast, vast refactorings that would intefere with brightmaps and Encore if done one commit at a time.
2022-03-18 16:10:05 +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
Jaime Ita Passos
4563722695 tRNS chunk fix
Fixes a faulty check not properly detecting the presence of a tRNS chunk.
2022-03-18 13:56:01 +00:00
Jaime Ita Passos
96edcff902 Optimize Picture_GetPatchPixel 2022-03-18 13:55:04 +00:00
Steel Titanium
f674737898 Add deprecation warning when using the level header parameter 2022-03-18 13:54:17 +00:00
toaster
bf6b9c6fed Remove music slot compatibility
# Conflicts:
#	src/deh_lua.c
#	src/lua_baselib.c
2022-03-18 13:54:03 +00:00
toaster
babf630587 Set the target of a spawned ghost to where it came from.
# Conflicts:
#	src/p_user.c
2022-03-18 13:42:57 +00:00
toaster
3c83508646 add sprung flag to steam
# Conflicts:
#	src/p_map.c
2022-03-18 13:39:19 +00:00
toaster
19a4ef23c2 Add more actions for slope copying & update the ZB config.
# Conflicts:
#	extras/conf/SRB2Kart2.cfg
2022-03-18 13:32:48 +00:00
toaster
857330f74f Add linedef specials for multitagging in binary maps
# Conflicts:
#	extras/conf/SRB2Kart2.cfg
2022-03-18 13:16:55 +00:00
X.organic
0b2783925f Remove some dead code from DEH_LoadDehackedFile
Also fixes a buffer overflow, but said overflow generally got caught by
the stack smashing protector. Still, it's better for SOC files not to be
able to crash the game that easily.
2022-03-18 13:14:37 +00:00
GoldenTails
0146c0a4bd name kinda sucked 2022-03-18 13:13:11 +00:00
GoldenTails
bf5ca10652 acos Lua exposure 2022-03-18 13:13:02 +00:00
Sally Coolatta
e5453f97b7 Missed a few lines in the prev commit 2022-03-18 13:12:17 +00:00
Sally Coolatta
46e31e45d9 Allow spaces in captions defined in SOC 2022-03-18 13:12:09 +00:00
toaster
c67b52f85d move the old "can't load the level" error to its proper place, added specific error messages for all the times that unarchiving Lua banks can fail
# Conflicts:
#	src/d_clisrv.c
2022-03-18 13:07:47 +00:00
Jaime Ita Passos
1219f36ca2 Fix polyobject segs messing with 3D floors they shouldn't be 2022-03-18 13:02:44 +00:00
James R
8c237ae452 Replace LUA_PushLightUserdata with LUA_PushUserdata
See c92378fa and a7e20f70. I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.

I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2022-03-18 12:54:22 +00:00
James R
b1890385f4 Revert "Merge branch 'lightmemedata' into 'next'"
This reverts commit 7ff3e7f18b, reversing
changes made to dc37cdf2a6.
2022-03-18 12:54:13 +00:00
Steel Titanium
e1e57c071b Fix MusicChange hook not returning some values correctly 2022-03-18 12:52:08 +00:00
katsy
3fb2a1fba5 adjust cooldown to 5 seconds (bandage fix for 2.2.9) 2022-03-18 12:51:39 +00:00
katsy
38dc1c55e4 attempt to resolve teleportation resync issue 2022-03-18 12:51:31 +00:00
James R
59b7a65bca It is impossible for a string to be allocated in this case 2022-03-18 12:47:21 +00:00
James R
2ba1417b9e Free zstring when switching to preset value
This is only applicable for bounded cvars (MIN, MAX),
since otherwise there's no way to allocate a zstring.
2022-03-18 12:47:13 +00:00
Monster Iestyn
eeb208312a Change numadded counter to UINT16 instead of UINT8, to allow for more sprites properly 2022-03-18 12:45:44 +00:00
Monster Iestyn
9e20d1ea31 Set "allocated" flag to off if setting a string from PossibleValue afterwards, or if not setting a new value at all. 2022-03-18 12:44:30 +00:00
toaster
2868639144 Add PF_ColorMapped
Not all surfaces have tint and fade colors. Checking for a specific surface flag, that tells the backend those colors are present, avoids uninitialized reads.

# Conflicts:
#	src/hardware/hw_main.c
2022-03-18 12:43:36 +00:00
toaster
11875b56c7 Render midtextures on two-sided lines with a z-buffer offset
This will fix z-fighting issues when they overlap with FOFs.

# Conflicts:
#	src/hardware/hw_main.c
2022-03-18 12:32:58 +00:00
Hannu Hanhi
b836d774a7 Remove bad pointer arithmetic in polygon comparators, that was causing glitches 2022-03-18 11:59:40 +00:00
Hannu Hanhi
44a8b01619 Fix incorrect values caused by outdated use of timing functions in perfstats 3 2022-03-18 11:58:29 +00:00
katsy
c1a4ff724e move HWR_GetMappedPatch earlier 2022-03-18 11:56:50 +00:00
Hannu Hanhi
dcf944be9c Fix a OpenGL backend DeleteTexture crash 2022-03-18 11:53:20 +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
James R
93bd404072 Incorporate few more instances of Z_Free NULL no-op 2022-03-17 12:17:51 -07:00
toaster
1ac2730ced Fix a signedness comparison warning in K_CheckBumpers. 2022-03-17 17:01:07 +00:00
toaster
8de92e8dca Merge branch 'master' into boss
# Conflicts:
#	src/k_bot.c
2022-03-17 16:58:42 +00:00
toaster
306d1cd3ae Merge branch 'network' into 'master'
Net work

See merge request KartKrew/Kart!557
2022-03-17 16:50:40 +00:00
toaster
f02a48d3d8 Merge branch 'fix-229' into 'master'
Fix #229

Closes #229

See merge request KartKrew/Kart!555
2022-03-17 16:35:17 +00:00
toaster
05c1d61ae1 Add pmomz and stairjank to net archive (plus re-organise slightly). 2022-03-14 20:13:32 +00:00
toaster
6e7adedaa0 Make the Kart TICQUEUE system closer to the 2.2 BACKUPTICS system.
* Rename TICQUEUE to BACKUPTICS.
* Add CLIENTBACKUPTICS to limit the time gap players can send tics in at once
    * This likely means freezes are more possible, and this variable could be raised later, but prevents some potential duplication in the extrapolerated tic.
2022-03-14 19:24:07 +00:00
toaster
c84a739039 Fix not being able to escape out of the server connection screen. 2022-03-14 16:59:18 +00:00
toaster
fcb6a4e1ab Disable the vanilla-sourced "keepbody" (rejointimeout) feature. 2022-03-14 16:33:03 +00:00
toaster
c68e0d46c0 Fixed sneaker-induced bumper theft (for those who saw my comment in MKD, turns out a simple P_PlayerInPain saves you from the multi-steal threat I considered) 2022-03-13 17:00:43 +00:00
toaster
a3eab3099e Solve the concern about potential tiregrease overwriting. Let the video resume at once 2022-03-12 23:18:55 +00:00
toaster
b9acad707e Restore the v1 record attack critera (maps available by default), whilst also now allowing for specific maps to opt out. 2022-03-12 22:31:52 +00:00
toaster
a45b163bd1 Make P_EndingMusic *also* operate on local players rather than display players. 2022-03-12 19:32:03 +00:00
toaster
31db72256d Merge branch 'master' into boss
# Conflicts:
#	src/y_inter.c
2022-03-12 19:24:23 +00:00
toaster
87fe8f2c9c Merge branch 'gamestatereloaded' into 'master'
Gamestate reloaded

See merge request KartKrew/Kart!551
2022-03-12 19:08:04 +00:00
toaster
2fdcd9bc2d Merge branch 'light-setup-frame-refactor' into 'master'
A lightweight refactor to R_SetupFrame and R_SkyboxFrame

See merge request KartKrew/Kart!532
2022-03-12 18:54:20 +00:00
toaster
b3c9b8f94e Merge branch 'votefree' into 'master'
:votefree: (resolves #217)

Closes #217

See merge request KartKrew/Kart!542
2022-03-12 18:49:45 +00:00
toaster
65feacc16c Merge branch 'musicataparty' into 'master'
Music at a party

See merge request KartKrew/Kart!543
2022-03-12 18:40:03 +00:00
toaster
f794908430 Merge branch 'followtweak' into 'master'
Follower adjustments

Closes #202

See merge request KartKrew/Kart!514
2022-03-12 18:37:15 +00:00
toaster
d7b72018ba Merge branch 'doublezap' into 'master'
Item Thunderflow

Closes #220

See merge request KartKrew/Kart!544
2022-03-12 18:32:29 +00:00
toaster
cd7e125863 Update texturecache user when reallocating
# Conflicts:
#	src/r_textures.c
2022-03-12 18:00:52 +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
toaster
723c479388 Resolve Battle score ties caused when Luigi wins by doing nothing. 2022-03-07 14:12:58 +00:00
toaster
4839586617 Allow GTR_PAPERITEMS to function in a hypothetical GTR_CIRCUIT-based custom gametype. 2022-03-07 13:45:15 +00:00
toaster
5c77516aab Cleanup of boss info in anticipation of merger.
* Actually add descriptions for the boss-related functions into k_boss.h.
* Introduce K_ResetBossInfo, an internal-only function for handling situations where it needs to be cleared.
* Fix a bug where bossinfo wasn't reset when using the map command to go to a battle map after having been in a boss.
* Fix some bugs where you could provide magnitudes out of the desired range to K_InitBossHealthBar and K_UpdateBossHealthBar.
2022-03-07 13:08:46 +00:00
toaster
590d236b66 * Make item boxes spawn in at map start in race.
* Make them use MF_NOBLOCKMAP as well as MF_NOCLIPTHING so bots won't do weird things when Battle bots are coded way down the line.
2022-03-07 12:37:47 +00:00
toaster
3ddebabfa9 Fix a followers invalid memory crash (discovered in this branch but likely existed beforehand). 2022-03-07 01:37:58 +00:00
toaster
672bf9631d * Allow the digestion to "catch up" a bit if you suddenly get a huge burst of spheres (such as a spherebox).
* Refactor a little, since the previous code required casting and could penalise 40 spheres a bit TOO much if you would be pushed beyond it that tic.
2022-03-06 22:45:48 +00:00
toaster
5f3bf3e8a2 A first-pass attempt at the "digestion" hidden stat for Battle - pushing just in case I fall asleep before we can explore this, and/or end up busy in the next few days.
* At the start of the first bar, everyone digests spheres at 1 per second, same as before.
* This actually only starts counting down from the most recent moment your spheres becomes nonzero, which is a very, VERY tiny buff to prevent their instant depletion.
* At around 40 spheres:
    * Chao digests them at 1 sphere per *tic*. Might be slightly too punishing.
    * Mecha Sonic digests them at 1 sphere per... 33 tics, or barely faster than before. Might be slightly not punishing enough.
    * Everyone else is linearily in between.
2022-03-06 22:23:40 +00:00
toaster
f518ae5c58 * Fix some music and visual bugs with dying in Battle at the conclusion of the round.
* Fix emeralds HUD overlapping minimap in 2P splits.
2022-03-06 18:19:28 +00:00
toaster
ab132300a9 No longer autoload bosstest.pk3 2022-03-05 23:27:09 +00:00
toaster
98bf8a414d Adjust the bannerx system (used both by titlecard and boss titlecard) to actively scale with the resolution, instead of blindly drawing three times. 2022-03-05 23:26:58 +00:00
toaster
6f33cd7ce6 Fix bosses not having the correct number of bumpers set. 2022-03-05 23:25:32 +00:00
toaster
bf43784d22 This is a doozy...
HUD:
* Miniaturised Spheres and Emeralds HUD for 3P/4P.
* Repair 3P minimap.
* Move accessibility icons in 3P/4P to next to the lap/bumper sticker (currently only kickstartaccel exists)
* Change language on menu retry to be more generalised.
* Adjust HUD code structuring a bit.

MECHANICAL:
* Now correctly set number of bumpers in Break the Capsules to 1 (from 3).
* The above required reworking K_SpawnBattleCapsules into K_BattleInit, which is a good staging ground to handle more battle-specific setup in future.
* Do not spawn Emeralds or Sphereboxes in Break the Capsules.
* If everyone is WANTED... nobody is.
* Try to handle exceptions to timelimits a little more thoroughly (still not perfect).
* Disable pointlimits in bosses.
2022-03-05 22:31:43 +00:00
toaster
9ac9abbb6e * Fix the intermission scores not getting ranked in singleplayer GP.
* Make any singleplayer intermission that doesn't display cross-match rankings half as long (this is how long you see each half of an online intermission for).
2022-03-05 22:19:49 +00:00
toaster
dc2936de42 Make the map command from the title screen *actually work*, and make a best-guess attempt at determining the necessary setup to play each particular map in a Single Player context (such as grandprixinfo for TOL_RACE, a little cleanup for TOL_BATTLE, and bossinfo for TOL_BOSS).
This will be necessary when newmenus comes around and it is no longer advantageous to have a menu for testing bosses, given they won't be a headline feature in v2 or accessible via multiplayer at this time.
2022-03-05 22:17:06 +00:00
toaster
61577e5026 * Re-enable kickstartaccel in battle.
* Add a little "ding" sound and HUD dorito bounce when your kickstartaccel reaches max, so you can let go of accelerate/know when you need to tap to stop.
* Make the name on top of the boss healthbar only show up once the titlecard is over.
* Properly reset boss healthbar fill between maploads.
2022-03-01 18:18:01 +00:00
James R
54b55efcb2 Remove fixme 2022-02-28 14:12:59 -08:00
toaster
17e5f71b5d * Re-enable sphere HUD in bosses.
* Do a little more anti-overtime checking for bosses. (This *really* requires a refactor at some point, but not right now)
2022-02-27 17:48:04 +00:00
toaster
5a06239a20 Add an extra fix for the "get hit the moment you spawn an orbiting item" bug that produced tiny Orbinauts and Jawz - now it moves them out so they're not inside you when you come out of hitlag.
(Yes, sorry, no more fishsticks.)
2022-02-27 17:37:39 +00:00
toaster
329c2a60a2 Fix item boxes not spawning in Break the Capsules.
Specifically, they turn invisible on tic 0, then make a decision about whether to replace themselves with MT_PAPERITEMSPOT or simply become visible (with an explosion puff, same as how they respawn) when starttime is reached.

This delay also applies to Race, which I think is a good thing, considering Item Capsules already are not collectable during POSITION, but I can change it if others disagree.
2022-02-27 17:11:18 +00:00
toaster
4a2efd3000 Fix a few basic mistakes.
* Don't forcibly go to a race map if you're exiting a boss and would otherwise return to the title screen.
* Yes, there are four basc TOL's now, not three.
* Title card string for ZONE should be right aligned.
2022-02-27 17:07:56 +00:00
James R
c58d789a07 Always reset tiregrease 2022-02-24 22:51:01 -08:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
James R
bdbd85b2cd pedantic: fix win32 2022-02-20 04:48:30 -08:00
James R
a6ec9faf93 pedantic: fix m_menu.c 2022-02-20 03:31:25 -08:00
James R
5ba4231b9d Fix silly wrong pointer in apng.c 2022-02-20 03:29:41 -08:00
James R
82f4364eb4 pedantic: fix misc leniencies and GNU-isms 2022-02-20 03:28:22 -08:00
James R
2887385122 pedantic: ignore enums signed overflow 2022-02-20 03:25:46 -08:00
James R
366ac0b1b2 pedantic: fix paren surrounding braces 2022-02-20 03:23:45 -08:00
James R
d7087c7405 pedantic: fix address loading function pointer casts 2022-02-20 03:22:25 -08:00
James R
9722027fc1 Add macro to cast function pointer to void pointer
Does not evaluate constant expression, I don't know if
that's possible.
2022-02-20 03:18:47 -08:00
James R
bef9f502ca pedantic: cast to (void*) for printf %p 2022-02-20 03:15:51 -08:00
James R
286010c6e9 pedantic: replace GNU empty initializer extension with C99 0 initializer 2022-02-20 03:13:23 -08:00
James R
59c04ae041 pedantic: resolve flexible array member in nested struct
ISO C forbids a structure that has a flexible array member
to be a member of another structure or element of an
array.

filetx_pak and fileack_pak are two such structures. These
have been removed from doomdata_t's union.
2022-02-20 03:10:27 -08:00
James R
bea79dfa65 Replace GNU zero-length array with ISO C99 flexible array member 2022-02-20 03:10:04 -08:00
James R
cd5946be73 Enable pedantic pike-in-your-bum mode, rip and tear 2022-02-19 19:41:19 -08:00
James R
dc098c1e65 Use GNU C99 mode 2022-02-19 19:40:19 -08:00
toaster
b158bfe37e Always stop the sounds, because we're always calling Z_FreeTags and that can lead to invalid memory. (Should fix Rai's crash) 2022-02-17 22:41:34 +00:00
James R
82377fb001 Merge branch 'invinc-color-fix' into 'master'
Invinc color fix

See merge request KartKrew/Kart!553
2022-02-17 07:59:29 +00:00
James R
eb9a6f3445 Merge branch 'kstart-sfx' into 'master'
POSITION Music

See merge request KartKrew/Kart!552
2022-02-17 05:06:16 +00:00
James R
fbcb48a35f Merge branch 'cechostop' into 'master'
CECHO stop

Closes #219

See merge request KartKrew/Kart!550
2022-02-17 05:06:03 +00:00
James R
ea9b1daeb9 Merge branch 'eaturnongreens' into 'master'
Eat your non-greens (resolves #221)

Closes #221

See merge request KartKrew/Kart!549
2022-02-17 05:05:52 +00:00
James R
64abc232bc Merge branch 'dlconfirmfix' into 'master'
DL Confirm Fix

See merge request KartKrew/Kart!547
2022-02-17 05:05:39 +00:00
James R
8f303f03d2 Merge branch 'iamnobump' into 'master'
I am no bump

See merge request KartKrew/Kart!548
2022-02-17 05:05:24 +00:00
James R
8921a6fa96 Merge branch 'combob2' into 'master'
combob2

Closes #212

See merge request KartKrew/Kart!546
2022-02-17 05:04:33 +00:00
Sally Coolatta
39da886447 Merge branch 'master' into invinc-color-fix 2022-02-16 23:01:23 -05:00
Sally Coolatta
a750fdd810 Invincibility wasn't using K_RainbowColor anymore, what the function was designed for... 2022-02-16 23:01:07 -05:00
toaster
0b97d954ad Tested with Chengi at one point, correct a few things from that.
* Fixed a few prints happening on resync that shouldn't.
* Fixed OGL loading not using levelfadecol.
2022-02-16 23:23:14 +00:00
James R
e28e67f84d Fade out POSITION music at 3 2 1 2022-02-15 15:53:56 -08:00
James R
9095261a18 POSITION music
Play SA2 "shwing" at title card; play POSITION music once
camera is steady (instantly in 1v1).

Encore: play portal warp sound instead of "shwing"; play
portal drone instead of POSITION music, always start
instantly.
2022-02-15 15:51:47 -08:00
James R
62b5f9c90f Leave introtime at 3 for 1v1
Preticker uses up a few tics, so setting it to 0 makes it
useless.
2022-02-15 15:38:11 -08:00
James R
418156bebf Use float value for LOOPMS
Extra precision.
2022-02-15 14:19:28 -08:00
James R
f749424de7 Turn kstart into sfx 2022-02-14 15:04:30 -08:00
toaster
6d851f2bc8 P_LoadLevel is a mess, but attempt to fix a few things that shouldn't be happening with resyncs, including #209. Untested. 2022-02-14 15:43:56 +00:00
toaster
42919044e9 Don't continue ticking the cecho timer infinitely into the negatives (resolves #219) 2022-02-14 14:52:04 +00:00
toaster
9ef2530e54 Fix HUD tracking being broken in non-green aspect ratios. 2022-02-14 14:42:31 +00:00
toaster
54cd540e5b Fix the chat underlay being physically seperated from the chat text in non-green resolutions. 2022-02-14 14:41:34 +00:00
toaster
006b6f00ac Rewrite the awayview reset for both Got_Teamchange and P_SpectatorJoinGame. 2022-02-11 12:09:00 +00:00
toaster
913610b1b7 Fixed P_RestoreMusic using displayplayers instead of local players (did not use any of the functions directly and so was missed). 2022-02-11 10:38:16 +00:00
toaster
03a47cfb5a Prevent using a grow while invincible resetting the invincible music timer, when that SHOULDN'T be touched and will be set to grow properly once that's over. 2022-02-11 01:13:38 +00:00
toaster
4567d9c57f Fix allowteamchange (although this code wasn't being run, it still SHOULD return early...) 2022-02-11 00:35:11 +00:00
toaster
93e4ef0ef1 Permit players to not bounce when colliding with ML_NOTBOUNCY walls (imperfect but better than the LITERALLY NO SUPPORT that was there beforehand) 2022-02-10 00:06:47 +00:00
toaster
8f4e8a4953 can't believe i messed up the brackets this bad, woops 2022-02-09 23:43:06 +00:00
toaster
c3e9eceda2 * Instead of checking for a player moving up, check for a player moving up that's only JUST been tumbled.
* Remove the DMG_WOMBO flag from PVP touch damage tumbles as that was restricting tumble combos in this branch, not allowing it.
2022-02-08 21:38:24 +00:00
toaster
c8517007c6 Only disable downloads in TESTER builds and -nodownload, not always. 2022-02-03 22:03:04 +00:00
toaster
ef7655d2e8 Fix a tables error with DMG_STEAL in Lua/SOC resolving to the wrong flag value. 2022-02-03 19:51:58 +00:00
toaster
766fce5857 Make some adjustments to the damage combo system for players.
* Prevent a player that is moving upwards from being DMG_TUMBLE'd again (resolves #212).
* Instead of having a special case for missiles there, make PIT_CheckThing toggle DMG_WOMBO instead.
* Allow hard hits (DMG_TUMBLE, DMG_EXPLODE, and DMG_KARMA) to have combos toggled off with DMG_WOMBO, too.
2022-02-03 19:51:17 +00:00
James R
0f4feb0161 Fix in game downloader confirmation 2022-01-28 04:43:18 -08:00
toaster
2e54e38607 Diagnose itemamount underflows easier (show the empty box and number if nonzero count but zero item type) 2022-01-25 17:02:19 +00:00
toaster
3f71251fd6 Fix a correctly timed Thunder Shield preventing you from using rings (resolves #220) 2022-01-24 23:19:35 +00:00
toaster
7508e0e198 P_IsLocalPlayer changes
This is the function that controls whether a bunch of music-related function (and also whether certain error messages get printed).

* P_IsLocalPlayer now supports party players (currently untested, but the code is pretty airtight).
* P_IsLocalPlayer now always returns false in replays.
* P_IsMachineLocalPlayer now exists for the one situation the game determines local players that actually has a net-related function (kicking illegal character changes).
* Invincibility/grow sfx now operates based on whether the player is NOT local (it used to be whether it was NOT a displayplayer).
* Refactored P_SpectatorJoinGame to make future team support easier, and also reset the relevant camera focus, rather than always the consoleplayer's.
* Fix viewpoints on non-local players having overlapping viewpoint text.
2022-01-24 22:03:40 +00:00
toaster
4b1cef0f20 Merge branch 'testers' into 'master'
Allow TESTERS builds to be made for any branch

See merge request KartKrew/Kart!529
2022-01-23 22:48:48 +00:00
toaster
2df53dd5a5 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into votefree 2022-01-23 22:46:11 +00:00
toaster
f69f002d17 Merge branch 'speedometer-default' into 'master'
Turn on speedometer by default

Closes #218

See merge request KartKrew/Kart!539
2022-01-23 22:43:49 +00:00
toaster
3823feb7d6 Merge branch 'director-cam' into 'master'
Automatic spectator "director" cam

See merge request KartKrew/Kart!537
2022-01-23 22:43:25 +00:00
AJ Martinez
337f7ebd27 Merge remote-tracking branch 'origin/master' into director-cam 2022-01-23 15:38:25 -06:00
AJ Martinez
ef6ff846d3 Merge branch 'master' into 'director-cam'
# Conflicts:
#   src/d_netcmd.h
2022-01-23 15:38:14 -06:00
toaster
e7108cfde1 Resolve the replay crash issue :mike:
(Also no longer mess around with moving flags into booleans per my comment)
2022-01-23 21:35:29 +00:00
toaster
1ae256887e Readd CV_SAVE per Oni request in vc (and also my desires)
Made using web IDE
2022-01-23 20:49:29 +00:00
toaster
28ee382587 ok this was supposed to be here 2022-01-23 20:40:59 +00:00
toaster
8c3fad058d * Fix the Z_Free double-free issue (in two different ways, one ifdef'd out) that can sometimes occur on the vote screen.
* Fix a technically invalid read in D_SetupVote.
* If the third map on the voting screen has a different gametype, don't interact with the buffer.
* Fix the inttime 0 setting, since I was in y_inter.c and testing quick map changes.
2022-01-23 20:33:27 +00:00
SteelT
dbacdb4e63 Merge branch 'hitlag-flags' into 'master'
Hitlag flags

See merge request KartKrew/Kart!541
2022-01-23 19:02:43 +00:00
SteelT
fefb012134 Merge branch 'tripwire-both-sides' into 'master'
Consistently easy tripwire

See merge request KartKrew/Kart!540
2022-01-23 19:01:56 +00:00
SteelT
7dc6542a4f Merge branch 'thing-bright-override-colormap' into 'master'
Fix OGL semibright and ignore colormap for fullbright/semibright/fulldark

See merge request KartKrew/Kart!538
2022-01-23 19:01:44 +00:00
SteelT
a793af47c5 Merge branch 'grow-shrink-shoe-polish' into 'master'
More extremely scaled grow & shrink players!

See merge request KartKrew/Kart!534
2022-01-23 18:59:39 +00:00
SinnamonLat
fafcf307d2 Add combo to bubble shield 2022-01-23 18:02:56 +01:00
SinnamonLat
14961f6127 Let ThunderShield combo players 2022-01-23 17:58:08 +01:00
SinnamonLat
d55e23d767 Add DMG_WOMBO to all player contact damage 2022-01-23 17:52:31 +01:00
SinnamonLat
2bc6a72c56 MF_NOHITLAGFORME shouldn't work on MT_PLAYER 2022-01-23 13:57:11 +01:00
SinnamonLat
6567219fec Add MF_NOHITLAGFORME to spikes and wallspikes 2022-01-23 11:50:53 +01:00
James R
b30ffea49a Hash name lookup for textures and lumps 2022-01-22 03:18:06 -08:00
SinnamonLat
191103fec1 Fix a dumb mistake, add DMG_WOMBO to orbinauts, jawz and banana hits 2022-01-22 11:41:49 +01:00
SinnamonLat
ba9ef23b31 Add MF_NOHITLAGFORME and DMG_WOMBO 2022-01-22 10:01:24 +01:00
AJ Martinez
3ccbc5c705 avoid wasteful player_t copy 2022-01-21 02:42:16 -06:00
James R
f10aa9645b Few more instances of fullbright colormap nullification 2022-01-20 23:39:58 -08:00
James R
b23c4abb83 Copy tripwire texture to opposite side and automatically mirror texture alignment 2022-01-20 21:52:10 -08:00
James R
6063a6eab8 Check both front and backside for tripwire 2022-01-20 21:51:47 -08:00
James R
223ef50acb Enable percentage speedometer by default; do not save 2022-01-20 20:07:52 -08:00
AJ Martinez
07498a122a clarify potential footgunnery in K_UpdateDirector 2022-01-20 16:00:51 -06:00
AJ Martinez
9366049c89 fix low-confidence switch behavior 2022-01-20 15:56:36 -06:00
AJ Martinez
daabde0981 fix double speed attack transfers 2022-01-20 15:35:26 -06:00
AJ Martinez
3ce1f71230 how is static formed 2022-01-20 15:29:13 -06:00
AJ Martinez
ef3ae2044a appease linker wrt internal functions 2022-01-20 15:26:32 -06:00
AJ Martinez
5efd706d3b general post-review unfuck 2022-01-20 15:23:32 -06:00
toaster
66d8989531 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into testers 2022-01-20 19:29:10 +00:00
toaster
93dfbf382c The "free" changes from framezero - the crash fixes that have no complexity and therefore no negative consequence to introduce 2022-01-20 19:27:02 +00:00
toaster
df1e808b6e Semibright has colormapping again 2022-01-20 19:14:44 +00:00
toaster
334d25d3ab Merge branch 'ld-460-ringlock' into 'master'
Linedef type 460: Don't award rings while SPB-locked

Closes #205

See merge request KartKrew/Kart!536
2022-01-20 18:36:34 +00:00
James R
26d231c43a Only ignore colormap for fullbright 2022-01-20 05:09:39 -08:00
AJ Martinez
5d3fb30a07 tabs, thank you vscode for not reading the room 2022-01-20 06:56:07 -06:00
James R
8a2be85563 Include k_director.h 2022-01-20 04:50:11 -08:00
James R
ecc3d031df Ignore colormap when overriding thing brightness 2022-01-20 03:57:58 -08:00
James R
ff70bd0d83 Fix opengl semibright
Adds back 3d models semibright.
2022-01-20 03:52:32 -08:00
AJ Martinez
24b05451f6 my workflow is beyond your understanding 2022-01-20 03:39:00 -06:00
SteelT
606eb28314 Linedef type 460: Don't award rings while SPB-locked 2022-01-20 03:20:53 -05:00
AJ Martinez
1e4bc482d0 very small tiny fixes 2022-01-20 02:07:48 -06:00
AJ Martinez
e949e3afb4 Write the rest of the owl 2022-01-19 23:56:23 -06:00
James R
b3e6030a9b Wrong condition 2022-01-19 01:17:54 -08:00
James R
8f8d34728b JUST SEARCH ALL FUCKING WADS 2022-01-19 01:17:12 -08:00
James R
ba6ee7eaa0 Do not count gfx.pk3 toward mainwads in testers build 2022-01-19 01:13:09 -08:00
AJ Martinez
be33a1b659 Director cam barebones functionality 2022-01-18 22:41:07 -06:00
Sally Coolatta
38e741af76 Merge branch 'master' into grow-shrink-shoe-polish 2022-01-18 02:57:08 -05:00
James R
484ab4b5dc Merge branch 'fix-software-splitscreen-tilt' into 'master'
Fix splitscreen camera tilting in Software

See merge request KartKrew/Kart!531
2022-01-18 07:56:41 +00:00
James R
d67a074a01 Merge branch 'splitscreen-skybox' into 'master'
Keep track of skybox across splitscreen and change viewpoint

See merge request KartKrew/Kart!533
2022-01-18 07:56:16 +00:00
Sally Coolatta
8acdbf7df8 Merge branch 'master' into grow-shrink-shoe-polish 2022-01-18 02:55:56 -05:00
James R
97d1a415ce Merge branch 'replay-branch-name' into 'master'
Save branch name in replay folder

See merge request KartKrew/Kart!505
2022-01-18 07:50:02 +00:00
James R
e54a4c27d3 Merge branch 'fix-mkdir-each' into 'replay-branch-name'
Fix mkdir-each functions

See merge request KartKrew/Kart!510
2022-01-18 07:47:47 +00:00
Sal
311c22592b Merge branch 'interp-clag-stutter' into 'master'
Fix intermittent stutters with frame interpolation

See merge request KartKrew/Kart!522
2022-01-18 07:34:57 +00:00
James R
7fc72d03ff Uncap frame interpolation on the viewpoint 2022-01-17 23:07:04 -08: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
06b7c17263 Merge branch 'master' into interp-clag-stutter 2022-01-18 01:20:28 -05:00
James R
6ea587de77 Merge branch 'no-dynbase' into 'master'
Don't compile with dynamic base

See merge request KartKrew/Kart!530
2022-01-18 05:24:42 +00:00
James R
5e37a847f0 Interpolate viewrollangle before R_CheckViewMorph 2022-01-17 21:18:38 -08:00
James R
eda9b36455 Refactor R_SetupFrame/R_SkyboxFrame to deduplicate some code 2022-01-17 21:03:22 -08:00
James R
8e0f02d65a Refactor R_SetupFrame/R_SkyboxFrame to use splitscreen number directly 2022-01-17 18:53:01 -08:00
SteelT
159994c2f0 Don't compile with dynamic base 2022-01-17 15:46:44 -05:00
James R
7e709cd018 Fix compiler warning 2022-01-16 17:35:47 -08:00
James R
c860427026 Add HOSTTESTERS make flag 2022-01-16 17:34:12 -08:00
James R
5441c55baf Do not add gfx.pk3 in testers build
MISC_PATCH.pk3 covers it.
2022-01-16 17:32:58 -08:00
toaster
4d4ea71a44 Music also 2022-01-17 01:23:14 +00:00
toaster
4cff27797c Guard IsPlayerAdmin in testers/hosttesters 2022-01-17 01:22:10 +00:00
toaster
6980975f11 Revert "Disable player admins"
This reverts commit 4d2793918c.
2022-01-17 01:19:13 +00:00
toaster
4bc916e0d5 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into testers 2022-01-17 01:13:45 +00:00
toaster
250dc70827 TESTERS stuff
#define TESTERS for tester executable
#define HOSTTESTERS for hosting with TESTERS-specific files (MISC_ etc)
2022-01-17 01:12:30 +00:00
SteelT
025832aaa4 Merge branch 'hannushadow' into 'master'
Hannu's dropshadow hack

See merge request KartKrew/Kart!527
2022-01-17 01:01:25 +00:00
toaster
e8b0caf878 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into testers 2022-01-17 01:01:08 +00:00
toaster
171cc75607 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into hannushadow 2022-01-17 00:16:36 +00:00
Sal
fda28b7f54 Merge branch 'terrainjoin' into 'master'
Terrain join fix

See merge request KartKrew/Kart!528
2022-01-17 00:13:32 +00:00
toaster
867b0516e6 Terrain pointers were not getting properly relinked on netsave load, now they are. Thanks Sal for taking a moment out of your day to rubber duck with me 2022-01-16 23:53:14 +00:00
SteelT
d384d1b828 Merge branch 'precip-overflow' into 'master'
Fix precip sector search deadlock

See merge request KartKrew/Kart!525
2022-01-16 23:42:33 +00:00
SteelT
b39853d7a1 Merge branch 'bounceremoved' into 'master'
Attempt to fix invalid mobj ref during bouncing

See merge request KartKrew/Kart!526
2022-01-16 23:42:15 +00:00
toaster
14e5ee638e blessings be to hannu
Hannu's dropshadow hack, copied across and edited for Kart's column drawer setting functions.
2022-01-16 23:21:38 +00:00
toaster
ef6ee928ac After I experienced a few consistent crashes for invalid subsector references in P_BounceMove/P_SlideMove, add a few extra checks for whether the mobj is removed. 2022-01-16 22:03:27 +00:00
toaster
3eac1fed0f Rewrote the fix to:
- be comprehensive (still allow rain to be heard against the topleft corner, not just the bottomright corner)
- not use volatile (now uses INT64)
- not perform this pointinsubsector search if the map has no rain/thunder (yes I tested EHZ with this check dummied out so this bug won't crop up again later)
2022-01-16 20:57:56 +00:00
Sal
8ea732fc96 Merge branch 'intro-sound-uncapped-fix' into 'master'
Fix sounds playing multiple times during intro if interpolation is on

See merge request KartKrew/Kart!524
2022-01-16 01:58:40 +00:00
James R
521f8eac3e Fix overflow in precipitation sector search 2022-01-14 22:36:49 -08:00
SteelT
2af1c6fc30 Fix sounds playing multiple times during intro if interpolation is on 2022-01-12 21:07:30 -05:00
Sal
fa6d4bfb2d Merge branch 'bot-maint-2' into 'master'
Bot maintenance 2

See merge request KartKrew/Kart!516
2022-01-13 00:47:54 +00:00
Sal
19ee219bd7 Merge branch 'fix-gl-wiggle' into 'master'
Fix OpenGL underwater/heatwave effect

See merge request KartKrew/Kart!523
2022-01-12 23:01:03 +00:00
James R
6a7ca44302 Don't interpolate frames if avg <35
Proper solution for 85ce207e9
2022-01-12 12:57:52 -08:00
James R
85ce207e9c Do not interpolate if time between game tics <1/35 2022-01-12 04:37:26 -08:00
James R
0d41c36f09 Closer OpenGL underwater/heatwave effect to Software 2022-01-12 04:30:43 -08:00
James R
2c6dfd5498 Do not speed up underwater/heatwave effect in OpenGL 2022-01-12 04:30:03 -08:00
James R
969d449973 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.
2022-01-12 03:38:17 -08:00
James R
8a7a20e6f2 Fix NOMIXER 2022-01-12 00:33:35 -08:00
SteelT
e9b2ccaedf Merge branch 'fix-nametag-distance-check' into 'master'
Fix nametags rendering inconsistently

See merge request KartKrew/Kart!519
2022-01-12 08:04:34 +00:00
SteelT
71a5030318 Merge branch 'master' into fix-nametag-distance-check 2022-01-12 02:50:32 -05:00
SteelT
192ca07acf Merge branch 'fix-terrain-performance' into 'master'
Fix terrain performance

See merge request KartKrew/Kart!521
2022-01-12 07:44:13 +00:00
James R
fc103834af Cache terrain on levelflats 2022-01-11 22:49:01 -08:00
Sally Coolatta
c606e1e96b Force shrink can be toggled individually online
In preparation for a "make yourself small by default" cheat on the char select like SMK.
2022-01-09 04:08:26 -05:00
Sally Coolatta
7e76366fe8 Keep your large items 2022-01-09 01:16:36 -05:00
Sally Coolatta
1ad82e7651 Update how scaled speed is calculated
This makes it so that the scaled speed shows up on the percentage speedometer.
2022-01-09 00:10:14 -05:00
Sally Coolatta
23f9649fb9 More extremely scaled grow & shrink players!
- Grow is x2 instead of x1.5.
- Shrink is x0.5 instead of x0.75.
- Physics were left ALONE!! This is purely a HITBOX / VISUAL change!! Grow isn't any faster, and Shrink isn't any slower!! The only potential worry is low ceilings in maps!!
2022-01-09 00:00:01 -05:00
James R
93c36af2c0 Oops almost fucked it again 11ced1c3d 2022-01-06 00:46:14 -08:00
James R
37b2d81788 Merge branch 'battle-tweak' into 'master'
Battle tweaks

See merge request KartKrew/Kart!517
2022-01-06 06:35:28 +00:00
James R
11ced1c3d6 Fix nametag distance check 2022-01-05 22:32:07 -08:00
Sally Coolatta
bc9cf6faf2 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart 2022-01-06 01:21:10 -05:00
Sally Coolatta
3ba8f38829 Save showfps 2022-01-06 01:20:31 -05:00
Sal
2d278ce222 Merge branch 'no-fade-join' into 'master'
Don't run titlecard fade when joining a netgame

See merge request KartKrew/Kart!518
2022-01-06 06:04:41 +00:00
James R
5da3dd94c0 Disable titlecard fade on join 2022-01-05 21:24:31 -08:00
Sally Coolatta
5edf180bd7 Merge branch 'master' into battle-tweak 2022-01-05 19:38:45 -05:00
Sally Coolatta
c5279e5795 Fix missing line for trick panels 2022-01-05 17:58:48 -05:00
Sally Coolatta
8326f32456 Fix default terrain friction 2022-01-05 17:44:11 -05:00
Sally Coolatta
b31d66e7f8 PLEASE NO RNG 2022-01-05 05:10:09 -05:00
Sally Coolatta
7533472799 Less Karma Bomb CBT
- Karma delay is 3sec instead of 10sec
- Karma delay is only used for initially changing into a bomb
2022-01-05 03:46:19 -05:00
Sally Coolatta
bb53ee22be Buff tether in Battle
- /4 minimum distance
- x2 speed
2022-01-05 03:24:19 -05:00
Sally Coolatta
7613cabfae No flashing tics in Battle 2022-01-05 03:17:38 -05:00
Sally Coolatta
9e3e065479 Bot lookback
- Bots use lookback when they have a attack item that hits back & they see you.
- Bot item throwing was made slower for easier difficulties. (Lv. 9 should still be pretty fast.)
- Bot cone detection was made much much farther & wider

Lookback sparkle is a signal for "they are contemplating throwing backwards"
2022-01-05 02:09:31 -05:00
Sally Coolatta
44374879de Merge branch 'master' into bot-maint-2 2022-01-05 00:00:12 -05:00
Sal
8f22730dc5 Merge branch 'infinitepainfloor' into 'master'
Fix infinite pain floors

See merge request KartKrew/Kart!515
2022-01-05 03:45:14 +00:00
toaster
7237b6bea9 Fix infinite pain floors
If inflictor is null and you're in hitlag do not damage again
2022-01-04 23:35:59 +00:00
toaster
30fe173617 Bracketing (fixes a weird bug with bubble) 2022-01-04 23:21:28 +00:00
toaster
6651bd4043 Also fix bubble 2022-01-04 23:03:51 +00:00
toaster
60f08f2380 Defines per Sal request 2022-01-04 23:02:09 +00:00
toaster
a749160c6b Make followers only stretch for their movement *relative* to the player, not their movement in general. 2022-01-04 22:43:54 +00:00
toaster
316cd61d9f * Fix follower colour being limited to UINT8.
* Fix follower colour not being set in offline mode (based on Steel's fix but no UINT8).
2022-01-04 22:41:35 +00:00
Sal
69fa93f980 Merge branch 'terrain-lump' into 'master'
TERRAIN lump

See merge request KartKrew/Kart!480
2022-01-04 20:13:11 +00:00
Sally Coolatta
211fc17974 NULL terrain for spectators 2022-01-04 12:45:20 -05:00
Sally Coolatta
ef5a4f01d4 Merge branch 'master' into terrain-lump 2022-01-04 12:34:47 -05:00
Sal
d54cfcdc7b Merge branch 'ring-sting-fixes' into 'master'
Fix ringsting and hitlag

Closes #111

See merge request KartKrew/Kart!511
2022-01-04 17:28:55 +00:00
Sally Coolatta
50eb3eeda2 Don't use damage hitlag effects on a person when they "win" a ring sting exchange
Only applies to ring sting collision (no other types of damage touching), only applies to the person not getting stung. The person who is getting stung & sting trades are unaffected.
2022-01-04 00:39:01 -05:00
Sally Coolatta
cab1af5498 Don't do hitlag combo with items with threshold
Prevents instakill ballhog
2022-01-04 00:23:12 -05:00
Sal
20b1ddb4d3 Merge branch 'dont-scale-gravity' into 'master'
Scale gravity with map scale instead of object scale

See merge request KartKrew/Kart!513
2022-01-04 04:22:42 +00:00
Sal
b1ce817873 Merge branch 'uncapped-fixes' into 'master'
Uncapped fixes | Add functions to handle interpolation

See merge request KartKrew/Kart!512
2022-01-04 04:22:31 +00:00
Sally Coolatta
c4385166e5 Scale gravity with map scale instead of object scale 2022-01-03 20:02:22 -05:00
Sally Coolatta
df3a0ad507 Only do spread if above 0 2022-01-03 01:40:38 -05:00
James R
5d6595f8a0 Load misc build testers data files 2022-01-02 22:08:18 -08:00
James R
4d2793918c Disable player admins 2022-01-02 21:58:18 -08:00
James R
72f9121f5d Disable wad loading in TESTERS build 2022-01-02 21:50:23 -08:00
James R
a5d219ad6e More TESTERS guard 2022-01-02 21:38:06 -08:00
Sally Coolatta
2033e84bce Minimum impact amount for splashes 2022-01-03 00:17:59 -05:00
Sally Coolatta
9e56e54e31 Implement particle spawn frequency, offset spawning by player num 2022-01-03 00:07:46 -05:00
Sally Coolatta
c6f69e8f59 Add required speed percent 2022-01-02 21:42:20 -05:00
James R
5498f9d02d Let objects receive damage while in hitlag 2021-12-29 22:58:21 -08:00
James R
07f965d4eb Check to sting player before removing one ring 2021-12-29 22:25:11 -08:00
James R
cdce6824f2 Fix M_MkdirEach and M_PathParts
OKAY I didn't test this on Windows before, it was BROKEN
AND SHITTY CODE.
2021-12-29 22:13:06 -08:00
Sally Coolatta
1558a7e8ec Fix lap animation interp being reversed 2021-12-25 05:51:09 -05:00
Sally Coolatta
ac2ab1bdcc Only calculate string when we need it 2021-12-25 05:18:33 -05:00
Sally Coolatta
fcc5c8e0c4 Interpolate music credits 2021-12-25 04:57:35 -05:00
Sally Coolatta
762ee92c06 Purple spark electricity UNCAPPED 2021-12-25 03:53:55 -05:00
Sally Coolatta
1c908f533d Fully fix drop shadows
It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.
2021-12-25 02:07:56 -05:00
Sally Coolatta
09eefc7e9b Make drop shadows slightly better in uncapped
They still jitter uphill
2021-12-24 23:17:28 -05:00
Sally Coolatta
b87b00fcda Apply the same fix for instashield overlay 2021-12-24 23:07:12 -05:00
Sally Coolatta
d63ce0c803 Fix jawz reticule in uncapped 2021-12-24 22:52:38 -05:00
Sally Coolatta
0a915a719b Hack to fix drift spark explosion while keeping its interpolation 2021-12-24 13:17:57 -05:00
Sally Coolatta
6c13ddca01 Rename PitchRoll stuff back
I did a find+replace because I realized the functions I added were named too similar to other ones & to make the purpose more obvious ... but it ended up changing them too anyway! Gah!
2021-12-24 13:00:12 -05:00
Sally Coolatta
cc250afd45 P_InitAngle, to fix angle interpolation on spawning objects 2021-12-24 12:45:51 -05:00
Sally Coolatta
ce01b494f4 Add functions to handle interpolation
Much less code duplication
2021-12-24 11:30:19 -05:00
Sally Coolatta
9bc48762a8 Merge branch 'terrain-lump' of https://git.do.srb2.org/KartKrew/Kart into terrain-lump 2021-12-24 09:50:12 -05:00
Sally Coolatta
ff3cb90cda Super random push
Looks better to me, and makes cone have a more pronounced effect
2021-12-24 09:50:00 -05:00
James R
cdf75cfbe0 Fix incompatible prototype 2021-12-23 21:08:19 -08:00
Sally Coolatta
8cdfe87dca Let's just convert this in a more sane fashion... 2021-12-23 23:15:36 -05:00
Sally Coolatta
2d5d78b76e Oops ... can't use raw angles for P_RandomRange anyway. 2021-12-23 22:58:25 -05:00
Sally Coolatta
a0c36c6126 Wrong var name oops
I autopiloted
2021-12-23 22:50:57 -05:00
Sally Coolatta
d1827b1c16 Fix it not using footstep->cone 2021-12-23 22:48:23 -05:00
Sally Coolatta
72b2997440 Remove off by one """"fix"""" 2021-12-23 03:23:42 -05:00
Sally Coolatta
28d99342ee Merge branch 'master' into terrain-lump 2021-12-23 03:21:22 -05:00
Sally Coolatta
86991112b1 MORE DEHACKED SHIT 2021-12-23 03:20:56 -05:00
Sally Coolatta
c203bbdce9 Merge branch 'master' into terrain-lump 2021-12-23 03:05:10 -05:00
SteelT
3ce3fd0366 Merge branch 'getmobjzmovement' into 'master'
P_GetMobjZMovement

See merge request KartKrew/Kart!441
2021-12-21 07:07:10 +00:00
SteelT
f48ce0f84a Merge branch 'fullbright-ignore-colormap' into 'master'
Ignore level colormap when drawing fullbright sprites

See merge request KartKrew/Kart!507
2021-12-21 06:56:16 +00:00
SteelT
85fa368d64 Merge branch 'update-rendezvous' into 'master'
Update hole punch server address to kartkrew.org

See merge request KartKrew/Kart!506
2021-12-21 06:25:10 +00:00
SteelT
2ebac926eb Merge branch 'followers-mainwad' into 'master'
Load followers by default

See merge request KartKrew/Kart!504
2021-12-21 06:24:06 +00:00
SteelT
cf3e92c293 Merge branch 'no-squish' into 'master'
Add the MF_NOSQUISH flag, disables squash and stretch

See merge request KartKrew/Kart!501
2021-12-21 06:20:59 +00:00
James R
d8e7703917 Ignore level colormap when fullbright 2021-12-20 04:17:33 -08:00
James R
f1389b49d2 Automatically switch to new default rendezvous server 2021-12-20 01:37:44 -08:00
James R
1767b4ae29 Update rendezvous server to kartkrew.org 2021-12-20 01:34:48 -08:00
James R
a7edda15e9 Remove 1.4 master server address enforcer 2021-12-20 01:27:36 -08:00
James R
66094ec72d Replays: use git commit in DEVELOP, version string in release 2021-12-20 01:20:17 -08:00
James R
fa691c0ee4 Create folder with branch name when saving replays 2021-12-18 22:31:33 -08:00
Sally Coolatta
9bae31fd03 Properly put in the parameters 2021-12-19 01:09:37 -05:00
Sally Coolatta
da459a9c73 Add terrain splashes 2021-12-19 00:57:45 -05:00
James R
de0b2c2e75 Add followers before patch 2021-12-18 21:00:30 -08:00
James R
efa92b0206 Add followers.pk3 to main files list 2021-12-18 20:40:56 -08:00
Sal
f0c795d258 Merge branch 'read-sprite-header-once' into 'master'
Don't read sprite header twice

See merge request KartKrew/Kart!502
2021-12-19 04:40:27 +00:00
Sally Coolatta
528ee29f2f Use mobjzmovement for footsteps 2021-12-18 23:30:57 -05:00
James R
4712daddf9 Start checking files from correct position on rejoin 2021-12-18 19:52:59 -08:00
Sally Coolatta
21e868216e Merge remote-tracking branch 'origin/getmobjzmovement' into terrain-lump 2021-12-18 21:25:20 -05:00
Sally Coolatta
8667aeb620 Add footstep particles 2021-12-18 21:23:41 -05:00
lachablock
e14af65d52 Merge remote-tracking branch 'origin/master' into getmobjzmovement 2021-12-19 13:22:59 +11:00
Sally Coolatta
0cd3efc76d Merge branch 'master' into terrain-lump 2021-12-18 18:36:05 -05:00
Sally Coolatta
edef941a08 Add scale & color parameters to terrain particles 2021-12-18 18:30:19 -05:00
Sally Coolatta
2179da40bf Update brightmap reading
- Does it per-wad
- Saves hashes for certain bits
- Adds R_UpdateTextureBrightmap to respect the zone memory
2021-12-18 18:23:24 -05:00
Sally Coolatta
e4aa53a92e Merge branch 'master' into fast-addfile 2021-12-18 18:21:32 -05:00
Sally Coolatta
436b6d50ea Bot predict nudging scale is based on the prediction's radius 2021-12-18 16:31:08 -05:00
Sal
6d72b80984 Merge branch 'fix-spherebox-dehacked' into 'master'
Add missing spherebox states to dehacked (fixes SOC/Lua states)

See merge request KartKrew/Kart!503
2021-12-18 01:44:25 +00:00
James R
7d2633f572 Correct spherebox dehacked states list 2021-12-17 17:32:19 -08:00
Sally Coolatta
a6d1043d17 Reduce turning for bots when they stair jank 2021-12-17 18:29:35 -05:00
Sally Coolatta
4a34eb5e96 Disable ASM column / span entirely
Causes strange unidentifiable bugs, and testing with tape who has a few framerate issues. perfstats outputted practically the same frames for everyone. Whatever frame drops exist are simply something else and ASM is not helping at all, so decided it's not worth it.

Behind a define anyway, if someone decides to fix it anyway.
2021-12-17 16:39:09 -05:00
SteelT
156ab1da1c Merge branch 'brightmap' into 'master'
Brightmaps

See merge request KartKrew/Kart!499
2021-12-17 19:10:52 +00:00
James R
84ccf18b76 Read PNG and patch header in one go for sprites 2021-12-17 04:50:40 -08:00
James R
0cf65047ec Do not load MUSICDEF twice 2021-12-17 03:09:00 -08:00
James R
1c0ddc7bca P_AddWadFile: only reload graphics when replaced 2021-12-17 02:41:47 -08:00
James R
8de36a9ab0 Load titlecard font with font system 2021-12-17 02:41:34 -08:00
Sally Coolatta
510c65699b Fixed animated span brightmaps being offset
`levelflat->u.texture.num` is modified at run-time to do animations, unlike wall textures which use `texturetranslation`.
2021-12-17 04:16:51 -05:00
James R
8012d00684 Add HU_UpdatePatch, recaches patch only if it exists in pwad 2021-12-17 01:07:54 -08:00
Sally Coolatta
5183d3161c Simplify span brightmap load 2021-12-17 03:42:59 -05:00
James R
ade0b48b89 Add missing mobj flags to SOC/Lua 2021-12-16 23:05:44 -08:00
James R
51941f5896 MF_NOSQUISH to disable K_Squish 2021-12-16 23:03:39 -08:00
James R
ffa2af7e07 Disable flat animdefs
The speed up is significant.
2021-12-16 22:25:08 -08:00
James R
4578e6f8f1 Hash name lookup for textures and lumps 2021-12-16 22:10:36 -08:00
James R
a4742c7da7 P_AddWadFile: only load textures in current file 2021-12-16 18:37:09 -08:00
Sally Coolatta
b0317e7120 Merge branch 'master' into brightmap 2021-12-16 13:06:57 -05:00
Sally Coolatta
603a97938b "Support" ASM functions
(By that, I mean it defaults to ASM, but uses the C version when drawing brightmapped stuff. Was this worth the minor performance gain over just making NOASM=1 default? I dunno.)
2021-12-16 13:05:37 -05:00
Sally Coolatta
6399cd57e1 Fix the print's file extension 2021-12-16 11:52:51 -05:00
Sally Coolatta
daab86f461 Implement brightmaps for span drawers, fix column loop bug 2021-12-16 11:48:32 -05:00
Sal
4f6121cef2 Merge branch 'landmine-explosion' into 'master'
Remove Landmine dust ring on explosion

See merge request KartKrew/Kart!495
2021-12-16 16:16:36 +00:00
Sal
24a5f20fc7 Merge branch 'vote-gametype-change' into 'master'
Fix timelimit not getting set when going to Battle

See merge request KartKrew/Kart!496
2021-12-16 16:16:26 +00:00
Sally Coolatta
04c1a9dcb1 Brightmaps on walls 2021-12-16 09:40:14 -05:00
Sal
3ca0dc376d Merge branch 'slow-startup' into 'master'
Optimize PNG detection and generate blendtables on parallel thread

See merge request KartKrew/Kart!498
2021-12-16 10:10:22 +00:00
Sal
809c766c99 Merge branch 'sphere-boxes' into 'master'
Blue Sphere boxes in Battle

See merge request KartKrew/Kart!494
2021-12-16 10:09:03 +00:00
James R
ccdbd9ccc9 A_ItemPop: var1 determines roulette or sphere award 2021-12-15 22:34:43 -08:00
Sally Coolatta
cfe8a1bfa4 No random chance for sphere box
Asked Oni how it should be done, he said item + sphere box at the same time
2021-12-15 21:21:54 -05:00
James R
c39edbbf7f Read only PNG header bytes to confirm a sprite is a PNG
Saves about 300 ms for R_InitSkins.
2021-12-15 16:02:23 -08:00
James R
29399f6033 Send R_GenerateBlendTables number crunch to parallel thread 2021-12-15 15:34:51 -08:00
James R
de2eab5e7a Inflate only size out bytes
Saves time uncompressing an entire lump when only part of
it is needed.
2021-12-15 14:10:20 -08:00
James R
152f4224d9 Read only header bytes when creating textures list
R_LoadTextures was reading in the entirety of every
texture lump, now it only reads the 8 byte PNG header.
This saved more than 1 second for me (1.68 s -> 0.24 s).

PNG still need to be read in entirely to check their
dimensions; I didn't bother looking into optimizing it
since we don't have many PNG textures right now.
2021-12-15 14:08:57 -08:00
James R
6edbc9922a Merge branch 'free-texture-lumps' into 'master'
Free 700 mb of unused texture data

See merge request KartKrew/Kart!497
2021-12-15 21:49:01 +00:00
James R
2ac9761af0 Free unused texture lumps in R_LoadTextures
PU_CACHE never gets freed automatically and Z_Unlock does
NOTHING.
2021-12-14 23:19:45 -08:00
Sal
463cbcef62 Merge branch 'gasping-for-air' into 'master'
Add gasp sound effect when emerging from water

See merge request KartKrew/Kart!484
2021-12-15 04:16:46 +00:00
Sal
00a08e07ce Merge branch 'namefix' into 'master'
Some fixes for bad player info on joining servers

Closes #151

See merge request KartKrew/Kart!470
2021-12-15 04:16:07 +00:00
James R
5145011251 Add some missing G_SetGametype calls
Fixes timelimit not being reset when switching gametypes
on the vote screen.
2021-12-14 18:11:08 -08:00
James R
1140410e2c Spawn SPHERE BOXES randomly in Battle
They look like random item boxes (the ones in Race) but
have a blue sphere inside of them. One box is worth 10
blue spheres. More boxes spawn during Overtime.

New sprite: SBOX
2021-12-14 01:05:42 -08:00
Sal
5be15fedda Merge branch 'ogl-sw-perspective' into 'master'
Fix OpenGL software perspective

See merge request KartKrew/Kart!493
2021-12-13 19:48:27 +00:00
James R
033a489b85 Fix bad merge @ 4a8340cd4 2021-12-13 01:29:20 -08:00
James R
1285812b84 Merge branch 'full-file-list' into 'master'
Disable downloading and check md5 of mainwads (maps.pk3, patch.pk3, etc.) in netgames

See merge request KartKrew/Kart!490
2021-12-13 06:31:31 +00:00
Sal
d7829334d3 Merge branch 'bot-maint' into 'master'
Bot maintenance

See merge request KartKrew/Kart!489
2021-12-12 19:54:38 +00:00
James R
184a89db43 Always play splash sfx when entering/exiting water 2021-12-12 03:30:08 -08:00
James R
35238510e3 Use sfx_s3k38 2021-12-12 03:28:59 -08:00
James R
32127f37ee Check mainwads netgame md5 in developer build 2021-12-12 02:58:06 -08:00
James R
9e1146bc30 Disable downloading for now 2021-12-12 02:47:46 -08:00
Sally Coolatta
2a9f2214cb Merge branch 'master' into terrain-lump 2021-12-12 04:15:53 -05:00
Sal
f9abe3f2e4 Merge branch 'flame-shield-slope-resistance' into 'master'
Slope resistance for flame shield

See merge request KartKrew/Kart!488
2021-12-12 09:13:05 +00:00
Sally Coolatta
37aa0b633a Merge branch 'master' into bot-maint 2021-12-12 04:11:46 -05:00
Sally Coolatta
cec8137864 Require Effect 1 for using bot controller angle. 2021-12-12 04:07:32 -05:00
Sally Coolatta
bfa3311eca Make rivals even more aggressive to players
:)
2021-12-12 03:28:49 -05:00
Sally Coolatta
cd0a259bbe Code cleanup
- K_FindBotController returns the line_t directly, instead of a linedef index.
- Trick panel code is in its own function.
- Try to fix infinite bot heat death
2021-12-12 02:32:03 -05:00
Sally Coolatta
0e43a04dee Try adding tripwire support
Kind of lazy. When checking bot traversal, it considers tripwires as walls. K_BotCanTakeCut now is limited to whatever can take tripwires (no more hyudoro invisibility).

Probably should have something more foolproof, but it's annoying to test any changes to this. The only maps I can think of with really easy tripwires clearly don't have their waypoints with bots in mind, the rest are very optional or out of the way or otherwise the bots don't want to even touch them at all.
2021-12-12 02:07:21 -05:00
SteelT
980acccdb2 Merge branch 'fix-model-tilt' into 'master'
Fix model tilting on slopes

See merge request KartKrew/Kart!487
2021-12-12 04:41:41 +00:00
Sally Coolatta
5f4e4f8cb5 Merge branch 'master' into bot-maint 2021-12-11 14:13:27 -05:00
Sally Coolatta
bfdae28409 Not Climable flag on a bot controller disables rubberbanding 2021-12-11 04:18:09 -05:00
Sally Coolatta
8d5cec5ebf Move where PF_HITFINISHLINE is removed
Also removes a few remaining instances of player->bot being checked to affect gameplay where it shouldn't from vanilla, but it's code that is rarely used / completely unused anyway.
2021-12-11 04:12:06 -05:00
Sally Coolatta
ba26a3a223 Require bots to be much slower to consider spindash 2021-12-11 02:22:33 -05:00
Sally Coolatta
08bfd6e881 Improve the new wall detection further
They didn't fall off on Hardhat, I'm so proud of my sons
2021-12-11 01:51:40 -05:00
Sally Coolatta
19463d6b20 New bot prediction wall detection
Instead of searching for walls around the player, and then deciding to make the radius tighter if it found anyway, it instead checks if the waypoint it's trying to predict towards was blocked by any walls / hazards.

Needs adjusted some, I think its being pulled back too hard sometimes, but I am optimistic about some of the improvements I already saw.
2021-12-10 17:42:00 -05:00
Sally Coolatta
07d5691b73 Make them commit harder to turning
- Removed the "minor adjustment" threshold, since that was done before global easing
- Removed the "accel + brake to slowdown and reorient yourself if you're facing too far away from the track" bit, because 1.) it was done before accel + brake was turned into EBrake (so it now often makes them come to a STOP instead of simply slowing down) and 2.) turning harshly will slow them down anyway, so maybe isn't necessary
2021-12-10 16:23:41 -05:00
Sally Coolatta
0588227da1 Merge branch 'master' into bot-maint 2021-12-10 16:01:11 -05:00
SinnamonLat
1adbfcff03 Remove Landmine dust ring on explosion 2021-12-10 14:16:20 +01:00
James R
a3d5804da9 Let flame shield resist slope butter 2021-12-10 02:46:34 -08:00
James R
a90520ebdc Do not factor roll and pitch into model rollangle
Those transformations are applied separately so the model
tilts in 3d space.
2021-12-10 00:32:46 -08:00
Sal
d3c775a08d Merge branch 'models-1st-class' into 'master'
Model tilting and stretching

See merge request KartKrew/Kart!486
2021-12-10 07:57:34 +00:00
James R
ca76754248 Merge branch 'squish-that-kart' into 'master'
More squish tweaks

See merge request KartKrew/Kart!485
2021-12-10 07:57:33 +00:00
James R
1ac123246d Model stretching 2021-12-09 22:41:54 -08:00
James R
4f04c0c430 Tilt models 2021-12-09 22:41:54 -08:00
James R
4fc82f0f53 Squish during huge vertical momentum
YIKES
2021-12-09 21:55:27 -08:00
James R
c5e3eb7fff Minorly extend squish time 2021-12-09 21:51:40 -08:00
James R
95bfe07d66 Enable sprite rotation in OpenGL 2021-12-09 21:34:41 -08:00
James R
7544f8b3b4 Merge branch 'teddthertive' into 'master'
Additive sign/tether sparkles

See merge request KartKrew/Kart!481
2021-12-10 04:21:05 +00:00
SteelT
e009f1ebab Merge branch 'super-upside-down-spring' into 'master'
2x vertical speed for downward springs

See merge request KartKrew/Kart!483
2021-12-10 04:11:17 +00:00
James R
134926fe81 Merge branch 'no-scale-shadow-gl' into 'master'
Fixed shadow the hedgehog seizure

See merge request KartKrew/Kart!482
2021-12-10 01:59:07 +00:00
James R
a617563bd8 Add gasp sfx when exiting water, but not with bubble shield 2021-12-09 17:44:23 -08:00
toaster
4108d5acb0 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into namefix 2021-12-10 00:04:37 +00:00
Sally Coolatta
76874de965 Drop shadow tweaks for OGL
- Shadow uses subtractive & additive, like software shadows
- Shadow does not change scale or opacity, like software shadows
- Fixed shadow the hedgehog seizure
2021-12-09 18:32:52 -05:00
toaster
69483f2578 Additive sign/tether sparkles 2021-12-09 22:33:57 +00:00
Sally Coolatta
35a3f65e83 Allow "texture" as an alias to "floor"
Since we I'm using it for Tripwire too
2021-12-09 16:32:31 -05:00
Sally Coolatta
65adddd53e Merge branch 'master' into terrain-lump 2021-12-09 16:24:43 -05:00
Sally Coolatta
047b725a30 Implement bumpy floor 2021-12-09 16:12:09 -05:00
toaster
a149fa9db9 GL now loads in netgames and doesn't memory leak
What is broken:
* Encore mode remapping in GL only
* Seizure effect in Daytona (NOT IVO SAFE)
* God knows what else has been waiting in the wings
2021-12-09 20:57:15 +00: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
35a72e56dc Implement splash & footstep blocks, commentate more of the code
They do nothing atm, but they can be set properly now :)
2021-12-09 14:45:59 -05:00
Sally Coolatta
b1ffaa99f8 Sync mobj->terrain
This should be enough I think to sync terrain up. The data structures can't change after the files have been loaded, so it should be good. Needs proper online testing though
2021-12-09 13:20:35 -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
Sally Coolatta
d7a8ec9fbd Liquid terrain functions 2021-12-09 02:37:44 -05:00
Sally Coolatta
f7834054a5 You can now link terrain to textures 2021-12-09 01:55:29 -05:00
Sally Coolatta
53d777788a Friction value is used, implemented DefaultTerrain 2021-12-09 01:21:34 -05:00
Sally Coolatta
150faf9de6 Add terrain pointer to mobj_t 2021-12-09 00:56:05 -05:00
Sally Coolatta
a8615cac5b TERRAIN lump reading
Does not impact gameplay but hey pretty cool
2021-12-08 19:16:12 -05:00
SteelT
dfadd430b7 Merge branch 'landmine-explosion' into 'master'
New Landmine Explosion VFX

See merge request KartKrew/Kart!479
2021-12-08 01:53:35 +00:00
SteelT
83988a1cd8 Merge branch 'fade-strength' into 'master'
Alpha value for fade colormaps + colormap bug

See merge request KartKrew/Kart!477
2021-12-08 01:53:32 +00: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
3ae09d750c Merge branch 'water-physics-mkii' 2021-12-07 16:40:00 -08:00
James R
0d0cb4d5b1 Merge branch 'fuck-crazy-turn' into 'master'
Fuck crazy water turning

See merge request KartKrew/Kart!478
2021-12-08 00:37:33 +00:00
James R
e07b296368 Merge branch 'waterrun' into 'master'
Water running

See merge request KartKrew/Kart!476
2021-12-08 00:36:16 +00:00
James R
f2e8d7d469 Increase step up with water-running just like water-skipping 2021-12-07 16:26:52 -08:00
James R
a1e8cdf8c5 Adjust underwater steering again
- 1.5x strafe -> 1.8.
- Do not nerf steering at 11 FU or below.
2021-12-07 15:33:45 -08:00
Sally Coolatta
7c0088b752 TERRAIN lump mockup 2021-12-07 17:23:42 -05:00
SinnamonLat
2b3da168cb New landmine explosion 2021-12-07 09:54:00 +01:00
Sally Coolatta
4a0d0f224f Fuck crazy turning 2021-12-07 01:01:00 -05:00
James R
0cbd24e589 2x vertical speed for downward springs 2021-12-06 21:30:35 -08:00
James R
ce366099b0 Make horizontal versus vertical momentum more strict when deciding water-run 2021-12-06 21:07:34 -08:00
James R
84170a59fa Cap underwater steering tilting 2021-12-06 20:35:26 -08:00
James R
ab77bceb88 Adjust underwater strafing
- 3/4 steering ability while underwater (not drifting).
- A little less friction while underwater.
2021-12-06 20:33:41 -08:00
Sal
d05e781467 Merge branch 'uncapped' into 'master'
Try fixing uncapped netgame camera jittering

See merge request KartKrew/Kart!472
2021-12-07 04:20:45 +00:00
Sally Coolatta
dbefc8fe58 Fix yellow persist fade colormap bug
I did the equivalent change to OpenGL and it broke Zoned City, despite it being fine in Software ... not sure what's up with that, since the color math is pretty similar. Just gonna leave that alone for now...
2021-12-06 22:47:15 -05:00
Sally Coolatta
b03cfe302d OGL fade alpha support 2021-12-06 20:58:31 -05:00
Sally Coolatta
8484ba9294 Alpha value for fade colormaps 2021-12-06 20:38:30 -05:00
James R
58446441fe Don't water-run while in grow
Also there was a typo lmao
2021-12-06 16:14:56 -08:00
James R
a7a572a7ea Water-run if you are above 100% speed and would cross a tripwire 2021-12-05 23:23:43 -08:00
James R
9bde266f9f Water running
You can run on water in any case where you would have
slope resistance AND your speed is over 100%. You may run
on water regardless if you're speed is above 200%.
2021-12-05 22:41:25 -08:00
James R
f0c9e49a2b Clip watertop and waterbottom between other sector and FOFs 2021-12-05 22:38:59 -08:00
James R
aebe6dd59c Don't apply shallow water effects while in offroad 2021-12-05 20:13:20 -08:00
James R
2a74ee07f1 Update underwater physics
- Reduce steering effect and remove increased friction.
- Strafe into turns and tilt the inside wheels up.
2021-12-05 20:12:48 -08:00
Sally Coolatta
35eeaaa16f Merge branch 'master' into bot-maint 2021-12-03 12:40:10 -05:00
Sal
be34cd699b Merge branch 'clipflip' into 'master'
Fix drift clips suddenly inverting gravity

See merge request KartKrew/Kart!471
2021-12-03 13:27:26 +00:00
Sal
da744d7f37 Merge branch 'ripply' into 'master'
Ripply return

Closes #191

See merge request KartKrew/Kart!473
2021-12-03 13:27:12 +00:00
toaster
234403f1f2 Fixed the bad merge that prevented non-transparent surfaces from rippling. 2021-12-02 16:49:13 +00:00
Sally Coolatta
83444ce5d5 Interpolate angle & nametags 2021-12-01 16:50:17 -05:00
Sally Coolatta
a8d5a949ae Enable the thinker of NOTHINK...
OK so we kind of need NOTHINK objects to still think because otherwise they can never update their interpolation values. This should probably replaced with some other kind of system, consider this temporary...

(MF_NOTHINK is still mostly covered by a very early return in MobjThinker, if you're unaware, just means this might have to waste the extra time iterating through them...)
2021-12-01 15:51:57 -05:00
Sally Coolatta
225590b7ba Draw framerate counter properly in uncapped 2021-12-01 13:52:51 -05:00
Sally Coolatta
3e227654c7 Little unneeded semicolon 2021-12-01 12:46:41 -05:00
Sally Coolatta
7238a1be83 Interpolate camera roll, fix skybox in opengl 2021-12-01 10:53:15 -05:00
Sally Coolatta
0c8a6ccf40 Merge branch 'master' into uncapped 2021-12-01 07:55:22 -05:00
Sally Coolatta
55f48be6ab Missing parenthesis. 2021-12-01 07:55:09 -05:00
Sally Coolatta
362f779f26 Merge branch 'master' into uncapped 2021-12-01 06:46:41 -05:00
Sally Coolatta
6ecac4159a This seems to fix the camera stuttering in netgames when I try it on my own
Feel like this might be wrong so TRY IT first!!
2021-12-01 06:45:02 -05:00
lachablock
87c31cb89f Fix drift clips suddenly inverting gravity 2021-12-01 22:42:49 +11:00
Sal
0bba6d0c62 Merge branch 'toastmiiisc' into 'master'
toastmiiisc

See merge request KartKrew/Kart!464
2021-12-01 11:22:32 +00:00
SteelT
2c1dd6efbf Merge branch 'capsules' into 'master'
Fix item capsules in reverse gravity

See merge request KartKrew/Kart!443
2021-12-01 03:45:15 +00:00
SteelT
4cf01bf549 Merge branch 'fix-followers' into 'master'
Fix followers

See merge request KartKrew/Kart!446
2021-12-01 03:32:08 +00:00
Sally Coolatta
43356ca73e Nope, it actually just causes camera hitches even when alone, even if this fixes the problem its not the solution 2021-11-30 18:10:51 -05:00
toaster
b716e142a8 Some fixes for bad player info on joining servers.
* Don't overwrite the first player's name when joining with multiple local splitscreen players. (resolves #151)
* The defaults for unprovided names are now consistently "Player A/B/C/D" as opposed to some being letter-based and some being number-based.
* Send local player info once per local splitscreen player, rather than n^2 times (where n is the number of local splitscreen players).
* Since the packet *requires* four names to be sent every time you join a server, send dummy names for local splitscreen players who aren't connecting, instead of your actual cvars (no data leakage you didn't ask for!)
2021-11-30 21:24:00 +00:00
Sally Coolatta
4a8222d397 Just set default renderdelta when paused
Supports multiple pause types too
2021-11-30 14:28:27 -05:00
Sally Coolatta
f19e8be3a0 Enable lagless cam
I left it off because I think Kart intentionally removed it, but the reason we did might not apply anymore...?
2021-11-30 14:03:56 -05:00
toaster
e29f113047 Merge branch 'master' into capsules 2021-11-30 13:50:46 +00:00
toaster
2ca195961b Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into fix-followers 2021-11-30 13:43:10 +00:00
James R
182527db8b Merge branch 'gentlemens-2' into 'master'
Instead of gentlemens dropping packets, it simply delays what it sends

See merge request KartKrew/Kart!467
2021-11-30 04:51:01 +00:00
James R
7180027c9f Merge branch 'ceiling-bump' into 'master'
Ceiling clipping is satisfying

See merge request KartKrew/Kart!466
2021-11-30 04:09:19 +00:00
James R
b479fdcef6 Merge branch 'jelly-racers' into 'master'
Squashing and stretching

See merge request KartKrew/Kart!420
2021-11-30 04:00:03 +00:00
James R
6457ab0a9c Raise squish max 2021-11-29 19:56:33 -08:00
Sal
031a1105ff Merge branch 'cmake-develop-flag' into 'master'
Add cmake config option to compile a dev build

See merge request KartKrew/Kart!460
2021-11-30 02:29:21 +00:00
Sal
a326e180ca Merge branch 'replayfixes' into 'master'
Replay fixes mark whatever

See merge request KartKrew/Kart!463
2021-11-30 02:28:57 +00:00
Sal
7f8a9dc4e5 Merge branch 'uncapped' into 'master'
Eidolon's interpolation

See merge request KartKrew/Kart!468
2021-11-30 02:28:38 +00:00
Sally Coolatta
a52dc0f845 Copy interpolation data to afterimages 2021-11-29 20:47:28 -05:00
Sally Coolatta
e5244c7e8c Lap start HUD interpolates 2021-11-29 20:36:17 -05:00
Sally Coolatta
8f11cd6603 Interpolate FINISH hud scroll 2021-11-29 20:18:17 -05:00
Sally Coolatta
c4ca097224 Interpolate minimap icons
Was this completely unnecessary? Yes. Is it cool? Hell yeah
2021-11-29 20:12:51 -05:00
Sally Coolatta
c6bf534f29 HUD items with V_SLIDEIN interpolate 2021-11-29 20:00:41 -05:00
Sally Coolatta
bea5d9dce7 Fix trick timing efx in uncapped 2021-11-29 19:28:41 -05:00
James R
f917c60637 Remove MF_NOTHINK from sign pieces
Without a thinker, interpolation doesn't change state.
2021-11-29 15:29:01 -08:00
Sally Coolatta
3d2ad0b95e Fix water trails not interpolating properly 2021-11-29 17:59:15 -05:00
James R
aaeaef5223 Do not set hu_stopped on interpolated frame 2021-11-29 14:40:30 -08:00
toaster
9e12195840 Fix two more minor issues with reading and writing replays.
* DXD_PLAYSTATE and DXD_WEAPONPREF no longer conflict when both are read during the same tic. (VERY rare bug, but was possible)
* Fixed G_WriteDemoTiccmd not considering the sign of forwardmove properly. (Of basically no consequence r/n, but could bite us down the line if not caught)
2021-11-29 19:45:01 +00:00
toaster
4b42f99ca7 Fix player removal not being recorded in netreplays. (Will not work with existing replays that lack this data) 2021-11-29 19:41:11 +00:00
Sally Coolatta
5fea80c61b Apply interp to models, apply sprite world offsets properly 2021-11-29 08:46:56 -05:00
Sally Coolatta
c43f8da5e6 P_SetOrigin & P_MoveOrigin to replace P_TeleportMove 2021-11-29 08:20:27 -05:00
Eidolon
f398004a18 Ensure + commands get executed before map start 2021-11-29 07:25:46 -05:00
Eidolon
e2482edce3 Ensure viewsector is accurate to viewx/viewy
This fixes a potential crash in OpenGL when changing between levels.
2021-11-29 07:24:27 -05:00
Sally Coolatta
f16b567319 Menu 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.

Co-Authored-By: Eidolon <furyhunter600@gmail.com>
2021-11-29 07:23:04 -05:00
Sally Coolatta
5325431450 Fix crash on level load 2021-11-29 07:15:02 -05:00
Eidolon
1550210188 Implement interpolation at the renderer level
Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.
2021-11-29 06:43:46 -05:00
Sally Coolatta
0e25de897d Instead of gentlemens dropping packets, it simply delays what it sends 2021-11-29 05:27:44 -05:00
James R
1e73c842e2 Run squish effect for players too
This is ironic.
2021-11-28 23:14:53 -08:00
James R
696ca049d8 Apply momentum based squash and stretch to every object
Also netsave.
2021-11-28 22:43:48 -08:00
James R
5b86a70db2 Merge remote-tracking branch 'origin/master' into jelly-racers 2021-11-28 22:03:37 -08:00
James R
72ded01ac8 Smoother ceiling clipping
- Apply some gravity immediately.
- Play the bump (like against walls) effect.
2021-11-28 21:45:31 -08:00
James R
0fad5f5a23 Merge branch 'tripwire' into 'master'
Tripwire

See merge request KartKrew/Kart!462
2021-11-29 03:20:56 +00:00
James R
332d3bfa12 Fix passing tripwire not triggering SOMETIMES 2021-11-28 18:48:27 -08:00
James R
9750e2cd07 Tumble when passing tripwire while spinning out and with >200% speed 2021-11-28 17:27:06 -08:00
James R
2cab15c7a3 Automatically apply additive to tripwires 2021-11-28 16:34:46 -08:00
James R
54aaf6d98e Apply tripwire effect to TRIPWIRE and 4RIPWIRE 2021-11-28 16:23:37 -08:00
toaster
8852874465 KHUD NOT NETSYNCED, hyuu cannot safely use it as a reference point 2021-11-28 21:00:49 +00:00
Sally Coolatta
fbaa57a39c Give Landmines its own bot usage function
Prevents them from attempting to use landmines tossed forward. (Not really notable at all, since there's no one in front of you when you get landmine, at most means they may hold onto it longer, but it was just a weird thing I always meant to fix)
2021-11-28 15:20:57 -05:00
toaster
15741da0a4 Improve some of the efficiency loss in F_DoWipe compared to K.S.'s 2.1 code by seperating out some of the loops. 2021-11-28 20:18:41 +00:00
toaster
ba3e896655 Make the game loading-bar miniwindow do OS polling, to allow you to tab back into it without it being considered frozen by the OS. 2021-11-28 20:15:42 +00:00
Sally Coolatta
e4b27933f2 Comment the tire grease change 2021-11-28 15:13:54 -05:00
Sally Coolatta
3536c73b66 Fix eggbox stealth being bugged and never being used... 2021-11-28 15:08:54 -05:00
toaster
3141ca0221 Replay fixes mark whatever
Not a pancaea for EVERYTHING, just a bunch of good stuff.

* Some issues with spectators not == true because the assignment wasn't casted.
* Netgame status (or rather its inverse) is recorded in netreplays now, to allow for power levels controlling spawn position.
* Fixed tally screen for replays to not scream infinitely at you.
* P_IsLocalPlayer now uses display players in replays.
* A bunch of good testing prints that helped me find these problems, commented out for now just in case we need them again soonish.
2021-11-28 20:03:49 +00:00
Sally Coolatta
6be351a304 Improved item throwing
- Bots attempt to do fast item snipes (they will throw more often when above top speed)
- They will not waste double jawz anymore (they check for a jawz already targetting who they want to shoot before they decide to shoot it)
2021-11-28 14:55:03 -05:00
Sally Coolatta
40958073e3 Increase bot max top speed now that everything around it is fixed lol 2021-11-28 14:42:44 -05:00
Sally Coolatta
c7caf7ab44 Pull the prediction a lot more forward by default 2021-11-28 14:37:21 -05:00
Sally Coolatta
dca887e23e Do not adjust friction on bots for tire grease 2021-11-28 14:36:58 -05:00
Sally Coolatta
0c35e3f8b7 Bring back more jitter 2021-11-28 13:31:25 -05: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
0e6bb75230 Check TRIPWIRE texture at map load
So it can be animated.
2021-11-28 04:08:38 -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
e1ee0977af Merge branch 'master' into snapify-hitlag 2021-11-28 01:23:53 -05: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
Sally Coolatta
0974d6d1f4 Reduced hitlag jitter
Makes a little easier to parse. I might have gone overboard but I really wanted to test my hunch if Ivo's issue was mostly the fact it jitters so hard :V
2021-11-28 00:08:50 -05:00
SteelT
0b74476707 Don't make asset hashing be required under dev builds 2021-11-27 21:02:04 -05:00
SteelT
c142648d03 Add cmake config option to compile a dev build 2021-11-27 20:36:40 -05:00
James R
17b3cd205e Merge branch 'snapify-hitlag' into 'master'
Snap da sentinel like hitlag

See merge request KartKrew/Kart!458
2021-11-28 00:29:29 +00:00
Sal
b239974675 Merge branch 'spring-grease-tweaks' into 'master'
Spring grease tweaks

See merge request KartKrew/Kart!457
2021-11-28 00:22:10 +00:00
Sal
e5a5727781 Merge branch 'segasonic-sounds' into 'master'
Add SegaSonic Arcade sounds

See merge request KartKrew/Kart!447
2021-11-28 00:21:27 +00:00
James R
9d485e17e7 Merge branch 'karma-gate' into 'master'
Elimination timer for karma bombs during overtime

See merge request KartKrew/Kart!459
2021-11-28 00:20:52 +00:00
James R
9abb632d19 Merge branch 'fix-hitlag-level-music' into 'master'
Fix level music not starting during hitlag

Closes #178

See merge request KartKrew/Kart!455
2021-11-28 00:20:20 +00:00
James R
b4fd699082 Merge branch 'balloons-collision' into 'master'
Let the player touch balloons

See merge request KartKrew/Kart!456
2021-11-28 00:20:07 +00:00
James R
e099cc2df8 Merge branch 'sound-def-volume' into 'master'
Volume option for sounds (like with MUSICDEF)

See merge request KartKrew/Kart!449
2021-11-28 00:19:53 +00:00
James R
5e6dac7020 Merge branch 'spbcapsul' into 'master'
No ring capsules when SPB-locked

See merge request KartKrew/Kart!452
2021-11-28 00:19:38 +00:00
James R
f90c85ef79 Merge branch 'fast-snake-netsave' into 'master'
Fix potential desync

See merge request KartKrew/Kart!454
2021-11-28 00:19:20 +00:00
Sally Coolatta
a17f11e6c5 Ignore collisions between 2 objects that are BOTH in hitlag
Still allows it if a new object interferes to add more hitlag, but this should hooopefully prevent super big knockback stacking from 1 object?
2021-11-27 13:45:23 -05:00
Sally Coolatta
cb5ea8b335 Add basic damage hitlag effects
- Invert high contrast greyscale colorization effect for damage hitlag
- Jitter is now also exclusive to damage-related hitlag
- Since jitter is now just tied to a flag, removed the old trick momentum hack
2021-11-27 13:38:45 -05:00
James R
0d3a1b72cb Apply grease to vertical only springs too 2021-11-27 03:05:04 -08:00
James R
f6e6c2010e Reintroduce battle overtime barrier minimum radius
- 768 fracunit minimum.
- Emerald spawning arc reduced so they spawn right next to
the barrier at minimum radius.
- Items always spawn.
2021-11-27 01:23:41 -08:00
Sally Coolatta
eb9e3d3e1b Snap da sentinel like hitlag
- Added a hitlag cap of 18 frames (can be decreased to 12 if it's too much)
- Hitlag amount can't be reduced, only increased
- Hitlag added is the same between both objects, instead of being different between the two
- Objects in hitlag can be interacted with again with TryMove (I was too nervous of it but it's fine in Snap lol)
- Rebalanced the damage hitlag lengths to make it feel relatively the same with all of the above considered
2021-11-27 03:24:29 -05:00
James R
fd6c65a339 Don't count down overtime karma timer while waiting to become bomb 2021-11-27 00:14:48 -08:00
James R
5f9ec5caa6 Fix karma overtime not counting down after 10 seconds :) 2021-11-27 00:06:01 -08:00
James R
059058476e Elimination timer for karma bombs during overtime
Every hit on another player while you are alive awards you
five seconds of karma bomb time during overtime. When this
timer is empty, you will DIE.
2021-11-26 21:55:32 -08:00
SteelT
d1a5a82980 Spring grease vfx is no longer visible when you're airborne 2021-11-26 23:44:06 -05:00
SteelT
db4bb74c42 All springs give spring grease 2021-11-26 23:42:25 -05:00
James R
25c6852482 Let the player touch balloons 2021-11-26 19:17:53 -08:00
James R
5f625437a8 Move level music check out of player thinker
Hitlag during this tic will skip playing the music.
2021-11-26 18:20:16 -08:00
James R
b22d18aea6 Merge branch 'makefile' into 'master'
Backport 2.2 makefile changes

See merge request KartKrew/Kart!453
2021-11-26 21:34:18 +00:00
James R
1958f3f61c Sync respawn.airtimer
Oops!
2021-11-26 12:55:23 -08:00
James R
170d0a2fb9 Toaster suggestions for e82bba18 2021-11-25 13:43:17 -08:00
toaster
d7e5d178e7 Fix ring capsules popping for you if you have an SPB. 2021-11-25 17:01:41 +00:00
James R
9ae0e0a8d7 Fix Kart conflicts
Conflicts from d5c08ac03

Some parts are reworked into the new build system.
2021-11-25 04:05:13 -08:00
James R
d5c08ac034 Backport 2021 SRB2 makefile overhaul
This is a squashed commit of the following commits from
upstream:

James R <justsomejames2@gmail.com> on 2021-05-01
Commit 44d217807f71d15bd7ca69dad226458e7060ccab
> Collect makefiles

James R <justsomejames2@gmail.com> on 2021-05-04
Commit f637e28d0c1877c44acd7b01f7130625d5ea4099
> Remove bin, objs and dep directories

James R <justsomejames2@gmail.com> on 2021-05-02
Commit b31056c7d977fe3c2a5e0637589fd9521f1f6c04
> Rewrite Makefile to be modular as well as more automated
>
> Some key points for programmers:
> - Source code files are mostly listed in a 'Sourcefile'.
>   So you no longer directly edit the object list. There
>   can be multiple Sourcefiles and they can even live in
>   subdirectories--the directory name will be prepended to
>   every filename in the list. Of course, the Makefile
>   still needs to be edited to read from each Sourcefile.
> - Different rules are no longer required for source code
>   files that live in subdirectories (such as sdl/ or
>   hardware/). Subdirectories Just Work so go ham!
>
> In addition to those points, another important change is
> that the bin directory is no longer divided into platform
> subdirectories (Linux64, Mingw, etc). Executables now go
> directly into bin. If you use DEBUGMODE or target 64-bit,
> then subdirectories for 'debug' and '64' will be made
> though.
>
> Oh by the way, I don't think make clean actually removed
> files before on Windows. It should now. I also fixed as
> many little inconsistencies like that as I noticed.
>
> And now just an overview of the technical aspects that
> shouldn't affect anyone who doesn't REALLY care about the
> Makefile...
>
> objs and dep directories have been moved to a make
> directory. Makefile.cfg and its variants have been moved
> out of their various subdirectories to src/Makefile.d
> make distclean removes the bin and make directories
> entirely, but make clean and cleandep still only affect
> the current build target.
>
> When I say automation, I mean that a lot of copy pasting
> in the Makefile has been reduced.

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 53d1cbe8264196e46911c86bc4be13d44aa35dfe
> Appveyor: update executable directory

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 888073d64d1885cae0ad8b5d54bfec31e9793e0a
> Fix make clean printing header

James R <justsomejames2@gmail.com> on 2021-05-04
Commit 3d7205d4942d1e1b2627fdf5acf9d9c82437a97b
> Fix minor errors with Windows ECHO, DEL, MD
>
> - Quotes were not removed by ECHO.
> - DEL would print an error on nonexistent file.
> - MD would do this plus return a nonzero exit code.

James R <justsomejames2@gmail.com> on 2021-05-05
Commit f9813844e7f0dfa6229062b1ebd83e4e8150c120
> Update CMakeLists.txt to use Sourcefiles
>
> This establishes (near) parity of source code file lists
> between the Makefile and CMakeLists.txt
>
> To make that change I messed around CMakeLists.txt a bit.
> It now uses target_sources and target_compile_definitions.
> I also removed some MSVC stuff since we don't actually
> care about MSVC--it made things easier.
>
> CMake minimum version 3.0 -> 3.13 for target_sources.

James R <justsomejames2@gmail.com> on 2021-05-05
Commit ec8b63d6759f0c124693ea6d5a521e8d82efd566
> Makefile: remove last of unused flags

James R <justsomejames2@gmail.com> on 2021-05-07
Commit c06817d0085ee77b0027917bca91a24e60c7deba
> Makefile: fix mingw/64 swapped with 32-bit

James R <justsomejames2@gmail.com> on 2021-05-07
Commit 9e7d80c2c44199126fa451c59fca0f98d23ad14d
> Makefile: suppress DEL error

James R <justsomejames2@gmail.com> on 2021-05-07
Commit 87afa7655a71539c7cbc7db12df18c4253187fbc
> CMake: fix ASM compile
>
> - target_sources from correct directory
> - enable_language must be used in add_executable directory

James R <justsomejames2@gmail.com> on 2021-05-08
Commit 210c9419e4bddd1fe8e9be7cb66de31119fa0d68
> Ignore -Wtrigraphs

James R <justsomejames2@gmail.com> on 2021-06-16
Commit 3a044e71cc7cf6c80d9836189511c1a58c108370
> Disable EXE disassembly and compression by default
>
> NOOBJDUMP=1 and NOUPX=1 have been removed. Make 'dump'
> target to disassemble. UPX=upx to compress executable.
>
> Setting UPX used to cause it to fail. That has been fixed.

James R <justsomejames2@gmail.com> on 2021-06-16
Commit c142b3241ddb8f1ea9b5090d20dffa43a17129ab
> Makefile: alert full path of final executable
>
> With added textual contrast.

James R <justsomejames2@gmail.com> on 2021-06-16
Commit b04c79d8a7ba4ae8f888ab94d394b6714699e107
> Say 'at'

James R <justsomejames2@gmail.com> on 2021-06-21
Commit 2d7a8c3c571bcc5335437e9db074c75af00408ce
> Makefile: use shell commands to read in Sourcefile
>
> File function is not supported < Make 4.2.

James R <justsomejames2@gmail.com> on 2021-06-21
Commit d5146945a69ebf30e6fc1fbb64558e456e0b7459
> Makefile: don't automatically set WINDOWSHELL unless PATH matches Windows norms
>
> This is for MSYS2, which requires unix shell commands.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit 5f4d7e3c5b013afe03ae2a441c82ad79bae7c66c
> Makefile: fail if old build directories exist
>
> After a checkout from before revision, old directories
> such as bin/Linux64 only remain if untracked files exist
> within. This may be confusing to the user. They may even
> use an outdated executable if it is one of those untracked
> files.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit c3ad5de912fccfdd64c510f5684883afceaa7d36
> Makefile: let variables be defined on Make line
>
> If a variable is defined as in 'make CC=gcc-10', then that
> definition overrides anything other definition in the
> Makefile.

James R <justsomejames2@gmail.com> on 2021-06-22
Commit ed85e994a46ace07cf022b38a9abac1698a8667e
> Remove misplaced parentheses

James R <justsomejames2@gmail.com> on 2021-06-29
Commit c1ecfa306f6a0b168d4f6cbc3224ebebd4deec51
> Makefile: 'dep' not 'deps'

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 6c03f9b5b3590e01773f05bc1c31cc67a2d88fc2
> fuck

James R <justsomejames2@gmail.com> on 2021-06-29
Commit abdf5c101cbe80657f210c0b90800e2c4c6f0c05
> Makefile: report SHELL

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 22ab611daa17bd23225f3afeeba39147c0d0fe17
> Makefile: do not automatically set WINDOWSHELL
>
> According to this answer--
> https://stackoverflow.com/a/45952425
> --Make will always prefer a unix shell, even on Windows,
> if one can be found in Path. So we can't check PATH to
> determine if it's a Windows shell... this is just too much
> bother.

James R <justsomejames2@gmail.com> on 2021-06-29
Commit f79e0ee540564fcec5da7c0dc4006906492a7f30
> Appveyor: remove 64-bit target

James R <justsomejames2@gmail.com> on 2021-06-29
Commit faee657572f23cd6f8b68c077873e01c4278414e
> Appveyor: update for new Makefile

James R <justsomejames2@gmail.com> on 2021-06-29
Commit 44b82dea58612e6f07830647e2b08555f54a7caa
> Appveyor: remove redundant CFLAGS
>
> Also changed -Wno-error=implicit-fallthrough to
> -Wno-implicit-fallthrough. For some reason Appveyor's
> version of GCC is triggering these warnings despite the
> comments, so just shut it up.

James R <justsomejames2@gmail.com> on 2021-06-29
Commit db919accd22350c087c1fd0e5122d8e490e2f171
> Appveyor: suppress real time file names

James R <justsomejames2@gmail.com> on 2021-07-12
Commit 58fa44e8dc0444eecbe701f31872fad9fa563a6a
> CMP0115

SteelT <steeltitanium1@gmail.com> on 2021-07-16
Commit 71f905f95bd4fe62dbca87208cf71b7309f12de1
> Fix gme support being effectively disabled
>
> I found this easier than trying to adjust the makefile, as it uses the same thing to automatically generate the various NO* compile options.

James R <justsomejames2@gmail.com> on 2021-08-14
Commit 824b1ab28cdddfd1c018454a9af14dabaab49fcd
> Makefile: use full stem in dependency generation
>
> Previously took only the filename, so the directory
> component was stripped. This broke dependencies for
> basically every file.

GoldenTails <milestailsprower101n2@gmail.com> on 2021-08-28
Commit 1a8ec7975c20e1d652cbbdb7a9e366192e41c05f
> Makefile: Improve gcc detection
>
> Wasn't working for me until I fixed it.
> Turns out gcc really doesn't like giving its name out.
> Most of the time it reads argv[0].
2021-11-25 03:56:23 -08:00
James R
8109bc8e61 Merge branch 'fast-snake' into 'master'
Quick reptile

See merge request KartKrew/Kart!451
2021-11-22 07:30:33 +00:00
James R
239e91c439 Do not tilt while respawning; speed up camera (snappier) 2021-11-21 22:20:04 -08:00
James R
f205d6d8fd Speed up lightsnaking if dying with airtime 2021-11-21 22:02:45 -08:00
SteelT
c44ef9f5f1 Merge branch 'gainax' into 'master'
Gainax Eyesparkle

See merge request KartKrew/Kart!450
2021-11-22 04:49:16 +00:00
toaster
6ad177cb42 Gainax eyesparkle (surprisingly, not a name for a pony...)
* Hold lookback to create a tiny twinkle in your eye.
* If an opponent is behind you, that sparkle is pretty big and plays a cool animation.
* If an opponent is behind you and you have an item, initiate the Chengi Gleam.
* These sparkles are only visible for every player except you. (Currently even with hyuu ghostliness)
2021-11-21 21:39:43 +00:00
toaster
fa8bffabfc Have replay recording of "hits" use the reference count system, so that it doesn't potentially access free'd memory.
(This is not THE replay fix, but it is A replay fix.)
2021-11-21 13:35:08 +00:00
James R
e82bba18f6 Use volume field of sound, access with SOC/lua
Volumes may be defined on a 0-100 scale, but any number is
accepted.

If the volume is negative then the sound will play at
normal volume (therefore the info table won't need to be
modified.)
2021-11-08 18:50:19 -08:00
James R
d22705727b Fix unsigned comparison with zero 2021-11-08 16:59:57 -08:00
RJPFonseca
dc8b5fb803 Used spaces instead of tabs in Makefile.cfg
(cherry picked from commit 69647eb78d36c0b2f5febecd2c4e55f622325217)
2021-11-08 16:57:02 -08:00
SteelT
5d17081d14 Merge branch 'tumbltweaks' into 'master'
Tumbltweaks

See merge request KartKrew/Kart!448
2021-10-19 03:57:13 +00:00
toaster
42629264b1 Extra comment just in case someone else tries to perform maintenance on tumble and gets confused like I did. 2021-10-17 22:18:04 +01:00
toaster
a43b64cb76 Tumble nerfing, on Oni's request.
- Maximum tumble height that leads into last bounce is now 60 mfu (mobjscaled fracunits), from 40 mfu.
- All tumbles that are over 100 mfu high have extra attenuation applied to them.
- Tumble into lightsnake now puts you in 1.5 seconds of wipeout, rather than the last tumble.
2021-10-17 22:14:42 +01:00
toaster
303df77b68 Unassigned variable fix (probably going to rip out the closed caption system out of Kart at some point, but this is good for now). 2021-10-17 22:11:30 +01:00
lachablock
8ce5dc69ff Add SegaSonic Arcade sounds 2021-09-10 10:28:20 +10:00
SinnamonLat
647dfd98fb forgot to change something back 2021-09-02 13:40:57 +02:00
SinnamonLat
f96f7c6ba3 Fix follower colours 'Match' and 'Opposite' not working 2021-09-02 13:34:17 +02:00
SinnamonLat
2df8aa69b7 missing follower check in SendNameAndColor 2021-09-02 08:33:49 +02:00
SinnamonLat
caf1ed37ac fix janky follower movements due to lag type being changed from int32 to uint32 in the struct 2021-09-02 08:17:43 +02:00
lachablock
e2c0f6638f Fix item capsules in reverse gravity 2021-08-02 13:57:27 +10:00
lachablock
6471ab07bf Add P_GetMobjZMovement and apply it to various vfx 2021-07-19 20:45:54 +10:00
SteelT
d5c30742dd Merge branch 'capsules' into 'master'
Item Capsules

See merge request KartKrew/Kart!440
2021-06-28 01:23:11 -04:00
lachablock
05749b9773 Add special behavior for SPB item capsules 2021-06-21 22:39:21 +10:00
lachablock
6477176c31 Don't add item capsules to the respawn queue 2021-06-21 15:33:38 +10:00
lachablock
baae615d08 Capsules FINALLY spawn properly on FOFs, and aerial capsules scale from the bottoms instead of their centers 2021-06-21 15:10:57 +10:00
lachablock
90269c1a91 New item capsule respawn functionality 2021-06-21 13:11:21 +10:00
lachablock
27489edd3d Don't spawn ring capsules in GTR_SPHERES gametypes 2021-06-21 12:09:34 +10:00
lachablock
b1e412ee33 Address item capsule suggestoastions 2021-06-21 12:03:01 +10:00
lachablock
8f93cdbb6b Revert item capsule respawn queue changes 2021-06-21 11:42:02 +10:00
lachablock
65204d951c Add dust to capsule burst & fix cap bust momentum 2021-06-20 15:25:48 +10:00
lachablock
1b41db9edc Fix mapload crash caused by capsules 2021-06-16 12:30:21 +10:00
lachablock
04ed130d24 Make capsule bubbles semibright, & fix ring capsule caps not being semibright 2021-06-15 15:16:59 +10:00
lachablock
e981de3c33 - Color Record Attack-persistent capsules sapphire
- Make invincibility capsules glow rainbow
- Fix aerial capsules not scaling to full size
2021-06-15 13:41:53 +10:00
lachablock
da37ba8238 Allow scripts (or other outside sources) to easily change the properties of an item capsule 2021-06-14 23:04:28 +10:00
lachablock
9151d31512 Allow only ring capsules to spawn in Record Attack, and add the ability for Extra to invert this behavior 2021-06-14 22:59:05 +10:00
lachablock
459c5615af - Added respawn functionality to item capsules
- Restructured some item capsule code to reduce thinker density and allow the item capsule parts to think after the capsule
- Super Ring capsules are now semibright
2021-06-14 19:04:55 +10:00
lachablock
7e1a29310f Add item capsule Ambush flag scaling; attempted gravity fix 2021-06-14 13:47:15 +10:00
lachablock
debfb41423 Merge remote-tracking branch 'origin/master' into capsules 2021-06-14 12:20:53 +10:00
lachablock
b78db12b0d Add item capsules 2021-06-14 12:20:39 +10:00
Sal
1f0d0ea396 Merge branch 'item-scale-tweak' into 'master'
Change the item odds/distance scaling for different player counts

See merge request KartKrew/Kart!429
2021-06-12 05:16:31 -04:00
Sally Coolatta
83fc7dd0a2 Merge branch 'master' into item-scale-tweak 2021-06-12 03:17:36 -04:00
Sal
41b0465efe Merge branch 'splits-tilt-fix' into 'master'
Fix tilting in splitscreen

See merge request KartKrew/Kart!439
2021-06-12 03:17:05 -04:00
Sally Coolatta
c4cb4f32c3 Merge branch 'master' into item-scale-tweak 2021-06-12 03:11:52 -04:00
Sally Coolatta
4eee8ab1d7 Fix tilting in splitscreen
R_GetPitchRollAngle used R_PointToAngle. This was fine because it was meant for rendering code. However tilting does its code mostly in player thinker, and it also uses this function, so it was not fine -- it would have some remainder tilt settings from the last player's screen.
2021-06-12 02:15:00 -04:00
SteelT
73d299396b Merge branch 'splitscreen-sound-fix' into 'master'
Sound refactor

See merge request KartKrew/Kart!430
2021-06-12 01:34:56 -04:00
SteelT
e1c52c6c61 Merge branch 'trick-panels-changes' into 'master'
Trick panels changes: Delay + Upwards Trick

See merge request KartKrew/Kart!425
2021-06-12 01:33:30 -04:00
Sally Coolatta
82fa875502 Refactor R_PointToAnglePlayer 2021-06-12 00:56:55 -04:00
lachablock
f031177ca4 Add some generalized functions for getting floating item frames 2021-06-12 14:12:45 +10:00
SteelT
b3cee8b8fc Merge branch 'master' into trick-panels-changes 2021-06-10 23:45:35 -04:00
toaster
bac7de2ea7 Merge branch 'kickstartdemo' into 'master'
Kickstartaccel demo fix

See merge request KartKrew/Kart!438
2021-05-27 16:51:04 -04:00
Sal
f55605f2f8 Merge branch 'zdebug-always-on' into 'master'
ZDEBUG is default

See merge request KartKrew/Kart!434
2021-05-27 12:47:38 -04:00
SteelT
a327b3f60c Merge branch 'new-titlecards' into 'master'
New titlecards

See merge request KartKrew/Kart!437
2021-05-27 12:41:12 -04:00
toaster
7fab92d73b Kickstartaccel demo fix
An absolute dogshit clown-level code blunder from me, now corrected.
2021-05-10 14:21:13 +01:00
Latapostrophe
f559f24c07 Encore support, gif fix and slight optimization 2021-05-02 11:38:33 +02:00
Latapostrophe
66740e96dc slight optimizations + undefs 2021-05-01 12:01:00 +02:00
Latapostrophe
aa04b5ce51 Merge branch 'master' of git.do.srb2.org:KartKrew/Kart into new-titlecards 2021-04-30 18:56:28 +02:00
Latapostrophe
f2f0a6cbe2 New titlecards 2021-04-30 18:11:36 +02:00
Sal
67c4fb328a Merge branch 'add-missing-sounds' into 'master'
Add missing mean bean machine sound enums to list of sounds

See merge request KartKrew/Kart!436
2021-04-30 06:44:59 -04:00
SteelT
5b0b29dbdc Add missing mean bean machine sound enums to list of sounds 2021-04-29 12:55:35 -04:00
Sal
47ab83c2d8 Merge branch 'mean-bean-sounds' into 'master'
Mean Bean Machine sound effects

See merge request KartKrew/Kart!432
2021-04-27 22:24:44 -04:00
Sal
ae3cfc690b Merge branch 'orbfterimages' into 'master'
Orbfterimages.

Closes #173

See merge request KartKrew/Kart!435
2021-04-27 17:08:56 -04:00
Sryder
710abf6820 Fix sound crash, let a sound be played for multiple players again too.
S_getChannel now doesn't do any alterations to the channel, it *only* returns the number of the free channel.
2021-04-27 21:27:42 +01:00
toaster
53806d41e0 Orbfterimages.
Fixes mistakes made in !408 and !418, resolving #173.
2021-04-27 20:29:30 +01:00
Sally Coolatta
44ed9fcd4c ZDEBUG is default
- ZDEBUG2 is now ZDEBUG ... although admittedly, it doesn't seem that useful, it just enables some CONS_Debug's ... but now there's a convenient way to enable them now I suppose
- Mostly just means the I_Errors give __FILE__ and __LINE__.
- Also enables a "memdump" command that just prints a bunch of zone memory info.

I don't think any of this should be guarded, so I went ahead and did this.
2021-04-26 14:49:45 -04:00
Sal
faed3170be Merge branch 'afterimg-fix' into 'master'
Fix Advance 2 afterimages conflicting with fade-out afterimages

See merge request KartKrew/Kart!431
2021-04-26 04:20:35 -04:00
Sally Coolatta
0f14f0cec1 Only check for listenmobj for the splitscreen players
Steel's comment is what hinted me to compare the code again -- P1 was the only one who didn't care about their listenmobj existing first.
2021-04-26 04:09:23 -04:00
Sally Coolatta
078ffa8914 Accidentally included one non-existent sound 2021-04-25 21:31:09 -04:00
Sally Coolatta
340c948c71 Fix being able to download our data files 2021-04-25 20:49:52 -04:00
Sally Coolatta
9ba424a6c4 Mean Bean Machine sound effects 2021-04-25 20:49:43 -04:00
Sally Coolatta
c0ba14a752 Use sounds.pk3 instead of sounds.wad 2021-04-25 20:42:25 -04:00
Latapostrophe
47a95efa6b push R_PointToAnlePlayer to Lua, might be super useful for it. 2021-04-24 14:49:41 +02:00
Latapostrophe
d253b66524 Fix effects in splitscreen 2021-04-24 14:46:39 +02:00
Sally Coolatta
9504b6011e Make it linear instead of exponential 2021-04-24 00:16:57 -04:00
Sally Coolatta
2ea9164cb1 Fix natural SPB, prevent getting bananas at the end of the race 2021-04-24 00:14:14 -04:00
Sally Coolatta
db43239ca3 Fix debug distribution crash 2021-04-23 20:57:14 -04:00
Sally Coolatta
54bdea086a SPB has rainbow item animation when forced onto you 2021-04-23 20:03:01 -04:00
Latapostrophe
e980be69ef wip splitscreen garbage. DOES NOT WORK. 2021-04-24 01:56:34 +02:00
Latapostrophe
e632e1d70e Final (?) visuals for trick panel timing 2021-04-24 01:26:39 +02:00
Sally Coolatta
0bc19152ca Fix Advance 2 afterimages conflicting with fade-out afterimages 2021-04-23 19:17:29 -04:00
Sally Coolatta
c99b1466ea Fix comments 2021-04-23 17:41:02 -04:00
Sally Coolatta
8958ebd293 Sound refactor
- Fix splitscreen volume being too low after james volume fix
- Use loops instead of horrid code duplication

Unfortunately seems to break sounds in menus and I dunno what to look at 😔
2021-04-23 17:38:38 -04:00
Sally Coolatta
d57632e71e Change the scaling for different player counts
Made more extreme for less than 8, made less extreme for more than 8.

2P: x1.25ish -> x2.5ish
16P: x0.68 -> x0.75
2021-04-23 15:21:45 -04:00
Sal
be91f05393 Merge branch 'object-bumping' into 'master'
New solid object bouncing, and updated player bouncing

See merge request KartKrew/Kart!426
2021-04-23 12:58:30 -04:00
Sal
7e842735a3 Merge branch 'party-fix' into 'master'
Fix parties becoming black upon map load

See merge request KartKrew/Kart!428
2021-04-23 12:57:33 -04:00
Latapostrophe
a27b825d3c horiz. lines keep momentum, slightly better visuals 2021-04-23 12:56:46 +02:00
Sally Coolatta
e5d899412c FIX PARTIES 2021-04-23 03:53:35 -04:00
Sal
42420eabc2 Merge branch 'more-mace-sound' into 'master'
More mace sound

See merge request KartKrew/Kart!421
2021-04-23 01:15:33 -04:00
Sal
6a159cc3ab Merge branch 'stair-janking' into 'master'
Yes, punish me more Stairs

See merge request KartKrew/Kart!417
2021-04-22 21:07:52 -04:00
Sally Coolatta
5ac5ca89d0 New solid object bouncing, and updated player bouncing
- Solid objects have new bouncing physics, it's a mix of the object bumping and wall bumping. It replaces the "solid" option on K_KartBouncing.
- Goomba stomp momentum is decided in K_KartBouncing itself instead of needing to be manually passed in as a boolean, so you'll be able to goomba stomp all objects instead of just players.
- Fixed bumping not carrying all of its intended momentum, due to a bug making friction apply very strongly.
2021-04-22 20:29:59 -04:00
Latapostrophe
f935b3b6f4 wip: starting on visuals 2021-04-23 02:10:20 +02:00
Latapostrophe
d10f4ea128 More suitable data types + lua push 2021-04-23 00:14:36 +02:00
Latapostrophe
8b50b0ddd7 boost is now 125%, allow turning after upwards trick 2021-04-22 21:26:00 +02:00
Latapostrophe
a25b79885d 1/4s delay w/o input checks instead of 1/2 w/ input checks 2021-04-22 19:33:01 +02:00
Latapostrophe
29e11a0378 changes to the delay, boost when doing upwards trick 2021-04-22 15:11:15 +02:00
Sally Coolatta
48c8843feb Merge branch 'master' into stair-janking 2021-04-21 21:44:23 -04:00
Sally Coolatta
dcee9269dd FLAGS IS NOT LATENCY
UH OH STINKY COPY PASTE!!!!
2021-04-21 20:51:57 -04:00
SteelT
55bcfe48f4 Merge branch 'purple-spark' into 'master'
Purple sparks

See merge request KartKrew/Kart!424
2021-04-21 05:51:32 -04:00
lachablock
80977e1d1f Change red-to-blue spark transition color to SKINCOLOR_NOVA 2021-04-21 16:58:16 +10:00
lachablock
5e001a43ef Bump to 33% 2021-04-21 14:55:09 +10:00
lachablock
aeaf6c94f5 Give purple & rainbow driftboosts a 30% speed boost 2021-04-21 14:40:13 +10:00
Sally Coolatta
80ff9f2203 Some fixes
- Use SKINCOLOR_PURPLE instead of SKINCOLOR_THISTLE for the drift boost explosion.
- Use steering instead of cmd.turning in a few places. I dunno if I forgot to change these, or if it was accidentally reverted, or what. (Anything with a specific reason to use cmd.turning over steering will have a comment near it saying why.)
2021-04-20 13:21:26 -04:00
Sally Coolatta
5827c0c0b2 Original timings 2021-04-20 13:04:39 -04:00
toaster
905eb41778 Fix some compile-time errors. 2021-04-20 10:13:50 +01: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
19b453f7fb Reduce purple spark time even more 2021-04-20 17:40:23 +10:00
lachablock
bd79169f48 Reduce time it takes to get purple sparks 2021-04-20 17:33:20 +10:00
lachablock
1b02e90fec Fix typo from merge 2021-04-20 16:47:34 +10: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
lachablock
6e9c3cd864 Lightning sparks when releasing purple/rainbow drifts 2021-04-20 15:57:45 +10:00
SteelT
1b9c43e687 Merge branch 'structgunch' into 'master'
Structs gunched

Closes #167

See merge request KartKrew/Kart!422
2021-04-20 01:40:10 -04:00
toaster
6a55eb2f04 Resolve #167 - Rocket Sneakers now properly die if you rush their timer to 0. 2021-04-19 18:08:01 +01:00
lachablock
d0a3447ad4 Merge remote-tracking branch 'origin/master' into structgunch 2021-04-19 15:42:43 +10:00
SteelT
c2f00d1a30 Merge branch 'invinc-state-crash' into 'master'
Fix invincibility related crash accessing array index out of bounds

See merge request KartKrew/Kart!423
2021-04-19 01:41:57 -04:00
SteelT
a58a2dc58b Fix crash accessing array index out of bounds 2021-04-19 01:21:06 -04:00
lachablock
5aa2dd4cf0 Archive player->rings as SINT8 2021-04-19 14:28:41 +10:00
lachablock
9552dd4f80 Shift drift electricity scales with input direction 2021-04-18 00:25:31 +10:00
toaster
d9c9456798 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into structgunch
# Conflicts:
#	src/k_bot.c
2021-04-17 12:51:25 +01:00
toaster
00972a83d2 remove the prefix since everything seems to function 2021-04-17 11:30:08 +01:00
toaster
2ead3f7ee5 forgot to commit 2021-04-17 10:58:58 +01:00
lachablock
ed91279391 Add electricity sparks & change purple spark colors 2021-04-17 17:21:18 +10:00
Sally Coolatta
0e2b36e484 Purple sparks 2021-04-16 23:00:58 -04:00
Sal
2cbd0d0dcc Merge branch 'bots-stop-spindashing' into 'master'
Make spindashing bots work better

See merge request KartKrew/Kart!419
2021-04-16 20:34:15 -04:00
Sal
f131cda6e6 Merge branch 'swingstuff' into 'master'
Maces now have their fadeytrails again

See merge request KartKrew/Kart!418
2021-04-16 20:34:04 -04:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
Sally Coolatta
7167b16378 Update mace sound flags
- SF_X2AWAYSOUND to hear them farther away
- SF_TOTALLYSINGLE cuz it makes fast maces sound cool
2021-04-13 04:31:38 -04:00
Sally Coolatta
49d99e3a31 Do the spinning mace sound every half spin, instead of every full swing
This matches how Marble Garden maces worked in Sonic 3 more closely, and also just makes it plain easier to hear them in a fast-paced race.
2021-04-13 04:28:41 -04:00
James R
92e61d82d9 Don't stair jank in spectator mode 2021-04-11 20:19:38 -07:00
James R
81e43245a8 Don't stair jank if crossing from/onto a slope
Also don't do it on ceilings unless standing on it.
2021-04-11 19:31:10 -07:00
James R
3f09cd4f2b Stair janking VFX
Little sparks spawn on one side of your jart while
stepping, plays for 4 frames on each side.
Loops if 10 tics of the janking animation remain.
2021-04-11 18:57:31 -07:00
toaster
2d88026cdf Maces now have their fadeytrails again. 2021-04-11 14:53:28 +01:00
James R
7badb5d925 Stair jank sound effects
Big meaty sfx, or a shorter one when quickly stepping.
2021-04-11 02:32:26 -07:00
James R
786dec30ad Tweak stair janking physics a bit
- Fuck up turning for half the duration of the animation.
- Treat drift the same as turning (just ignore it).
2021-04-11 02:09:26 -07:00
James R
b3293aa122 Don't stair jank on really small steps
Also don't do it off slope launches.
2021-04-11 02:07:23 -07:00
Sally Coolatta
e006cfa287 Make spindashing bots work better
They will no longer do it on a whim after getting bumped out of position of hitting walls, instead checks if they're trying to accelerate and they physically can't.
2021-04-11 04:54:27 -04:00
James R
9771a64053 Unsquash the player more quickly
Also don't apply squashing/stretching on slope launches.
2021-04-11 01:04:33 -07:00
James R
661d8818d6 Squash and stretch player sprite with sudden changes in vertical momentum
Stretch with a sudden increase of
momentum, squash with a decrease.
2021-04-10 20:05:55 -07:00
James R
50c198cc0f Fuck up turning even more
- Lose control of turning for 2 tics instead of 1.
- Drift angle is also increased (less inward).
2021-04-10 04:22:44 -07:00
James R
2b173f1ec0 Rumble the jart when stepping on staircases
- Sprite tilts back and forth 5.625 degrees, two tics each
  side, for 17 tics (half a second).
- Turning is ignored--as if in the air--every other tic
  during those 17 tics.
2021-04-10 03:22:23 -07:00
James R
a77ed63c5f Merge branch 'sliptide-tweak' 2021-04-10 03:21:09 -07:00
James R
96d49730df Don't tilt according to slope while spectating 2021-04-09 19:06:56 -07:00
James R
1e97e92be0 Use lookback frames for sliptides 2021-04-09 18:22:15 -07:00
Sal
526b3c3b57 Merge branch 'listmapthings' into 'master'
listmapthings

See merge request KartKrew/Kart!411
2021-04-09 19:39:51 -04:00
Sal
fcc1090f47 Merge branch 'mine-no-fullbright' into 'master'
Proximity mines all lost their fullbright?!

See merge request KartKrew/Kart!416
2021-04-09 19:39:04 -04:00
Sal
b833907020 Merge branch 'fix-avgpwrlvl' into 'master'
Fix avgpwrlvl

Closes #156

See merge request KartKrew/Kart!414
2021-04-09 19:38:33 -04:00
Sal
973ed55170 Merge branch 'turn-in-air' into 'master'
Allow players to turn when they're in the air at 0 speed

See merge request KartKrew/Kart!403
2021-04-07 18:03:42 -04:00
Sally Coolatta
55ee8545b4 Merge branch 'master' into turn-in-air 2021-04-07 18:00:32 -04:00
James R
2f3e7723cb rejointimeout default -> Off 2021-04-07 00:11:39 -07:00
Sally Coolatta
2d202d748e Proximity mines all lost their fullbright?! 2021-04-07 03:05:01 -04:00
Sal
22c3dae600 Merge branch 'invinc-changes' into 'master'
Invincibility changes

See merge request KartKrew/Kart!412
2021-04-07 02:46:32 -04:00
Sal
0d09827284 Merge branch 'turn-mom' into 'master'
Turn easing that *doesn't* give specific controllers an advantage

See merge request KartKrew/Kart!415
2021-04-07 02:17:53 -04:00
Sally Coolatta
05915e641c Merge branch 'master' into turn-mom 2021-04-07 01:25:34 -04:00
SteelT
3545836ea1 Merge branch 'master' into invinc-changes 2021-04-07 01:20:12 -04:00
Sally Coolatta
0e7460811e Fix avgpwrlvl 2021-04-06 23:56:22 -04:00
SteelT
411fa4a6d8 Only extend the invinc time for the player if the hit was direct 2021-04-06 23:41:54 -04:00
SteelT
6d4a544fd5 Scale the speedlines based on how much is left on the timer 2021-04-06 23:18:59 -04:00
SteelT
fc8bd429f3 Merge branch 'master' into invinc-changes
Also made changes to sparkles, invincibility speedlines now replaces the sparkles if boosting.
2021-04-06 22:40:02 -04:00
toaster
b19372944c * Add a new feature - "-nodoubles", which shows only double-defined entries without needing to specify a range (but you still can, afterwards).
* Resolve Sryder's comment about confusing unlabeled iteration variables.
* Fix an issue with out-of-range printing for the end of the range failing.
2021-04-06 17:08:34 +01:00
toaster
15c2d75199 listmapthings
Introduces a new command that lists all mapthings by their doomednum and MT_ constant string.
* Can distinguish between hardcode and freeslots.
* Can detect double definition.
* With single argument, returns messages relating to that single doomednum.
* With two arguments, returns messages for that doomednum range inclusive (can swap if wrong way around).

The below image does not include what happens when it is called without any arguments, as that is long enough to only be legible in the logfile.
https://cdn.discordapp.com/attachments/369137273700089867/829007068333342720/unknown.png
2021-04-06 16:08:54 +01:00
Sally Coolatta
72dc88c043 Attempt at a non-controller dependent compromise for turn easing
Values are subject to tweaking.

(AngleDelta stuff is a leftover of the previous attempt, but I think the code's useful so I kept it in this commit anyway)
2021-04-05 23:52:56 -04:00
SteelT
32b1acb810 Disable the debug prints for now
Just incase they are needed again in the future, for whatever reason.
2021-03-31 23:38:05 -04:00
SteelT
4b269e89e7 Actually, fix it in a way without visually nerfing it. 2021-03-31 23:24:19 -04:00
SteelT
24fbdd70dd Revert "Fix bug with sparkles not being removed properly"
This reverts commit cf32ebb490.
2021-03-31 22:01:33 -04:00
SteelT
cf32ebb490 Fix bug with sparkles not being removed properly 2021-03-31 21:10:14 -04:00
SteelT
85f95d2d78 Add more comments to the code.
To make it easier to understand what's going on.
2021-03-29 21:32:35 -04:00
SteelT
3c817774b8 Fix sparkle animation not being capped properly. 2021-03-29 21:05:24 -04:00
SteelT
106afa9ace Make spawning look less squished 2021-03-29 00:15:52 -04:00
SteelT
ffc5469e9f Minor invincibility speedlines tweaks 2021-03-28 22:35:08 -04:00
SteelT
4f7aafe654 Fancy invincibility speed lines 2021-03-28 22:05:18 -04:00
Latapostrophe
3b617337ee Fancy rotating sparkles 2021-03-29 00:27:56 +02:00
SteelT
c8124a6c94 Some invincbility changes 2021-03-28 17:19:47 -04:00
Sally Coolatta
f2aaf1c6d8 Other way around 2021-03-10 09:16:59 -05:00
Sally Coolatta
029c36d59a Allow players to turn when they're in the air at 0 speed
Minor weird thing I noticed long ago
2021-03-09 17:30:41 -05:00
315 changed files with 32237 additions and 18006 deletions

4
.gitignore vendored
View file

@ -13,11 +13,11 @@ Win32_LIB_ASM_Release
*.dgb
*.debug
*.debug.txt
/bin/VC10/
/objs/VC10/
*.user
*.db
*.opendb
/.vs
/debian
/assets/debian
/make
/bin

View file

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.13)
# Enable CCache early
set(SRB2_USE_CCACHE OFF CACHE BOOL "Use CCache")
@ -34,12 +34,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
### Useful functions
# Prepend sources with current source directory
function(prepend_sources SOURCE_FILES)
foreach(SOURCE_FILE ${${SOURCE_FILES}})
set(MODIFIED ${MODIFIED} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE})
endforeach()
set(${SOURCE_FILES} ${MODIFIED} PARENT_SCOPE)
# Add sources from Sourcefile
function(target_sourcefile type)
file(STRINGS Sourcefile list
REGEX "[-0-9A-Za-z_]+\.${type}")
target_sources(SRB2SDL2 PRIVATE ${list})
endfunction()
# Macro to add OSX framework
@ -114,13 +113,14 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Set EXE names so the assets CMakeLists can refer to its target
set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
set(SRB2_SDL2_EXE_NAME ringracers CACHE STRING "Executable binary output name")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
add_subdirectory(src)
add_subdirectory(assets)
if(NOT ${SRB2_CONFIG_DEV_BUILD})
add_subdirectory(assets)
endif()
## config.h generation
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
@ -146,7 +146,7 @@ if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
endif()
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dr. Robotnik's Ring Racers" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")

View file

@ -2,15 +2,11 @@ version: 2.0.{branch}-{build}
os: MinGW
environment:
CC: ccache
CCACHE_CC: i686-w64-mingw32-gcc
CCACHE_CC_64: x86_64-w64-mingw32-gcc
CC: i686-w64-mingw32-gcc
WINDRES: windres
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
MINGW_SDK: c:\msys64\mingw32
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
CFLAGS: -Wno-implicit-fallthrough
NASM_ZIP: nasm-2.12.01
NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
UPX_ZIP: upx391w
@ -19,8 +15,6 @@ environment:
CCACHE_URL: http://alam.srb2.org/ccache.exe
CCACHE_COMPRESS: true
CCACHE_DIR: C:\Users\appveyor\.ccache
# Disable UPX by default. The user can override this in their Appveyor project settings
NOUPX: 1
##############################
# DEPLOYER VARIABLES
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
@ -53,11 +47,6 @@ cache:
- C:\Users\appveyor\srb2_cache
install:
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
- if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip"
- 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%NASM_ZIP%" "%MINGW_SDK%\bin" nasm.exe || exit 0
@ -72,39 +61,27 @@ install:
configuration:
- SDL
- SDL64
before_build:
- set "Path=%MINGW_SDK%\bin;%Path%"
- if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
- mingw32-make --version
- if not [%X86_64%] == [1] ( nasm -v )
- nasm -v
- if not [%NOUPX%] == [1] ( upx -V )
- ccache -V
- ccache -s
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
# for pull requests, take the owner's name only, if this isn't the same repo of course
- set "REPO=%APPVEYOR_REPO_BRANCH%"
- if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
- set "SRB2_MFLAGS=-C src NOECHOFILENAMES=1 CCACHE=1 EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
build_script:
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
after_build:
- if [%X86_64%] == [1] (
set "BUILD_PATH=bin\Mingw64\Release"
) else (
set "BUILD_PATH=bin\Mingw\Release"
)
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
- ccache -s
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
@ -139,3 +116,4 @@ test: off
on_finish:
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# vim: et ts=1

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1 +0,0 @@
/lsdlsrb2

View file

@ -1,3 +0,0 @@
/lsdlsrb2
/pnd
/*.mo

View file

@ -1 +0,0 @@
/lsdlsrb2

View file

@ -1 +0,0 @@
/lsdlsrb2

View file

@ -1,4 +0,0 @@
*.exe
*.mo
r_opengl.dll
*.bat

View file

@ -1,4 +0,0 @@
*.exe
*.mo
r_opengl.dll
*.bat

View file

@ -1,3 +0,0 @@
/srb2sdl.exe
/srb2win.exe
/r_opengl.dll

View file

@ -1,3 +0,0 @@
/srb2sdl.exe
/srb2win.exe
/r_opengl.dll

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
bin/VC/.gitignore vendored
View file

@ -1,2 +0,0 @@
/Release
/Debug

2
bin/VC9/.gitignore vendored
View file

@ -1,2 +0,0 @@
/Win32
/x64

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -78,7 +78,7 @@ NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
BINDIR := $(DIR)/bin/Linux/Release
BINDIR := $(DIR)/bin/
# FIXME pkg-config dir hacks
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile

2
dep/.gitignore vendored
View file

@ -1,2 +0,0 @@
#All folders
*.d

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/VC/.gitignore vendored
View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
dep/VC9/.gitignore vendored
View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -706,6 +706,39 @@ linedeftypes
prefix = "(80)";
}
96
{
title = "Apply Tag to Tagged Sectors";
prefix = "(96)";
flags1024text = "[10] Offsets are target tags";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
97
{
title = "Apply Tag to Front Sector";
prefix = "(97)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
98
{
title = "Apply Tag to Back Sector";
prefix = "(98)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
99
{
title = "Apply Tag to Front and Back Sectors";
prefix = "(99)";
flags8192text = "[13] Use front side offsets";
flags32768text = "[15] Use back side offsets";
}
540
{
title = "Floor Friction";
@ -1727,7 +1760,7 @@ linedeftypes
title = "Set Tagged Sector's Floor Height/Texture";
prefix = "(400)";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Keep floor flat";
flags64text = "[6] Don't change floor texture";
}
401
@ -1735,6 +1768,7 @@ linedeftypes
title = "Set Tagged Sector's Ceiling Height/Texture";
prefix = "(401)";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Don't change ceiling texture";
}
402
@ -1822,7 +1856,7 @@ linedeftypes
prefix = "(403)";
flags2text = "[1] Trigger linedef executor";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Change floor flat";
flags64text = "[6] Change floor texture";
}
404
@ -1831,7 +1865,7 @@ linedeftypes
prefix = "(404)";
flags2text = "[1] Trigger linedef executor";
flags8text = "[3] Set delay by backside sector";
flags64text = "[6] Change ceiling flat";
flags64text = "[6] Change ceiling texture";
}
405
@ -2628,6 +2662,84 @@ linedeftypes
slopeargs = 3;
}
723
{
title = "Copy Backside Floor Slope from Line Tag";
prefix = "(723)";
slope = "copy";
slopeargs = 4;
}
724
{
title = "Copy Backside Ceiling Slope from Line Tag";
prefix = "(724)";
slope = "copy";
slopeargs = 8;
}
725
{
title = "Copy Backside Floor and Ceiling Slope from Line Tag";
prefix = "(725)";
slope = "copy";
slopeargs = 12;
}
730
{
title = "Copy Frontside Floor Slope to Backside";
prefix = "(730)";
slope = "copy";
slopeargs = 1;
copyslopeargs = 1;
}
731
{
title = "Copy Frontside Ceiling Slope to Backside";
prefix = "(731)";
slope = "copy";
slopeargs = 2;
copyslopeargs = 4;
}
732
{
title = "Copy Frontside Floor and Ceiling Slope to Backside";
prefix = "(732)";
slope = "copy";
slopeargs = 3;
copyslopeargs = 5;
}
733
{
title = "Copy Backside Floor Slope to Frontside";
prefix = "(733)";
slope = "copy";
slopeargs = 1;
copyslopeargs = 2;
}
734
{
title = "Copy Backside Ceiling Slope to Frontside";
prefix = "(734)";
slope = "copy";
slopeargs = 2;
copyslopeargs = 8;
}
735
{
title = "Copy Backside Floor and Ceiling Slope to Frontside";
prefix = "(735)";
slope = "copy";
slopeargs = 3;
copyslopeargs = 10;
}
777
{
title = "Slope Floor by 3 Anchors";
@ -2656,7 +2768,7 @@ linedeftypes
flags2048text = "[11] No physics";
flags4096text = "[12] Dynamic";
}
799
{
title = "Set Tagged Dynamic Slope Vertex to Front Sector Height";

8
objs/.gitignore vendored
View file

@ -1,8 +0,0 @@
#All folders
SRB2.res
depend.dep
depend.ped
*.o
#VC9 folder only
/VC9/Win32
/VC9/x64

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/VC/.gitignore vendored
View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/VC9/.gitignore vendored
View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View file

@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing

BIN
srb2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View file

@ -1,269 +1,14 @@
# SRB2 Core
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32)
# Core sources
set(SRB2_CORE_SOURCES
am_map.c
command.c
comptime.c
console.c
d_clisrv.c
d_main.c
d_net.c
d_netcmd.c
d_netfil.c
dehacked.c
deh_soc.c
deh_lua.c
deh_tables.c
f_finale.c
f_wipe.c
filesrch.c
g_demo.c
g_game.c
g_input.c
g_splitscreen.c
font.c
hu_stuff.c
i_tcp.c
info.c
lzf.c
m_aatree.c
m_anigif.c
m_argv.c
m_bbox.c
m_cheat.c
m_cond.c
m_fixed.c
m_menu.c
m_misc.c
m_perfstats.c
m_queue.c
m_random.c
md5.c
mserv.c
http-mserv.c
s_sound.c
screen.c
sounds.c
st_stuff.c
#string.c
tables.c
v_video.c
w_wad.c
y_inter.c
z_zone.c
)
target_sourcefile(c)
target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in)
set(SRB2_CORE_HEADERS
am_map.h
byteptr.h
command.h
console.h
d_clisrv.h
d_event.h
d_main.h
d_net.h
d_netcmd.h
d_netfil.h
d_player.h
d_think.h
d_ticcmd.h
dehacked.h
deh_soc.h
deh_lua.h
deh_tables.h
doomdata.h
doomdef.h
doomstat.h
doomtype.h
endian.h
f_finale.h
fastcmp.h
filesrch.h
g_demo.h
g_game.h
g_input.h
g_state.h
font.h
hu_stuff.h
i_joy.h
i_net.h
i_sound.h
i_system.h
i_tcp.h
i_video.h
info.h
keys.h
lzf.h
m_aatree.h
m_anigif.h
m_argv.h
m_bbox.h
m_cheat.h
m_cond.h
m_dllist.h
m_fixed.h
m_menu.h
m_misc.h
m_perfstats.h
m_queue.h
m_random.h
m_swap.h
md5.h
mserv.h
p5prof.h
s_sound.h
screen.h
sounds.h
st_stuff.h
tables.h
v_video.h
w_wad.h
y_inter.h
z_zone.h
config.h.in
)
set(SRB2_CORE_RENDER_SOURCES
r_bsp.c
r_data.c
r_draw.c
r_main.c
r_plane.c
r_segs.c
r_skins.c
r_sky.c
r_splats.c
r_things.c
r_textures.c
r_patch.c
r_patchrotation.c
r_picformats.c
r_portal.c
r_bsp.h
r_data.h
r_defs.h
r_draw.h
r_local.h
r_main.h
r_plane.h
r_segs.h
r_skins.h
r_sky.h
r_splats.h
r_state.h
r_things.h
r_textures.h
r_patch.h
r_patchrotation.h
r_picformats.h
r_portal.h
)
set(SRB2_CORE_GAME_SOURCES
p_ceilng.c
p_enemy.c
p_floor.c
p_inter.c
p_lights.c
p_map.c
p_maputl.c
p_mobj.c
p_polyobj.c
p_saveg.c
p_setup.c
p_sight.c
p_slopes.c
p_spec.c
p_telept.c
p_tick.c
p_user.c
taglist.c
k_race.c
k_battle.c
k_bheap.c
k_collide.c
k_kart.c
k_pathfind.c
k_pwrlv.c
k_waypoint.c
k_color.c
k_bot.c
k_botitem.c
k_botsearch.c
k_respawn.c
k_grandprix.c
k_hud.c
p_local.h
p_maputl.h
p_mobj.h
p_polyobj.h
p_pspr.h
p_saveg.h
p_setup.h
p_slopes.h
p_spec.h
p_tick.h
taglist.h
k_race.h
k_battle.h
k_bheap.h
k_collide.h
k_kart.h
k_pathfind.h
k_pwrlv.h
k_waypoint.h
k_color.h
k_bot.h
k_respawn.h
k_grandprix.h
k_hud.h
)
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
endif()
prepend_sources(SRB2_CORE_SOURCES)
prepend_sources(SRB2_CORE_HEADERS)
prepend_sources(SRB2_CORE_RENDER_SOURCES)
prepend_sources(SRB2_CORE_GAME_SOURCES)
set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h)
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES})
source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES})
set(SRB2_ASM_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s
)
set(SRB2_NASM_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/tmap_mmx.nas
${CMAKE_CURRENT_SOURCE_DIR}/tmap.nas
)
if(MSVC)
list(APPEND SRB2_NASM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tmap_vc.nas)
endif()
set(SRB2_NASM_OBJECTS
${CMAKE_CURRENT_BINARY_DIR}/tmap_mmx.obj
${CMAKE_CURRENT_BINARY_DIR}/tmap.obj
)
if(MSVC)
list(APPEND SRB2_NASM_OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/tmap_vc.obj)
endif()
source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES})
set(SRB2_ASM_SOURCES vid_copy.s)
set(SRB2_NASM_SOURCES tmap_mmx.nas tmap.nas)
### Configuration
set(SRB2_CONFIG_HAVE_PNG ON CACHE BOOL
@ -296,6 +41,8 @@ set(SRB2_CONFIG_YASM OFF CACHE BOOL
"Use YASM in place of NASM.")
set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
"Use statically linked OpenGL. NOT RECOMMENDED.")
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
"Compile a development build of SRB2Kart.")
### use internal libraries?
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
@ -303,92 +50,7 @@ if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
"Use SRB2Kart's internal copies of required dependencies (SDL2, PNG, zlib, GME, OpenMPT, cURL).")
endif()
set(SRB2_LUA_SOURCES
lua_baselib.c
lua_blockmaplib.c
lua_consolelib.c
lua_hooklib.c
lua_hudlib.c
lua_infolib.c
lua_maplib.c
lua_taglib.c
lua_mathlib.c
lua_mobjlib.c
lua_playerlib.c
lua_polyobjlib.c
lua_script.c
lua_skinlib.c
lua_thinkerlib.c
)
set(SRB2_LUA_HEADERS
lua_hook.h
lua_hud.h
lua_libs.h
lua_script.h
)
prepend_sources(SRB2_LUA_SOURCES)
prepend_sources(SRB2_LUA_HEADERS)
source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS})
set(SRB2_BLUA_SOURCES
blua/lapi.c
blua/lauxlib.c
blua/lbaselib.c
blua/lcode.c
blua/ldebug.c
blua/ldo.c
blua/ldump.c
blua/lfunc.c
blua/lgc.c
blua/linit.c
blua/liolib.c
blua/llex.c
blua/lmem.c
blua/lobject.c
blua/lopcodes.c
blua/lparser.c
blua/lstate.c
blua/lstring.c
blua/lstrlib.c
blua/ltable.c
blua/ltablib.c
blua/ltm.c
blua/lundump.c
blua/lvm.c
blua/lzio.c
)
set(SRB2_BLUA_HEADERS
blua/lapi.h
blua/lauxlib.h
blua/lcode.h
blua/ldebug.h
blua/ldo.h
blua/lfunc.h
blua/lgc.h
blua/llex.h
blua/llimits.h
blua/lmem.h
blua/lobject.h
blua/lopcodes.h
blua/lparser.h
blua/lstate.h
blua/lstring.h
blua/ltable.h
blua/ltm.h
blua/lua.h
blua/luaconf.h
blua/lualib.h
blua/lundump.h
blua/lvm.h
blua/lzio.h
)
prepend_sources(SRB2_BLUA_SOURCES)
prepend_sources(SRB2_BLUA_HEADERS)
source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS})
add_subdirectory(blua)
if(${SRB2_CONFIG_HAVE_GME})
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
@ -404,7 +66,7 @@ if(${SRB2_CONFIG_HAVE_GME})
endif()
if(${GME_FOUND})
set(SRB2_HAVE_GME ON)
add_definitions(-DHAVE_LIBGME)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_GME)
else()
message(WARNING "You have specified that GME is available but it was not found.")
endif()
@ -424,7 +86,7 @@ if(${SRB2_CONFIG_HAVE_OPENMPT})
endif()
if(${OPENMPT_FOUND})
set(SRB2_HAVE_OPENMPT ON)
add_definitions(-DHAVE_OPENMPT)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_OPENMPT)
else()
message(WARNING "You have specified that OpenMPT is available but it was not found.")
endif()
@ -447,8 +109,7 @@ if(${SRB2_CONFIG_HAVE_MIXERX})
endif()
if(${MIXERX_FOUND})
set(SRB2_HAVE_MIXERX ON)
set(SRB2_SDL2_SOUNDIMPL mixer_sound.c)
add_definitions(-DHAVE_MIXERX)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXERX)
else()
message(WARNING "You have specified that SDL Mixer X is available but it was not found.")
endif()
@ -469,13 +130,9 @@ if(${SRB2_CONFIG_HAVE_DISCORDRPC})
endif()
if(${DISCORDRPC_FOUND})
set(SRB2_HAVE_DISCORDRPC ON)
add_definitions(-DHAVE_DISCORDRPC)
add_definitions(-DUSE_STUN)
set(SRB2_DISCORDRPC_SOURCES discord.c stun.c)
set(SRB2_DISCORDRPC_HEADERS discord.h stun.h)
prepend_sources(SRB2_DISCORDRPC_SOURCES)
prepend_sources(SRB2_DISCORDRPC_HEADERS)
source_group("Discord Rich Presence" FILES ${SRB2_DISCORDRPC_SOURCES} ${SRB2_DISCORDRPC_HEADERS})
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_DISCORDRPC)
target_compile_definitions(SRB2SDL2 PRIVATE -DUSE_STUN)
target_sources(SRB2SDL2 PRIVATE discord.c stun.c)
else()
message(WARNING "You have specified that Discord Rich Presence is available but it was not found.")
endif()
@ -495,7 +152,7 @@ if(${SRB2_CONFIG_HAVE_ZLIB})
endif()
if(${ZLIB_FOUND})
set(SRB2_HAVE_ZLIB ON)
add_definitions(-DHAVE_ZLIB)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB)
else()
message(WARNING "You have specified that ZLIB is available but it was not found. SRB2Kart may not compile correctly.")
endif()
@ -516,14 +173,9 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
endif()
if(${PNG_FOUND})
set(SRB2_HAVE_PNG ON)
add_definitions(-DHAVE_PNG)
add_definitions(-D_LARGEFILE64_SOURCE)
set(SRB2_PNG_SOURCES apng.c)
set(SRB2_PNG_HEADERS apng.h)
prepend_sources(SRB2_PNG_SOURCES)
prepend_sources(SRB2_PNG_HEADERS)
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}
${SRB2_PNG_SOURCES} ${SRB2_PNG_HEADERS})
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_PNG)
target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE)
target_sources(SRB2SDL2 PRIVATE apng.c)
else()
message(WARNING "You have specified that PNG is available but it was not found. SRB2Kart may not compile correctly.")
endif()
@ -544,7 +196,7 @@ if(${SRB2_CONFIG_HAVE_CURL})
endif()
if(${CURL_FOUND})
set(SRB2_HAVE_CURL ON)
add_definitions(-DHAVE_CURL)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_CURL)
else()
message(WARNING "You have specified that CURL is available but it was not found. SRB2Kart may not compile correctly.")
endif()
@ -552,59 +204,19 @@ endif()
if(${SRB2_CONFIG_HAVE_THREADS})
set(SRB2_HAVE_THREADS ON)
set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/i_threads.h)
add_definitions(-DHAVE_THREADS)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
endif()
if(${SRB2_CONFIG_HWRENDER})
add_definitions(-DHWRENDER)
set(SRB2_HWRENDER_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_bsp.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_draw.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2load.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md3load.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_model.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/u_list.c
)
set (SRB2_HWRENDER_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_data.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_drv.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2load.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md3load.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_model.h
${CMAKE_CURRENT_SOURCE_DIR}/hardware/u_list.h
)
set(SRB2_R_OPENGL_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.c
)
set(SRB2_R_OPENGL_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.h
)
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
add_subdirectory(hardware)
endif()
if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL})
find_package(OpenGL)
if(${OPENGL_FOUND})
add_definitions(-DHWRENDER)
add_definitions(-DSTATIC_OPENGL)
target_compile_definitions(SRB2SDL2 PRIVATE -DHWRENDER)
target_compile_definitions(SRB2SDL2 PRIVATE -DSTATIC_OPENGL)
else()
message(WARNING "You have specified static opengl but opengl was not found. Not setting HWRENDER.")
endif()
@ -625,12 +237,16 @@ if(${SRB2_CONFIG_USEASM})
set(CMAKE_ASM_NASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.")
enable_language(ASM_NASM)
endif()
set(SRB2_USEASM ON)
add_definitions(-DUSEASM)
target_compile_definitions(SRB2SDL2 PRIVATE -DUSEASM)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mfpmath=sse")
target_sources(SRB2SDL2 PRIVATE ${SRB2_ASM_SOURCES}
${SRB2_NASM_SOURCES})
else()
set(SRB2_USEASM OFF)
add_definitions(-DNONX86 -DNORUSEASM)
target_compile_definitions(SRB2SDL2 PRIVATE -DNONX86 -DNORUSEASM)
endif()
# Targets
@ -666,7 +282,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
endif()
add_definitions(-DCMAKECONFIG)
if(${SRB2_CONFIG_DEV_BUILD})
target_compile_definitions(SRB2SDL2 PRIVATE -DDEVELOP)
endif()
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-trigraphs)
target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG)
#add_library(SRB2Core STATIC
# ${SRB2_CORE_SOURCES}
@ -680,6 +302,7 @@ add_definitions(-DCMAKECONFIG)
#)
add_subdirectory(sdl)
add_subdirectory(objects)
if(${CMAKE_SYSTEM} MATCHES Windows)
add_subdirectory(win32)

File diff suppressed because it is too large Load diff

View file

@ -1,482 +0,0 @@
# vim: ft=make
#
# Makefile.cfg for SRB2
#
#
# GNU compiler & tools' flags
# and other things
#
# See the following variable don't start with 'GCC'. This is
# to avoid a false positive with the version detection...
SUPPORTED_GCC_VERSIONS:=\
101 102\
91 92 93\
81 82 83 84\
71 72 73 74 75\
61 62 63 64\
51 52 53 54 55\
40 41 42 43 44 45 46 47 48 49
LATEST_GCC_VERSION=10.2
# gcc or g++
ifdef PREFIX
CC=$(PREFIX)-gcc
CXX=$(PREFIX)-g++
OBJCOPY=$(PREFIX)-objcopy
OBJDUMP=$(PREFIX)-objdump
STRIP=$(PREFIX)-strip
WINDRES=$(PREFIX)-windres
else
OBJCOPY=objcopy
OBJDUMP=objdump
STRIP=strip
WINDRES=windres
endif
# because Apple screws with us on this
# need to get bintools from homebrew
ifdef MACOSX
CC=clang
CXX=clang
OBJCOPY=gobjcopy
OBJDUMP=gobjdump
endif
# Automatically set version flag, but not if one was manually set
# And don't bother if this is a clean only run
ifeq (,$(filter GCC% CLEANONLY,$(.VARIABLES)))
version:=$(shell $(CC) --version)
# check if this is in fact GCC
ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version))))
version:=$(shell $(CC) -dumpversion)
# Turn version into words of major, minor
v:=$(subst ., ,$(version))
# concat. major minor
v:=$(word 1,$(v))$(word 2,$(v))
# If this version is not in the list, default to the latest supported
ifeq (,$(filter $(v),$(SUPPORTED_GCC_VERSIONS)))
define line =
Your compiler version, GCC $(version), is not supported by the Makefile.
The Makefile will assume GCC $(LATEST_GCC_VERSION).))
endef
$(call print,$(line))
GCC$(subst .,,$(LATEST_GCC_VERSION))=1
else
$(call print,Detected GCC $(version) (GCC$(v)))
GCC$(v)=1
endif
endif
endif
ifdef GCC102
GCC101=1
endif
ifdef GCC101
GCC93=1
endif
ifdef GCC93
GCC92=1
endif
ifdef GCC92
GCC91=1
endif
ifdef GCC91
GCC84=1
endif
ifdef GCC84
GCC83=1
endif
ifdef GCC83
GCC82=1
endif
ifdef GCC82
GCC81=1
endif
ifdef GCC81
GCC75=1
endif
ifdef GCC75
GCC74=1
endif
ifdef GCC74
GCC73=1
endif
ifdef GCC73
GCC72=1
endif
ifdef GCC72
GCC71=1
endif
ifdef GCC71
GCC64=1
endif
ifdef GCC64
GCC63=1
endif
ifdef GCC63
GCC62=1
endif
ifdef GCC62
GCC61=1
endif
ifdef GCC61
GCC55=1
endif
ifdef GCC55
GCC54=1
endif
ifdef GCC54
GCC53=1
endif
ifdef GCC53
GCC52=1
endif
ifdef GCC52
GCC51=1
endif
ifdef GCC51
GCC49=1
endif
ifdef GCC49
GCC48=1
endif
ifdef GCC48
GCC47=1
endif
ifdef GCC47
GCC46=1
endif
ifdef GCC46
GCC45=1
endif
ifdef GCC45
GCC44=1
endif
ifdef GCC44
GCC43=1
endif
ifdef GCC43
GCC42=1
endif
ifdef GCC42
GCC41=1
endif
ifdef GCC41
GCC40=1
VCHELP=1
endif
ifdef GCC295
GCC29=1
endif
OLDWFLAGS:=$(WFLAGS)
# -W -Wno-unused
WFLAGS=-Wall
ifndef GCC295
#WFLAGS+=-Wno-packed
endif
ifndef RELAXWARNINGS
WFLAGS+=-W
#WFLAGS+=-Wno-sign-compare
ifndef GCC295
WFLAGS+=-Wno-div-by-zero
endif
#WFLAGS+=-Wsystem-headers
WFLAGS+=-Wfloat-equal
#WFLAGS+=-Wtraditional
ifdef VCHELP
WFLAGS+=-Wdeclaration-after-statement
WFLAGS+=-Wno-error=declaration-after-statement
endif
WFLAGS+=-Wundef
ifndef GCC295
WFLAGS+=-Wendif-labels
endif
ifdef GCC40
WFLAGS+=-std=gnu89
endif
ifdef GCC41
WFLAGS+=-Wshadow
endif
#WFLAGS+=-Wlarger-than-%len%
WFLAGS+=-Wpointer-arith -Wbad-function-cast
ifdef GCC45
#WFLAGS+=-Wc++-compat
endif
WFLAGS+=-Wcast-qual
ifndef NOCASTALIGNWARN
WFLAGS+=-Wcast-align
endif
WFLAGS+=-Wwrite-strings
ifndef ERRORMODE
#WFLAGS+=-Wconversion
ifdef GCC43
#WFLAGS+=-Wno-sign-conversion
endif
endif
WFLAGS+=-Wsign-compare
ifdef GCC91
WFLAGS+=-Wno-error=address-of-packed-member
endif
ifdef GCC45
WFLAGS+=-Wlogical-op
endif
WFLAGS+=-Waggregate-return
ifdef HAIKU
ifdef GCC41
#WFLAGS+=-Wno-attributes
endif
endif
#WFLAGS+=-Wstrict-prototypes
ifdef GCC40
WFLAGS+=-Wold-style-definition
endif
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
ifdef GCC40
WFLAGS+=-Wmissing-field-initializers
endif
WFLAGS+=-Wmissing-noreturn
#WFLAGS+=-Wmissing-format-attribute
#WFLAGS+=-Wno-multichar
#WFLAGS+=-Wno-deprecated-declarations
#WFLAGS+=-Wpacked
#WFLAGS+=-Wpadded
#WFLAGS+=-Wredundant-decls
WFLAGS+=-Wnested-externs
#WFLAGS+=-Wunreachable-code
WFLAGS+=-Winline
ifdef GCC43
WFLAGS+=-funit-at-a-time
WFLAGS+=-Wlogical-op
endif
ifndef GCC295
WFLAGS+=-Wdisabled-optimization
endif
endif
WFLAGS+=-Wformat-y2k
ifdef GCC71
WFLAGS+=-Wno-error=format-overflow=2
endif
WFLAGS+=-Wformat-security
ifndef GCC29
#WFLAGS+=-Winit-self
endif
ifdef GCC46
WFLAGS+=-Wno-suggest-attribute=noreturn
endif
ifdef NOLDWARNING
LDFLAGS+=-Wl,--as-needed
endif
ifdef ERRORMODE
WFLAGS+=-Werror
endif
WFLAGS+=$(OLDWFLAGS)
ifdef GCC43
#WFLAGS+=-Wno-error=clobbered
endif
ifdef GCC44
WFLAGS+=-Wno-error=array-bounds
endif
ifdef GCC46
WFLAGS+=-Wno-error=suggest-attribute=noreturn
endif
ifdef GCC54
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
endif
ifdef GCC61
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
endif
ifdef GCC71
WFLAGS+=-Wimplicit-fallthrough=4
WFLAGS+=-Wno-format-truncation
endif
ifdef GCC81
WFLAGS+=-Wno-error=format-overflow
WFLAGS+=-Wno-error=stringop-truncation
WFLAGS+=-Wno-error=stringop-overflow
WFLAGS+=-Wno-format-overflow
WFLAGS+=-Wno-stringop-truncation
WFLAGS+=-Wno-stringop-overflow
WFLAGS+=-Wno-error=multistatement-macros
endif
#indicate platform and what interface use with
ifndef LINUX
ifndef FREEBSD
ifndef CYGWIN32
ifndef MINGW
ifndef MINGW64
ifndef SDL
ifndef DUMMY
$(error No interface or platform flag defined)
endif
endif
endif
endif
endif
endif
endif
#determine the interface directory (where you put all i_*.c)
i_net_o=$(OBJDIR)/i_net.o
i_system_o=$(OBJDIR)/i_system.o
i_sound_o=$(OBJDIR)/i_sound.o
i_main_o=$(OBJDIR)/i_main.o
#set OBJDIR and BIN's starting place
OBJDIR=../objs
BIN=../bin
DEPDIR=../dep
#Nasm ASM and rm
ifdef YASM
NASM?=yasm
else
NASM?=nasm
endif
REMOVE?=rm -f
MKDIR?=mkdir -p
GZIP?=gzip
GZIP_OPTS?=-9 -f -n
GZIP_OPT2=$(GZIP_OPTS) --rsyncable
UPX?=upx
UPX_OPTS?=--best --preserve-build-id
ifndef ECHO
UPX_OPTS+=-q
endif
#Interface Setup
ifdef DUMMY
INTERFACE=dummy
OBJDIR:=$(OBJDIR)/dummy
BIN:=$(BIN)/dummy
DEPDIR:=$(DEPDIR)/dummy
else
ifdef LINUX
NASMFORMAT=elf -DLINUX
SDL=1
ifdef LINUX64
OBJDIR:=$(OBJDIR)/Linux64
BIN:=$(BIN)/Linux64
DEPDIR:=$(DEPDIR)/Linux64
else
OBJDIR:=$(OBJDIR)/Linux
BIN:=$(BIN)/Linux
DEPDIR:=$(DEPDIR)/Linux
endif
else
ifdef FREEBSD
INTERFACE=sdl
NASMFORMAT=elf -DLINUX
SDL=1
OBJDIR:=$(OBJDIR)/FreeBSD
BIN:=$(BIN)/FreeBSD
DEPDIR:=$(DEPDIR)/Linux
else
ifdef SOLARIS
INTERFACE=sdl
NASMFORMAT=elf -DLINUX
SDL=1
OBJDIR:=$(OBJDIR)/Solaris
BIN:=$(BIN)/Solaris
DEPDIR:=$(DEPDIR)/Solaris
else
ifdef CYGWIN32
INTERFACE=sdl
NASMFORMAT=win32
SDL=1
OBJDIR:=$(OBJDIR)/cygwin
BIN:=$(BIN)/Cygwin
DEPDIR:=$(DEPDIR)/Cygwin
else
ifdef MINGW64
#NASMFORMAT=win64
SDL=1
OBJDIR:=$(OBJDIR)/Mingw64
BIN:=$(BIN)/Mingw64
DEPDIR:=$(DEPDIR)/Mingw64
else
ifdef MINGW
NASMFORMAT=win32
SDL=1
OBJDIR:=$(OBJDIR)/Mingw
BIN:=$(BIN)/Mingw
DEPDIR:=$(DEPDIR)/Mingw
endif
endif
endif
endif
endif
endif
endif
ifdef ARCHNAME
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
BIN:=$(BIN)/$(ARCHNAME)
DEPDIR:=$(DEPDIR)/$(ARCHNAME)
endif
OBJDUMP_OPTS?=--wide --source --line-numbers
LD=$(CC)
ifdef SDL
INTERFACE=sdl
OBJDIR:=$(OBJDIR)/SDL
DEPDIR:=$(DEPDIR)/SDL
endif
ifndef DUMMY
ifdef DEBUGMODE
OBJDIR:=$(OBJDIR)/Debug
BIN:=$(BIN)/Debug
DEPDIR:=$(DEPDIR)/Debug
else
OBJDIR:=$(OBJDIR)/Release
BIN:=$(BIN)/Release
DEPDIR:=$(DEPDIR)/Release
endif
endif

107
src/Makefile.d/detect.mk Normal file
View file

@ -0,0 +1,107 @@
#
# Detect the host system and compiler version.
#
# Previously featured:\
PANDORA\
HAIKU\
DUMMY\
DJGPPDOS\
SOLARIS\
MACOSX\
all_systems:=\
LINUX64\
MINGW64\
MINGW\
UNIX\
LINUX\
FREEBSD\
SDL\
# check for user specified system
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
_m=Detected a Windows system,\
compiling for 32-bit MinGW SDL...)
$(call Print,$(_m))
# go for a 32-bit sdl mingw exe by default
MINGW:=1
else # if you on the *nix
system:=$(shell uname -s)
ifeq ($(system),Linux)
new_system:=LINUX
else
$(error \
Could not automatically detect your system,\
try specifying a system manually)
endif
ifeq ($(shell getconf LONG_BIT),64)
system+=64-bit
new_system:=$(new_system)64
endif
$(call Print,Detected $(system) ($(new_system))...)
$(new_system):=1
endif
endif
# This must have high to low order.
gcc_versions:=\
102 101\
93 92 91\
84 83 82 81\
75 74 73 72 71\
64 63 62 61\
55 54 53 52 51\
49 48 47 46 45 44 43 42 41 40
latest_gcc_version:=10.2
# Automatically set version flag, but not if one was
# manually set. And don't bother if this is a clean only
# run.
ifeq (,$(call Wildvar,GCC% destructive))
# can't use $(CC) --version here since that uses argv[0] to display the name
# also gcc outputs the information to stderr, so I had to do 2>&1
# this program really doesn't like identifying itself
version:=$(shell $(CC) -v 2>&1)
# check if this is in fact GCC
ifneq (,$(findstring gcc version,$(version)))
# in stark contrast to the name, gcc will give me a nicely formatted version number for free
version:=$(shell $(CC) -dumpfullversion)
# Turn version into words of major, minor
v:=$(subst ., ,$(version))
# concat. major minor
v:=$(word 1,$(v))$(word 2,$(v))
# If this version is not in the list,
# default to the latest supported
ifeq (,$(filter $(v),$(gcc_versions)))
define line =
Your compiler version, GCC $(version), \
is not supported by the Makefile.
The Makefile will assume GCC $(latest_gcc_version).
endef
$(call Print,$(line))
GCC$(subst .,,$(latest_gcc_version)):=1
else
$(call Print,Detected GCC $(version) (GCC$(v)))
GCC$(v):=1
endif
endif
endif

View file

@ -0,0 +1,84 @@
#
# Makefile for feature flags.
#
passthru_opts+=\
NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
MOBJCONSISTANCY PACKETDROP ZDEBUG\
HAVE_MINIUPNPC\
HAVE_DISCORDRPC TESTERS HOSTTESTERS DEVELOP
# build with debugging information
ifdef DEBUGMODE
MOBJCONSISTANCY=1
PACKETDROP=1
opts+=-DPARANOIA -DRANGECHECK
endif
ifndef NOHW
opts+=-DHWRENDER
sources+=$(call List,hardware/Sourcefile)
endif
ifndef NOASM
ifndef NONX86
sources+=tmap.nas tmap_mmx.nas
opts+=-DUSEASM
endif
endif
ifndef NOMD5
sources+=md5.c
endif
ifndef NOZLIB
ifndef NOPNG
ifdef PNG_PKGCONFIG
$(eval $(call Use_pkg_config,PNG_PKGCONFIG))
else
PNG_CONFIG?=$(call Prefix,libpng-config)
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
$(if $(PNG_STATIC),--static),,--ldflags))
endif
ifdef LINUX
opts+=-D_LARGFILE64_SOURCE
endif
opts+=-DHAVE_PNG
sources+=apng.c
endif
endif
ifndef NONET
ifndef NOCURL
CURLCONFIG?=curl-config
$(eval $(call Configure,CURL,$(CURLCONFIG)))
opts+=-DHAVE_CURL
endif
endif
ifdef HAVE_MINIUPNPC
libs+=-lminiupnpc
endif
ifdef HAVE_DISCORDRPC
$(eval $(call Propogate_flags,DISCORDRPC))
libs+=-ldiscord-rpc
opts+=-DUSE_STUN
sources+=discord.c stun.c
endif
# (Valgrind is a memory debugger.)
ifdef VALGRIND
VALGRIND_PKGCONFIG?=valgrind
$(eval $(call Use_pkg_config,VALGRIND))
ZDEBUG=1
opts+=-DHAVE_VALGRIND
endif
default_packages:=\
GME/libgme/LIBGME\
OPENMPT/libopenmpt/LIBOPENMPT\
ZLIB/zlib\
$(foreach p,$(default_packages),\
$(eval $(call Check_pkg_config,$(p))))

38
src/Makefile.d/nix.mk Normal file
View file

@ -0,0 +1,38 @@
#
# Makefile options for unices (linux, bsd...)
#
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
libs+=-lm
ifndef nasm_format
nasm_format:=elf -DLINUX
endif
ifndef NOHW
opts+=-I/usr/X11R6/include
libs+=-L/usr/X11R6/lib
endif
SDL=1
# In common usage.
ifdef LINUX
libs+=-lrt
passthru_opts+=NOTERMIOS
endif
# Tested by Steel, as of release 2.2.8.
ifdef FREEBSD
opts+=-I/usr/X11R6/include -DLINUX -DFREEBSD
libs+=-L/usr/X11R6/lib -lipx -lkvm
endif
# FIXME: UNTESTED
#ifdef SOLARIS
#NOIPX=1
#NOASM=1
#opts+=-I/usr/local/include -I/opt/sfw/include \
# -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP
#libs+=-L/opt/sfw/lib -lsocket -lnsl
#endif

16
src/Makefile.d/old.mk Normal file
View file

@ -0,0 +1,16 @@
#
# Warn about old build directories and offer to purge.
#
_old:=$(wildcard $(addprefix ../bin/,FreeBSD Linux \
Linux64 Mingw Mingw64 SDL dummy) ../objs ../dep)
ifdef _old
$(foreach v,$(_old),$(info $(abspath $(v))))
$(info )
$(info These directories are no longer\
required and should be removed.)
$(info You may remove them manually or\
by using 'make distclean')
$(error )
endif

View file

@ -0,0 +1,69 @@
#
# Platform specific options.
#
PKG_CONFIG?=pkg-config
ifdef WINDOWSHELL
rmrf=-2>NUL DEL /S /Q
mkdir=-2>NUL MD
cat=TYPE
else
rmrf=rm -rf
mkdir=mkdir -p
cat=cat
endif
ifdef LINUX64
LINUX=1
endif
ifdef MINGW64
MINGW=1
endif
ifdef LINUX
UNIX=1
ifdef LINUX64
NONX86=1
# LINUX64 does not imply X86_64=1;
# could mean ARM64 or Itanium
platform=linux/64
else
platform=linux
endif
else ifdef FREEBSD
UNIX=1
platform=freebsd
else ifdef SOLARIS # FIXME: UNTESTED
UNIX=1
platform=solaris
else ifdef CYGWIN32 # FIXME: UNTESTED
nasm_format=win32
platform=cygwin
else ifdef MINGW
ifdef MINGW64
NONX86=1
NOASM=1
# MINGW64 should not necessarily imply X86_64=1,
# but we make that assumption elsewhere
# Once that changes, remove this
X86_64=1
platform=mingw/64
else
platform=mingw
endif
include Makefile.d/win32.mk
endif
ifdef platform
makedir:=$(makedir)/$(platform)
endif
ifdef UNIX
include Makefile.d/nix.mk
endif
ifdef SDL
include Makefile.d/sdl.mk
endif

79
src/Makefile.d/sdl.mk Normal file
View file

@ -0,0 +1,79 @@
#
# Makefile options for SDL2 backend.
#
#
# SDL...., *looks at Alam*, THIS IS A MESS!
#
# ...a little bird flexes its muscles...
#
makedir:=$(makedir)/SDL
sources+=$(call List,sdl/Sourcefile)
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
# FIXME: UNTESTED
#ifdef PANDORA
#include sdl/SRB2Pandora/Makefile.cfg
#endif #ifdef PANDORA
# FIXME: UNTESTED
#ifdef CYGWIN32
#include sdl/MakeCYG.cfg
#endif #ifdef CYGWIN32
ifndef NOHW
sources+=sdl/ogl_sdl.c
endif
ifdef NOMIXER
sources+=sdl/sdl_sound.c
else
opts+=-DHAVE_MIXER
sources+=sdl/mixer_sound.c
ifdef HAVE_MIXERX
opts+=-DHAVE_MIXERX
libs+=-lSDL2_mixer_ext
else
libs+=-lSDL2_mixer
endif
endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=sdl/i_threads.c
endif
ifdef SDL_PKGCONFIG
$(eval $(call Use_pkg_config,SDL))
else
SDL_CONFIG?=$(call Prefix,sdl2-config)
SDL_CFLAGS?=$(shell $(SDL_CONFIG) --cflags)
SDL_LDFLAGS?=$(shell $(SDL_CONFIG) \
$(if $(STATIC),--static-libs,--libs))
$(eval $(call Propogate_flags,SDL))
endif
# use the x86 asm code
ifndef CYGWIN32
ifndef NOASM
USEASM=1
endif
endif
ifdef MINGW
ifndef NOSDLMAIN
SDLMAIN=1
endif
endif
ifdef SDLMAIN
opts+=-DSDLMAIN
else
ifdef MINGW
opts+=-Umain
libs+=-mconsole
endif
endif

93
src/Makefile.d/util.mk Normal file
View file

@ -0,0 +1,93 @@
#
# Utility macros for the rest of the Makefiles.
#
Ifnot=$(if $(1),$(3),$(2))
Ifndef=$(call Ifnot,$($(1)),$(2),$(3))
# Match and expand a list of variables by pattern.
Wildvar=$(foreach v,$(filter $(1),$(.VARIABLES)),$($(v)))
# Read a list of words from file and prepend each with the
# directory of the file.
_cat=$(shell $(cat) $(call Windows_path,$(1)))
List=$(addprefix $(dir $(1)),$(call _cat,$(1)))
# Convert path separators to backslash on Windows.
Windows_path=$(if $(WINDOWSHELL),$(subst /,\,$(1)),$(1))
define Propogate_flags =
opts+=$$($(1)_CFLAGS)
libs+=$$($(1)_LDFLAGS)
endef
# Set library's _CFLAGS and _LDFLAGS from some command.
# Automatically propogates the flags too.
# 1: variable prefix (e.g. CURL)
# 2: start of command (e.g. curl-config)
# --- optional ----
# 3: CFLAGS command arguments, default '--cflags'
# 4: LDFLAGS command arguments, default '--libs'
# 5: common command arguments at the end of command
define Configure =
$(1)_CFLAGS?=$$(shell $(2) $(or $(3),--cflags) $(5))
$(1)_LDFLAGS?=$$(shell $(2) $(or $(4),--libs) $(5))
$(call Propogate_flags,$(1))
endef
# Configure library with pkg-config. The package name is
# taken from a _PKGCONFIG variable.
# 1: variable prefix
#
# LIBGME_PKGCONFIG=libgme
# $(eval $(call Use_pkg_config,LIBGME))
define Use_pkg_config =
$(call Configure,$(1),$(PKG_CONFIG),,,$($(1)_PKGCONFIG))
endef
# Check disabling flag and configure package in one step
# according to delimited argument.
# (There is only one argument, but it split by slash.)
# 1/: short form library name (uppercase). This is
# prefixed with 'NO' and 'HAVE_'. E.g. NOGME, HAVE_GME
# /2: package name (e.g. libgme)
# /3: variable prefix
#
# The following example would check if NOGME is not
# defined before attempting to define LIBGME_CFLAGS and
# LIBGME_LDFLAGS as with Use_pkg_config.
#
# $(eval $(call Check_pkg_config,GME/libgme/LIBGME))
define Check_pkg_config =
_p:=$(subst /, ,$(1))
_v1:=$$(word 1,$$(_p))
_v2:=$$(or $$(word 3,$$(_p)),$$(_v1))
ifndef NO$$(_v1)
$$(_v2)_PKGCONFIG?=$$(word 2,$$(_p))
$$(eval $$(call Use_pkg_config,$$(_v2)))
opts+=-DHAVE_$$(_v1)
endif
endef
# $(call Prefix,gcc)
Prefix=$(if $(PREFIX),$(PREFIX)-)$(1)
Echo=
Echo_name=
Print=
ifndef SILENT
Echo=@echo $(1)
ifndef ECHO
ifndef NOECHOFILENAMES
Echo_name=$(call Echo,-- $(1) ...)
endif
endif
ifndef MAKE_RESTARTS
ifndef destructive
Print=$(info $(1))
endif
endif
endif
.=$(call Ifndef,ECHO,@)

183
src/Makefile.d/versions.mk Normal file
View file

@ -0,0 +1,183 @@
#
# Flags to put a sock in GCC!
#
# See the versions list in detect.mk
# This will define all version flags going backward.
# Yes, it's magic.
define _predecessor =
ifdef GCC$(firstword $(1))
GCC$(lastword $(1)):=1
endif
endef
_n:=$(words $(gcc_versions))
$(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
$(addprefix =,$(wordlist 2,$(_n),$(gcc_versions)))),\
$(and $(findstring =,$(v)),\
$(eval $(call _predecessor,$(subst =, ,$(v))))))
# -W -Wno-unused
WFLAGS:=-Wall -Wno-trigraphs
ifndef GCC295
#WFLAGS+=-Wno-packed
endif
ifndef RELAXWARNINGS
WFLAGS+=-W -pedantic
#WFLAGS+=-Wno-sign-compare
ifndef GCC295
WFLAGS+=-Wno-div-by-zero
endif
#WFLAGS+=-Wsystem-headers
WFLAGS+=-Wfloat-equal
#WFLAGS+=-Wtraditional
WFLAGS+=-Wundef
ifndef GCC295
WFLAGS+=-Wendif-labels
endif
ifdef GCC40
WFLAGS+=-std=gnu89
endif
ifdef GCC41
WFLAGS+=-Wshadow
endif
#WFLAGS+=-Wlarger-than-%len%
WFLAGS+=-Wpointer-arith -Wbad-function-cast
ifdef GCC45
#WFLAGS+=-Wc++-compat
WFLAGS+=-std=gnu99
endif
ifdef GCC47
WFLAGS+=-std=gnu11
endif
WFLAGS+=-Wcast-qual
ifndef NOCASTALIGNWARN
WFLAGS+=-Wcast-align
endif
WFLAGS+=-Wwrite-strings
ifndef ERRORMODE
#WFLAGS+=-Wconversion
ifdef GCC43
#WFLAGS+=-Wno-sign-conversion
endif
endif
WFLAGS+=-Wsign-compare
ifdef GCC91
WFLAGS+=-Wno-error=address-of-packed-member
endif
ifdef GCC45
WFLAGS+=-Wlogical-op
endif
WFLAGS+=-Waggregate-return
ifdef HAIKU
ifdef GCC41
#WFLAGS+=-Wno-attributes
endif
endif
#WFLAGS+=-Wstrict-prototypes
ifdef GCC40
WFLAGS+=-Wold-style-definition
endif
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
ifdef GCC40
WFLAGS+=-Wmissing-field-initializers
endif
WFLAGS+=-Wmissing-noreturn
#WFLAGS+=-Wmissing-format-attribute
#WFLAGS+=-Wno-multichar
#WFLAGS+=-Wno-deprecated-declarations
#WFLAGS+=-Wpacked
#WFLAGS+=-Wpadded
#WFLAGS+=-Wredundant-decls
WFLAGS+=-Wnested-externs
#WFLAGS+=-Wunreachable-code
WFLAGS+=-Winline
ifdef GCC43
WFLAGS+=-funit-at-a-time
WFLAGS+=-Wlogical-op
endif
ifndef GCC295
WFLAGS+=-Wdisabled-optimization
endif
endif
WFLAGS+=-Wformat-y2k
ifdef GCC71
WFLAGS+=-Wno-error=format-overflow=2
endif
WFLAGS+=-Wformat-security
ifndef GCC29
#WFLAGS+=-Winit-self
endif
ifdef GCC46
WFLAGS+=-Wno-suggest-attribute=noreturn
endif
ifdef NOLDWARNING
LDFLAGS+=-Wl,--as-needed
endif
ifdef ERRORMODE
WFLAGS+=-Werror
endif
ifdef GCC43
#WFLAGS+=-Wno-error=clobbered
endif
ifdef GCC44
WFLAGS+=-Wno-error=array-bounds
endif
ifdef GCC46
WFLAGS+=-Wno-error=suggest-attribute=noreturn
endif
ifdef GCC54
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
endif
ifdef GCC61
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
endif
ifdef GCC71
WFLAGS+=-Wimplicit-fallthrough=4
WFLAGS+=-Wno-format-truncation
endif
ifdef GCC81
WFLAGS+=-Wno-error=format-overflow
WFLAGS+=-Wno-error=stringop-truncation
WFLAGS+=-Wno-error=stringop-overflow
WFLAGS+=-Wno-format-overflow
WFLAGS+=-Wno-stringop-truncation
WFLAGS+=-Wno-stringop-overflow
WFLAGS+=-Wno-error=multistatement-macros
endif
ifdef NONX86
ifdef X86_64 # yeah that SEEMS contradictory
opts+=-march=nocona
endif
else
ifndef GCC29
opts+=-msse3 -mfpmath=sse
else
opts+=-mpentium
endif
endif
ifdef DEBUGMODE
ifdef GCC48
opts+=-Og
else
opts+=-O0
endif
endif
ifdef VALGRIND
ifdef GCC46
WFLAGS+=-Wno-error=unused-but-set-variable
WFLAGS+=-Wno-unused-but-set-variable
endif
endif
# Lua
ifdef GCC43
ifndef GCC44
WFLAGS+=-Wno-logical-op
endif
endif

122
src/Makefile.d/win32.mk Normal file
View file

@ -0,0 +1,122 @@
#
# Mingw, if you don't know, that's Win32/Win64
#
ifndef MINGW64
EXENAME?=ringracers.exe
else
EXENAME?=ringracers64.exe
endif
# disable dynamicbase if under msys2
ifdef MSYSTEM
libs+=-Wl,--disable-dynamicbase
endif
sources+=win32/Srb2win.rc
opts+=-DSTDC_HEADERS
libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
nasm_format:=win32
SDL=1
ifndef NOHW
opts+=-DUSE_WGL_SWAP
endif
ifdef MINGW64
libs+=-lws2_32
else
ifdef NO_IPV6
libs+=-lwsock32
else
libs+=-lws2_32
endif
endif
ifndef MINGW64
opts+=-I../libs/drmingw/include
libs+=-L../libs/drmingw/lib/win32 -lmgwhelp -lexchndl
endif
ifndef MINGW64
libs+=-Wl,--large-address-aware
endif
ifndef NONET
ifndef MINGW64 # miniupnc is broken with MINGW64
opts+=-I../libs -DSTATIC_MINIUPNPC
libs+=-L../libs/miniupnpc/mingw$(32) -lws2_32 -liphlpapi
endif
endif
ifndef NO_DISCORDRPC
HAVE_DISCORDRPC=1
endif
ifndef MINGW64
32=32
x86=x86
i686=i686
else
32=64
x86=x86_64
i686=x86_64
endif
mingw:=$(i686)-w64-mingw32
define _set =
$(1)_CFLAGS?=$($(1)_opts)
$(1)_LDFLAGS?=$($(1)_libs)
endef
lib:=../libs/gme
LIBGME_opts:=-I$(lib)/include
LIBGME_libs:=-L$(lib)/win$(32) -lgme
$(eval $(call _set,LIBGME))
lib:=../libs/libopenmpt
LIBOPENMPT_opts:=-I$(lib)/inc
LIBOPENMPT_libs:=-L$(lib)/lib/$(x86)/mingw -lopenmpt
$(eval $(call _set,LIBOPENMPT))
ifndef NOMIXERX
HAVE_MIXERX=1
lib:=../libs/SDLMixerX/$(mingw)
else
lib:=../libs/SDL2_mixer/$(mingw)
endif
mixer_opts:=-I$(lib)/include/SDL2
mixer_libs:=-L$(lib)/lib
lib:=../libs/SDL2/$(mingw)
SDL_opts:=-I$(lib)/include/SDL2\
$(mixer_opts) -Dmain=SDL_main
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
-lmingw32 -lSDL2main -lSDL2 -mwindows
$(eval $(call _set,SDL))
lib:=../libs/zlib
ZLIB_opts:=-I$(lib)
ZLIB_libs:=-L$(lib)/win32 -lz$(32)
$(eval $(call _set,ZLIB))
ifndef PNG_CONFIG
lib:=../libs/libpng-src
PNG_opts:=-I$(lib)
PNG_libs:=-L$(lib)/projects -lpng$(32)
$(eval $(call _set,PNG))
endif
lib:=../libs/curl
CURL_opts:=-I$(lib)/include
CURL_libs:=-L$(lib)/lib$(32) -lcurl
$(eval $(call _set,CURL))
lib:=../libs/discord-rpc/win$(32)-dynamic
DISCORDRPC_opts:=-I$(lib)/include
DISCORDRPC_libs:=-L$(lib)/lib
$(eval $(call _set,DISCORDRPC))

121
src/Sourcefile Normal file
View file

@ -0,0 +1,121 @@
string.c
d_main.c
d_clisrv.c
d_net.c
d_netfil.c
d_netcmd.c
dehacked.c
deh_soc.c
deh_lua.c
deh_tables.c
z_zone.c
f_finale.c
f_wipe.c
g_demo.c
g_game.c
g_input.c
g_splitscreen.c
am_map.c
command.c
console.c
font.c
hu_stuff.c
i_time.c
y_inter.c
st_stuff.c
m_aatree.c
m_anigif.c
m_argv.c
m_bbox.c
m_cheat.c
m_cond.c
m_easing.c
m_fixed.c
m_menu.c
m_misc.c
m_perfstats.c
m_random.c
m_queue.c
info.c
p_ceilng.c
p_enemy.c
p_floor.c
p_inter.c
p_lights.c
p_map.c
p_maputl.c
p_mobj.c
p_polyobj.c
p_saveg.c
p_setup.c
p_sight.c
p_spec.c
p_telept.c
p_tick.c
p_user.c
p_slopes.c
tables.c
r_bsp.c
r_data.c
r_draw.c
r_fps.c
r_main.c
r_plane.c
r_segs.c
r_skins.c
r_sky.c
r_splats.c
r_things.c
r_textures.c
r_patch.c
r_patchrotation.c
r_picformats.c
r_portal.c
screen.c
taglist.c
v_video.c
s_sound.c
sounds.c
w_wad.c
filesrch.c
mserv.c
http-mserv.c
i_tcp.c
lzf.c
vid_copy.s
lua_script.c
lua_baselib.c
lua_mathlib.c
lua_hooklib.c
lua_consolelib.c
lua_infolib.c
lua_mobjlib.c
lua_playerlib.c
lua_skinlib.c
lua_thinkerlib.c
lua_maplib.c
lua_taglib.c
lua_polyobjlib.c
lua_blockmaplib.c
lua_hudlib.c
lua_hudlib_drawlist.c
k_kart.c
k_respawn.c
k_collide.c
k_color.c
k_race.c
k_battle.c
k_pwrlv.c
k_waypoint.c
k_pathfind.c
k_bheap.c
k_bot.c
k_botitem.c
k_botsearch.c
k_grandprix.c
k_boss.c
k_hud.c
k_terrain.c
k_brightmap.c
k_director.c
k_follower.c

View file

@ -82,13 +82,17 @@ INT64 current_time_in_ps() {
return (t.tv_sec * (INT64)1000000) + t.tv_usec;
}
tic_t I_GetTime(void)
void I_Sleep(UINT32 ms){}
precise_t I_GetPreciseTime(void)
{
INT64 since_start = current_time_in_ps() - start_time;
return (since_start*TICRATE)/1000000;
return 0;
}
void I_Sleep(void){}
UINT64 I_GetPrecisePrecision(void)
{
return 1000000;
}
void I_GetEvent(void){}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2020, James R.
Copyright 2019-2022, James R.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@ -116,7 +116,7 @@ apng_default_flush (png_structp pngp)
if (!( pngp ))
return;
fflush((png_FILE_p)png_get_io_ptr);
fflush((png_FILE_p)png_get_io_ptr(pngp));
}
#endif/* PNG_STDIO_SUPPORTED */
#endif/* PNG_WRITE_FLUSH_SUPPORTED */

1
src/blua/CMakeLists.txt Normal file
View file

@ -0,0 +1 @@
target_sourcefile(c)

View file

@ -1,53 +0,0 @@
ifdef UNIXCOMMON
LUA_CFLAGS+=-DLUA_USE_POSIX
endif
ifdef LINUX
LUA_CFLAGS+=-DLUA_USE_POSIX
endif
ifdef GCC43
ifndef GCC44
WFLAGS+=-Wno-logical-op
endif
endif
OBJS:=$(OBJS) \
$(OBJDIR)/lapi.o \
$(OBJDIR)/lbaselib.o \
$(OBJDIR)/ldo.o \
$(OBJDIR)/lfunc.o \
$(OBJDIR)/linit.o \
$(OBJDIR)/liolib.o \
$(OBJDIR)/llex.o \
$(OBJDIR)/lmem.o \
$(OBJDIR)/lobject.o \
$(OBJDIR)/lstate.o \
$(OBJDIR)/lstrlib.o \
$(OBJDIR)/ltablib.o \
$(OBJDIR)/lundump.o \
$(OBJDIR)/lzio.o \
$(OBJDIR)/lauxlib.o \
$(OBJDIR)/lcode.o \
$(OBJDIR)/ldebug.o \
$(OBJDIR)/ldump.o \
$(OBJDIR)/lgc.o \
$(OBJDIR)/lopcodes.o \
$(OBJDIR)/lparser.o \
$(OBJDIR)/lstring.o \
$(OBJDIR)/ltable.o \
$(OBJDIR)/ltm.o \
$(OBJDIR)/lvm.o \
$(OBJDIR)/lua_script.o \
$(OBJDIR)/lua_baselib.o \
$(OBJDIR)/lua_mathlib.o \
$(OBJDIR)/lua_hooklib.o \
$(OBJDIR)/lua_consolelib.o \
$(OBJDIR)/lua_infolib.o \
$(OBJDIR)/lua_mobjlib.o \
$(OBJDIR)/lua_playerlib.o \
$(OBJDIR)/lua_skinlib.o \
$(OBJDIR)/lua_thinkerlib.o \
$(OBJDIR)/lua_maplib.o \
$(OBJDIR)/lua_taglib.o \
$(OBJDIR)/lua_polyobjlib.o \
$(OBJDIR)/lua_blockmaplib.o \
$(OBJDIR)/lua_hudlib.o

25
src/blua/Sourcefile Normal file
View file

@ -0,0 +1,25 @@
lapi.c
lbaselib.c
ldo.c
lfunc.c
linit.c
liolib.c
llex.c
lmem.c
lobject.c
lstate.c
lstrlib.c
ltablib.c
lundump.c
lzio.c
lauxlib.c
lcode.c
ldebug.c
ldump.c
lgc.c
lopcodes.c
lparser.c
lstring.c
ltable.c
ltm.c
lvm.c

View file

@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D)
static void DumpString(const TString* s, DumpState* D)
{
if (s==NULL || getstr(s)==NULL)
if (s==NULL)
{
size_t size=0;
DumpVar(size,D);

View file

@ -43,8 +43,8 @@
#define WRITEANGLE(p,b) do { angle_t *p_tmp = (angle_t *)p; *p_tmp = (angle_t)(b); p_tmp++; p = (void *)p_tmp; } while (0)
#endif
#ifdef __GNUC__
#ifdef DEALIGNED
// what is this?
#if defined (__GNUC__) && defined (DEALIGNED)
#define READUINT8(p) ({ UINT8 *p_tmp = (void *)p; UINT8 b; memcpy(&b, p, sizeof( UINT8)); p_tmp++; p = (void *)p_tmp; b; })
#define READSINT8(p) ({ SINT8 *p_tmp = (void *)p; SINT8 b; memcpy(&b, p, sizeof( SINT8)); p_tmp++; p = (void *)p_tmp; b; })
#define READINT16(p) ({ INT16 *p_tmp = (void *)p; INT16 b; memcpy(&b, p, sizeof( INT16)); p_tmp++; p = (void *)p_tmp; b; })
@ -55,26 +55,15 @@
#define READFIXED(p) ({ fixed_t *p_tmp = (void *)p; fixed_t b; memcpy(&b, p, sizeof(fixed_t)); p_tmp++; p = (void *)p_tmp; b; })
#define READANGLE(p) ({ angle_t *p_tmp = (void *)p; angle_t b; memcpy(&b, p, sizeof(angle_t)); p_tmp++; p = (void *)p_tmp; b; })
#else
#define READUINT8(p) ({ UINT8 *p_tmp = ( UINT8 *)p; UINT8 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READSINT8(p) ({ SINT8 *p_tmp = ( SINT8 *)p; SINT8 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READINT16(p) ({ INT16 *p_tmp = ( INT16 *)p; INT16 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READUINT16(p) ({ UINT16 *p_tmp = ( UINT16 *)p; UINT16 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READINT32(p) ({ INT32 *p_tmp = ( INT32 *)p; INT32 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READUINT32(p) ({ UINT32 *p_tmp = ( UINT32 *)p; UINT32 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READCHAR(p) ({ char *p_tmp = ( char *)p; char b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READFIXED(p) ({ fixed_t *p_tmp = (fixed_t *)p; fixed_t b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READANGLE(p) ({ angle_t *p_tmp = (angle_t *)p; angle_t b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#endif
#else
#define READUINT8(p) *(( UINT8 *)p)++
#define READSINT8(p) *(( SINT8 *)p)++
#define READINT16(p) *(( INT16 *)p)++
#define READUINT16(p) *(( UINT16 *)p)++
#define READINT32(p) *(( INT32 *)p)++
#define READUINT32(p) *(( UINT32 *)p)++
#define READCHAR(p) *(( char *)p)++
#define READFIXED(p) *((fixed_t *)p)++
#define READANGLE(p) *((angle_t *)p)++
#define READUINT8(p) ((UINT8*)(p = (void*)&((UINT8*)p)[1]))[-1]
#define READSINT8(p) ((SINT8*)(p = (void*)&((SINT8*)p)[1]))[-1]
#define READINT16(p) ((INT16*)(p = (void*)&((INT16*)p)[1]))[-1]
#define READUINT16(p) ((UINT16*)(p = (void*)&((UINT16*)p)[1]))[-1]
#define READINT32(p) ((INT32*)(p = (void*)&((INT32*)p)[1]))[-1]
#define READUINT32(p) ((UINT32*)(p = (void*)&((UINT32*)p)[1]))[-1]
#define READCHAR(p) ((char*)(p = (void*)&((char*)p)[1]))[-1]
#define READFIXED(p) ((fixed_t*)(p = (void*)&((fixed_t*)p)[1]))[-1]
#define READANGLE(p) ((angle_t*)(p = (void*)&((angle_t*)p)[1]))[-1]
#endif
#else //SRB2_BIG_ENDIAN
@ -137,15 +126,15 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
return (ucp[3] << 24) | (ucp[2] << 16) | (ucp[1] << 8) | ucp[0];
}
#define READUINT8(p) ({ UINT8 *p_tmp = ( UINT8 *)p; UINT8 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READSINT8(p) ({ SINT8 *p_tmp = ( SINT8 *)p; SINT8 b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READINT16(p) ({ INT16 *p_tmp = ( INT16 *)p; INT16 b = readshort(p); p_tmp++; p = (void *)p_tmp; b; })
#define READUINT16(p) ({ UINT16 *p_tmp = ( UINT16 *)p; UINT16 b = readushort(p); p_tmp++; p = (void *)p_tmp; b; })
#define READINT32(p) ({ INT32 *p_tmp = ( INT32 *)p; INT32 b = readlong(p); p_tmp++; p = (void *)p_tmp; b; })
#define READUINT32(p) ({ UINT32 *p_tmp = ( UINT32 *)p; UINT32 b = readulong(p); p_tmp++; p = (void *)p_tmp; b; })
#define READCHAR(p) ({ char *p_tmp = ( char *)p; char b = *p_tmp; p_tmp++; p = (void *)p_tmp; b; })
#define READFIXED(p) ({ fixed_t *p_tmp = (fixed_t *)p; fixed_t b = readlong(p); p_tmp++; p = (void *)p_tmp; b; })
#define READANGLE(p) ({ angle_t *p_tmp = (angle_t *)p; angle_t b = readulong(p); p_tmp++; p = (void *)p_tmp; b; })
#define READUINT8(p) ((UINT8*)(p = (void*)&((UINT8*)p)[1]))[-1]
#define READSINT8(p) ((SINT8*)(p = (void*)&((SINT8*)p)[1]))[-1]
#define READINT16(p) readshort(&((INT16*)(p = (void*)&((INT16*)p)[1]))[-1])
#define READUINT16(p) readushort(&((UINT16*)(p = (void*)&((UINT16*)p)[1]))[-1])
#define READINT32(p) readlong(&((INT32*)(p = (void*)&((INT32*)p)[1]))[-1])
#define READUINT32(p) readulong(&((UINT32*)(p = (void*)&((UINT32*)p)[1]))
#define READCHAR(p) ((char*)(p = (void*)&((char*)p)[1]))[-1]
#define READFIXED(p) readlong(&((fixed_t*)(p = (void*)&((fixed_t*)p)[1]))[-1])
#define READANGLE(p) readulong(&((angle_t*)(p = (void*)&((angle_t*)p)[1]))[-1])
#endif //SRB2_BIG_ENDIAN
#undef DEALIGNED
@ -156,20 +145,6 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
#define SKIPSTRING(p) while (READCHAR(p) != '\0')
#define READSTRINGN(p,s,n) ({ size_t tmp_i = 0; for (; tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';})
#define READSTRING(p,s) ({ size_t tmp_i = 0; for (; (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';})
#define READMEM(p,s,n) ({ memcpy(s, p, n); p += n; })
#if 0 // old names
#define WRITEBYTE(p,b) WRITEUINT8(p,b)
#define WRITESHORT(p,b) WRITEINT16(p,b)
#define WRITEUSHORT(p,b) WRITEUINT16(p,b)
#define WRITELONG(p,b) WRITEINT32(p,b)
#define WRITEULONG(p,b) WRITEUINT32(p,b)
#define READBYTE(p) READUINT8(p)
#define READSHORT(p) READINT16(p)
#define READUSHORT(p) READUINT16(p)
#define READLONG(p) READINT32(p)
#define READULONG(p) READUINT32(p)
#endif
#define READSTRINGN(p,s,n) do { size_t tmp_i = 0; for (; tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';} while (0)
#define READSTRING(p,s) do { size_t tmp_i = 0; for (; (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';} while (0)
#define READMEM(p,s,n) do { memcpy(s, p, n); p += n; } while (0)

View file

@ -1385,6 +1385,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
if (var->revert.allocated)
{
Z_Free(var->revert.v.string);
var->revert.allocated = false; // the below value is not allocated in zone memory, don't try to free it!
}
var->revert.v.const_munge = var->PossibleValue[i].strvalue;
@ -1392,6 +1393,10 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
return;
}
// free the old value string
Z_Free(var->zstring);
var->zstring = NULL;
var->value = var->PossibleValue[i].value;
var->string = var->PossibleValue[i].strvalue;
goto finish;
@ -1453,13 +1458,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
found:
if (client && execversion_enabled)
{
if (var->revert.allocated)
{
Z_Free(var->revert.v.string);
}
var->revert.v.const_munge = var->PossibleValue[i].strvalue;
return;
}
@ -1474,6 +1473,7 @@ found:
if (var->revert.allocated)
{
Z_Free(var->revert.v.string);
// Z_StrDup creates a new zone memory block, so we can keep the allocated flag on
}
var->revert.v.string = Z_StrDup(valstr);
@ -1528,7 +1528,7 @@ finish:
}
var->flags |= CV_MODIFIED;
// raise 'on change' code
LUA_CVarChanged(var->name); // let consolelib know what cvar this is.
LUA_CVarChanged(var); // let consolelib know what cvar this is.
if (var->flags & CV_CALL && !stealth)
var->func();
@ -1621,7 +1621,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
// not from server or remote admin, must be hacked/buggy client
CONS_Alert(CONS_WARNING, M_GetText("Illegal netvar command received from %s\n"), player_names[playernum]);
if (server)
SendKick(playernum, KICK_MSG_CON_FAIL | KICK_MSG_KEEP_BODY);
SendKick(playernum, KICK_MSG_CON_FAIL);
return;
}
@ -1679,6 +1679,8 @@ void CV_SaveVars(UINT8 **p, boolean in_demo)
static void CV_LoadVars(UINT8 **p,
consvar_t *(*got)(UINT8 **p, char **ret_value, boolean *ret_stealth))
{
const boolean store = (client || demo.playback);
consvar_t *cvar;
UINT16 count;
@ -1692,7 +1694,7 @@ static void CV_LoadVars(UINT8 **p,
{
if (cvar->flags & CV_NETVAR)
{
if (client && cvar->revert.v.string == NULL)
if (store && cvar->revert.v.string == NULL)
{
cvar->revert.v.const_munge = cvar->string;
cvar->revert.allocated = ( cvar->zstring != NULL );
@ -1728,6 +1730,7 @@ void CV_RevertNetVars(void)
if (cvar->revert.allocated)
{
Z_Free(cvar->revert.v.string);
cvar->revert.allocated = false; // no value being held now
}
cvar->revert.v.string = NULL;
@ -2007,9 +2010,10 @@ void CV_AddValue(consvar_t *var, INT32 increment)
{
increment = 0;
currentindice = max;
break; // The value we definitely want, stop here.
}
else if (var->PossibleValue[max].value == var->value)
currentindice = max;
currentindice = max; // The value we maybe want.
}
if (increment)

View file

@ -1576,7 +1576,7 @@ void CONS_Error(const char *msg)
#if defined(RPC_NO_WINDOWS_H) && defined(_WINDOWS)
if (!graphics_started)
{
MessageBoxA(vid.WndParent, msg, "SRB2Kart Warning", MB_OK);
MessageBoxA(vid.WndParent, msg, "Dr. Robotnik's Ring Racers Warning", MB_OK);
return;
}
#endif
@ -1717,7 +1717,10 @@ static void CON_DrawHudlines(void)
{
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
p++;
c++;
}
if (c >= con_width)
break;
if (*p < HU_FONTSTART)
;//charwidth = 4 * con_scalefactor;
else
@ -1838,7 +1841,10 @@ static void CON_DrawConsole(void)
{
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
p++;
c++;
}
if (c >= con_width)
break;
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
}
}
@ -1916,6 +1922,8 @@ void CON_SetLoadingProgress(con_loadprogress_t newStep)
if (con_startup_loadprogress < LOADED_ISTARTUPGRAPHICS) // rendering not possible?
return;
CON_DrawLoadBar(); // here we display the console text
I_OsPolling();
I_UpdateNoBlit();
I_FinishUpdate(); // page flip or blit buffer
}

File diff suppressed because it is too large Load diff

View file

@ -37,8 +37,18 @@ applications may follow different packet versions.
// be transmitted.
// Networking and tick handling related.
#define TICQUEUE 512 // more than enough for most timeouts....
#define BACKUPTICS 512 // more than enough for most timeouts....
#define CLIENTBACKUPTICS 32
#define MAXTEXTCMD 256
// No. of tics your controls can be delayed by.
// TODO: Instead of storing a ton of extra cmds for gentlemens' delay,
// keep them in a linked-list, with timestamps to discard everything that's older than already sent.
// That will support any amount of lag, and be less wasteful for clients who don't use it.
// This just works as a quick implementation.
#define MAXGENTLEMENDELAY TICRATE
//
// Packet structure
//
@ -203,7 +213,7 @@ typedef struct
UINT8 iteration;
UINT32 position;
UINT16 size;
UINT8 data[0]; // Size is variable using hardware_MAXPACKETLENGTH
UINT8 data[]; // Size is variable using hardware_MAXPACKETLENGTH
} ATTRPACK filetx_pak;
typedef struct
@ -217,7 +227,7 @@ typedef struct
UINT8 fileid;
UINT8 iteration;
UINT8 numsegments;
fileacksegment_t segments[0];
fileacksegment_t segments[];
} ATTRPACK fileack_pak;
#ifdef _MSC_VER
@ -275,11 +285,8 @@ typedef struct
UINT8 actnum;
UINT8 iszone;
char httpsource[MAX_MIRROR_LENGTH]; // HTTP URL to download from, always defined for compatibility
UINT8 fileneeded[MAXFILENEEDED]; // is filled with writexxx (byteptr.h)
// Anything beyond this point won't be read by the normal SRB2 Master Server display.
// The MS uses a simple unpack, so the size of the packet above shouldn't be changed, either.
// As long as those two conditions are met, we can add as much information as we want to the end.
INT16 avgpwrlv; // Kart avg power level
UINT8 fileneeded[MAXFILENEEDED]; // is filled with writexxx (byteptr.h)
} ATTRPACK serverinfo_pak;
typedef struct
@ -351,8 +358,8 @@ typedef struct
servertics_pak serverpak; // 132495 bytes (more around 360, no?)
serverconfig_pak servercfg; // 773 bytes
UINT8 textcmd[MAXTEXTCMD+1]; // 66049 bytes (wut??? 64k??? More like 257 bytes...)
filetx_pak filetxpak; // 139 bytes
fileack_pak fileack;
char filetxpak[sizeof (filetx_pak)];// 139 bytes
char fileack[sizeof (fileack_pak)];
UINT8 filereceived;
clientconfig_pak clientcfg; // 136 bytes
UINT8 md5sum[16];
@ -403,7 +410,6 @@ extern consvar_t cv_playbackspeed;
#define KICK_MSG_PING_HIGH 6
#define KICK_MSG_CUSTOM_KICK 7
#define KICK_MSG_CUSTOM_BAN 8
#define KICK_MSG_KEEP_BODY 0x80
typedef enum
{
@ -439,7 +445,7 @@ extern tic_t servermaxping;
extern boolean server_lagless;
extern consvar_t cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_joindelay, cv_rejointimeout;
extern consvar_t cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_joindelay;
extern consvar_t cv_resynchattempts, cv_blamecfail;
extern consvar_t cv_maxsend, cv_noticedownload, cv_downloadspeed;
@ -482,7 +488,7 @@ boolean Playing(void);
void D_QuitNetGame(void);
//? How many ticks to run?
void TryRunTics(tic_t realtic);
boolean TryRunTics(tic_t realtic);
// extra data for lmps
// these functions scare me. they contain magic.
@ -514,12 +520,12 @@ extern UINT8 hu_redownloadinggamestate;
extern UINT8 adminpassmd5[16];
extern boolean adminpasswordset;
extern boolean hu_stopped;
//
// SRB2Kart
//
extern boolean hu_stopped;
typedef struct rewind_s {
UINT8 savebuffer[(768*1024)];
tic_t leveltime;

View file

@ -40,6 +40,7 @@
#include "hu_stuff.h"
#include "i_sound.h"
#include "i_system.h"
#include "i_time.h"
#include "i_threads.h"
#include "i_video.h"
#include "m_argv.h"
@ -63,6 +64,7 @@
#include "deh_tables.h" // Dehacked list test
#include "m_cond.h" // condition initialization
#include "fastcmp.h"
#include "r_fps.h" // Frame interpolation/uncapped
#include "keys.h"
#include "filesrch.h" // refreshdirmenu
#include "g_input.h" // tutorial mode control scheming
@ -70,6 +72,7 @@
// SRB2Kart
#include "k_grandprix.h"
#include "k_boss.h"
#include "doomstat.h"
#ifdef CMAKECONFIG
@ -292,6 +295,8 @@ static void D_Display(void)
{
for (i = 0; i <= r_splitscreen; ++i)
{
R_SetViewContext(VIEWCONTEXT_PLAYER1 + i);
R_InterpolateViewRollAngle(rendertimefrac);
R_CheckViewMorph(i);
}
}
@ -451,6 +456,8 @@ static void D_Display(void)
{
if (!automapactive && !dedicated && cv_renderview.value)
{
R_ApplyLevelInterpolators(R_UsingFrameInterpolation() ? rendertimefrac : FRACUNIT);
viewwindowy = 0;
viewwindowx = 0;
@ -526,6 +533,7 @@ static void D_Display(void)
}
ps_rendercalltime = I_GetPreciseTime() - ps_rendercalltime;
R_RestoreLevelInterpolators();
}
if (lastdraw)
@ -615,16 +623,6 @@ static void D_Display(void)
{
F_WipeEndScreen();
// Funny.
if (WipeStageTitle && st_overlay)
{
lt_ticker--;
lt_lasttic = lt_ticker;
ST_preLevelTitleCardDrawer();
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
F_WipeStartScreen();
}
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN, "FADEMAP0", true, false);
}
@ -693,7 +691,12 @@ tic_t rendergametic;
void D_SRB2Loop(void)
{
tic_t oldentertics = 0, entertic = 0, realtics = 0, rendertimeout = INFTICS;
tic_t entertic = 0, oldentertics = 0, realtics = 0, rendertimeout = INFTICS;
double deltatics = 0.0;
double deltasecs = 0.0;
boolean interp = false;
boolean doDisplay = false;
if (dedicated)
server = true;
@ -705,6 +708,7 @@ void D_SRB2Loop(void)
I_DoStartupMouse();
#endif
I_UpdateTime(cv_timescale.value);
oldentertics = I_GetTime();
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
@ -746,6 +750,19 @@ void D_SRB2Loop(void)
for (;;)
{
// capbudget is the minimum precise_t duration of a single loop iteration
precise_t capbudget;
precise_t enterprecise = I_GetPreciseTime();
precise_t finishprecise = enterprecise;
{
// Casting the return value of a function is bad practice (apparently)
double budget = round((1.0 / R_GetFramerateCap()) * I_GetPrecisePrecision());
capbudget = (precise_t) budget;
}
I_UpdateTime(cv_timescale.value);
if (lastwipetic)
{
oldentertics = lastwipetic;
@ -759,53 +776,96 @@ void D_SRB2Loop(void)
refreshdirmenu = 0; // not sure where to put this, here as good as any?
if (demo.playback && gamestate == GS_LEVEL)
{
// Nicer place to put this.
realtics = realtics * cv_playbackspeed.value;
}
#ifdef DEBUGFILE
if (!realtics)
if (debugload)
debugload--;
#endif
if (!realtics && !singletics)
{
I_Sleep();
continue;
}
interp = R_UsingFrameInterpolation() && !dedicated;
doDisplay = false;
#ifdef HW3SOUND
HW3S_BeginFrameUpdate();
#endif
// don't skip more than 10 frames at a time
// (fadein / fadeout cause massive frame skip!)
if (realtics > 8)
realtics = 1;
// process tics (but maybe not if realtic == 0)
TryRunTics(realtics);
if (lastdraw || singletics || gametic > rendergametic)
if (realtics > 0 || singletics)
{
rendergametic = gametic;
rendertimeout = entertic+TICRATE/17;
// don't skip more than 10 frames at a time
// (fadein / fadeout cause massive frame skip!)
if (realtics > 8)
realtics = 1;
// Update display, next frame, with current state.
D_Display();
// process tics (but maybe not if realtic == 0)
TryRunTics(realtics);
if (moviemode)
M_SaveFrame();
if (takescreenshot) // Only take screenshots after drawing.
M_DoScreenShot();
if (lastdraw || singletics || gametic > rendergametic)
{
rendergametic = gametic;
rendertimeout = entertic + TICRATE/17;
doDisplay = true;
}
else if (rendertimeout < entertic) // in case the server hang or netsplit
{
// Lagless camera! Yay!
if (gamestate == GS_LEVEL && netgame)
{
// Evaluate the chase cam once for every local realtic
// This might actually be better suited inside G_Ticker or TryRunTics
for (tic_t chasecamtics = 0; chasecamtics < realtics; chasecamtics++)
{
P_RunChaseCameras();
}
R_UpdateViewInterpolation();
}
doDisplay = true;
}
renderisnewtic = true;
}
else if (rendertimeout < entertic) // in case the server hang or netsplit
else
{
renderisnewtic = false;
}
if (interp)
{
renderdeltatics = FLOAT_TO_FIXED(deltatics);
if (!(paused || P_AutoPause()) && !hu_stopped)
{
rendertimefrac = g_time.timefrac;
}
else
{
rendertimefrac = FRACUNIT;
}
}
else
{
renderdeltatics = realtics * FRACUNIT;
rendertimefrac = FRACUNIT;
}
if (interp || doDisplay)
{
D_Display();
if (moviemode)
M_SaveFrame();
if (takescreenshot) // Only take screenshots after drawing.
M_DoScreenShot();
}
// Only take screenshots after drawing.
if (moviemode)
M_SaveFrame();
if (takescreenshot)
M_DoScreenShot();
// consoleplayer -> displayplayers (hear sounds from viewpoint)
S_UpdateSounds(); // move positional sounds
S_UpdateClosedCaptions();
@ -822,6 +882,21 @@ void D_SRB2Loop(void)
Discord_RunCallbacks();
}
#endif
// Fully completed frame made.
finishprecise = I_GetPreciseTime();
if (!singletics)
{
INT64 elapsed = (INT64)(finishprecise - enterprecise);
if (elapsed > 0 && (INT64)capbudget > elapsed)
{
I_SleepDuration(capbudget - (finishprecise - enterprecise));
}
}
// Capture the time once more to get the real delta time.
finishprecise = I_GetPreciseTime();
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
deltatics = deltasecs * NEWTICRATE;
}
}
@ -897,6 +972,9 @@ void D_StartTitle(void)
// Reset GP
memset(&grandprixinfo, 0, sizeof(struct grandprixinfo));
// Reset boss info
K_ResetBossInfo();
// empty maptol so mario/etc sounds don't play in sound test when they shouldn't
maptol = 0;
@ -1049,22 +1127,36 @@ static void IdentifyVersion(void)
// if you change the ordering of this or add/remove a file, be sure to update the md5
// checking in D_SRB2Main
D_AddFile(startupiwads, va(pandf,srb2waddir,"gfx.pk3"));
D_AddFile(startupiwads, va(pandf,srb2waddir,"textures.pk3"));
D_AddFile(startupiwads, va(pandf,srb2waddir,"chars.pk3"));
D_AddFile(startupiwads, va(pandf,srb2waddir,"maps.pk3"));
#ifdef USE_PATCH_FILE
D_AddFile(startupiwads, va(pandf,srb2waddir,"patch.pk3"));
#endif
#if 0
// TODO: pk3 doesn't support music replacement IIRC
// music barely benefits from the compression anyway
// would be nice for the folders, though
D_AddFile(startupiwads, va(pandf,srb2waddir,"sounds.pk3"));
D_AddFile(startupiwads, va(pandf,srb2waddir,"music.pk3"));
#if defined (TESTERS) || defined (HOSTTESTERS)
////
#define TEXTURESNAME "MISC_TEXTURES.pk3"
#define MAPSNAME "MISC_MAPS.pk3"
#define PATCHNAME "MISC_PATCH.pk3"
#define MUSICNAME "MISC_MUSIC.PK3"
////
#else
////
#define TEXTURESNAME "textures.pk3"
#define MAPSNAME "maps.pk3"
#define PATCHNAME "patch.pk3"
#define MUSICNAME "music.pk3"
////
#endif
////
#if !defined (TESTERS) && !defined (HOSTTESTERS)
D_AddFile(startupiwads, va(pandf,srb2waddir,"gfx.pk3"));
#endif
D_AddFile(startupiwads, va(pandf,srb2waddir,TEXTURESNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,"chars.pk3"));
D_AddFile(startupiwads, va(pandf,srb2waddir,MAPSNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,"followers.pk3"));
#ifdef USE_PATCH_FILE
D_AddFile(startupiwads, va(pandf,srb2waddir,PATCHNAME));
#endif
////
#undef TEXTURESNAME
#undef MAPSNAME
#undef PATCHNAME
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
@ -1078,12 +1170,12 @@ static void IdentifyVersion(void)
I_Error("File "str" has been modified with non-music/sound lumps"); \
}
MUSICTEST("sounds.wad")
MUSICTEST("music.pk3")
MUSICTEST("sounds.pk3")
MUSICTEST(MUSICNAME)
#undef MUSICNAME
#undef MUSICTEST
#endif
#endif
}
@ -1116,8 +1208,8 @@ void D_SRB2Main(void)
// Print GPL notice for our console users (Linux)
CONS_Printf(
"\n\nSonic Robo Blast 2 Kart\n"
"Copyright (C) 1998-2020 by Kart Krew & STJr\n\n"
"\n\nDr. Robotnik's Ring Racers\n"
"Copyright (C) 1998-2022 by Kart Krew & STJr\n\n"
"This program comes with ABSOLUTELY NO WARRANTY.\n\n"
"This is free software, and you are welcome to redistribute it\n"
"and/or modify it under the terms of the GNU General Public License\n"
@ -1249,6 +1341,7 @@ void D_SRB2Main(void)
// Do this up here so that WADs loaded through the command line can use ExecCfg
COM_Init();
#ifndef TESTERS
// add any files specified on the command line with -file wadfile
// to the wad list
if (!((M_GetUrlProtocolArg() || M_CheckParm("-connect")) && !M_CheckParm("-server")))
@ -1266,6 +1359,7 @@ void D_SRB2Main(void)
}
}
}
#endif
// get map from parms
@ -1285,8 +1379,8 @@ void D_SRB2Main(void)
//---------------------------------------------------- READY TIME
// we need to check for dedicated before initialization of some subsystems
CONS_Printf("I_StartupTimer()...\n");
I_StartupTimer();
CONS_Printf("I_InitializeTime()...\n");
I_InitializeTime();
CON_SetLoadingProgress(LOADED_ISTARTUPTIMER);
// Make backups of some SOCcable tables.
@ -1311,14 +1405,18 @@ void D_SRB2Main(void)
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_PK3); // textures.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_PK3); // chars.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_PK3); // maps.pk3 -- 4 - If you touch this, make sure to touch up the majormods stuff below.
mainwads++; W_VerifyFileMd5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3
#ifdef USE_PATCH_FILE
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3
#endif
#else
#if !defined (TESTERS) && !defined (HOSTTESTERS)
mainwads++; // gfx.pk3
#endif
mainwads++; // textures.pk3
mainwads++; // chars.pk3
mainwads++; // maps.pk3
mainwads++; // followers.pk3
#ifdef USE_PATCH_FILE
mainwads++; // patch.pk3
#endif
@ -1328,7 +1426,7 @@ void D_SRB2Main(void)
//
// search for maps
//
for (wadnum = 4; wadnum < 6; wadnum++) // fucking arbitrary numbers
for (wadnum = 0; wadnum <= mainwads; wadnum++)
{
lumpinfo = wadfiles[wadnum]->lumpinfo;
for (i = 0; i < wadfiles[wadnum]->numlumps; i++, lumpinfo++)
@ -1411,6 +1509,9 @@ void D_SRB2Main(void)
// setup loading screen
SCR_Startup();
// Do this in background; lots of number crunching
R_InitTranslucencyTables();
CON_SetLoadingProgress(LOADED_ISTARTUPGRAPHICS);
CONS_Printf("HU_Init()...\n");
@ -1659,6 +1760,8 @@ void D_SRB2Main(void)
// as having been modified for the first game.
M_PushSpecialParameters(); // push all "+" parameter at the command buffer
COM_BufExecute(); // ensure the command buffer gets executed before the map starts (+skin)
strncpy(connectedservername, cv_servername.string, MAXSERVERNAME);
if (M_CheckParm("-gametype") && M_IsNextParm())

View file

@ -18,6 +18,7 @@
#include "doomdef.h"
#include "g_game.h"
#include "i_time.h"
#include "i_net.h"
#include "i_system.h"
#include "m_argv.h"
@ -618,7 +619,10 @@ void Net_WaitAllAckReceived(UINT32 timeout)
while (timeout > I_GetTime() && !Net_AllAcksReceived())
{
while (tictac == I_GetTime())
I_Sleep();
{
I_Sleep(cv_sleep.value);
I_UpdateTime(cv_timescale.value);
}
tictac = I_GetTime();
HGetPacket();
Net_AckTicker();
@ -913,11 +917,13 @@ static void DebugPrintpacket(const char *header)
case PT_SERVERREFUSE:
fprintf(debugfile, " reason %s\n", netbuffer->u.serverrefuse.reason);
break;
case PT_FILEFRAGMENT:
case PT_FILEFRAGMENT: {
filetx_pak *pak = (void*)&netbuffer->u.filetxpak;
fprintf(debugfile, " fileid %d datasize %d position %u\n",
netbuffer->u.filetxpak.fileid, (UINT16)SHORT(netbuffer->u.filetxpak.size),
(UINT32)LONG(netbuffer->u.filetxpak.position));
pak->fileid, (UINT16)SHORT(pak->size),
(UINT32)LONG(pak->position));
break;
}
case PT_REQUESTFILE:
default: // write as a raw packet
fprintfstringnewline((char *)netbuffer->u.textcmd,
@ -1165,8 +1171,9 @@ boolean HGetPacket(void)
if (netbuffer->checksum != NetbufferChecksum())
{
DEBFILE("Bad packet checksum\n");
//Net_CloseConnection(nodejustjoined ? (doomcom->remotenode | FORCECLOSE) : doomcom->remotenode);
Net_CloseConnection(doomcom->remotenode);
// Do not disconnect or anything, just ignore the packet.
// Bad checksums with UDP tend to happen very scarcely
// so they are not normally an issue.
continue;
}

File diff suppressed because it is too large Load diff

View file

@ -61,9 +61,9 @@ extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_ingamecap, cv_res
// SRB2kart items
extern consvar_t cv_superring, cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine, cv_landmine;
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine, cv_landmine, cv_droptarget;
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink;
extern consvar_t cv_thundershield, cv_bubbleshield, cv_flameshield;
extern consvar_t cv_lightningshield, cv_bubbleshield, cv_flameshield;
extern consvar_t cv_hyudoro, cv_pogospring, cv_kitchensink;
extern consvar_t cv_dualsneaker, cv_triplesneaker, cv_triplebanana, cv_decabanana;
@ -86,8 +86,8 @@ extern consvar_t cv_kartusepwrlv;
extern consvar_t cv_votetime;
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartallowgiveitem, cv_kartdebugshrink, cv_kartdebugdistribution, cv_kartdebughuddrop;
extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes, cv_kartdebugcolorize;
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartallowgiveitem, cv_kartdebugdistribution, cv_kartdebughuddrop;
extern consvar_t cv_kartdebugcheckpoint, cv_kartdebugnodes, cv_kartdebugcolorize, cv_kartdebugdirector;
extern consvar_t cv_kartdebugwaypoints, cv_kartdebugbotpredict;
extern consvar_t cv_itemfinder;
@ -113,6 +113,8 @@ extern consvar_t cv_sleep;
extern consvar_t cv_perfstats;
extern consvar_t cv_director;
extern char timedemo_name[256];
extern boolean timedemo_csv;
extern char timedemo_csv_id[256];
@ -207,7 +209,8 @@ void D_RegisterServerCommands(void);
void D_RegisterClientCommands(void);
void CleanupPlayerName(INT32 playernum, const char *newname);
boolean EnsurePlayerNameIsGood(char *name, INT32 playernum);
void D_SendPlayerConfig(void);
void SendWeaponPref(UINT8 n);
void D_SendPlayerConfig(UINT8 n);
void Command_ExitGame_f(void);
void Command_Retry_f(void);
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore

View file

@ -43,6 +43,7 @@
#include "doomstat.h"
#include "d_main.h"
#include "g_game.h"
#include "i_time.h"
#include "i_net.h"
#include "i_system.h"
#include "m_argv.h"
@ -161,10 +162,16 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
char wadfilename[MAX_WADPATH] = "";
UINT8 filestatus;
for (i = mainwads+1; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
#ifdef DEVELOP
i = 0;
#else
i = mainwads + 1;
#endif
for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
{
// If it has only music/sound lumps, don't put it in the list
if (!wadfiles[i]->important)
if (i > mainwads && !wadfiles[i]->important)
continue;
if (firstfile)
@ -188,6 +195,12 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
filestatus = 1; // Importance - not really used any more, holds 1 by default for backwards compat with MS
/* don't send mainwads!! */
#ifdef DEVELOP
if (i <= mainwads)
filestatus += (2 << 4);
#endif
// Store in the upper four bits
if (!cv_downloading.value)
filestatus += (2 << 4); // Won't send
@ -276,11 +289,16 @@ boolean CL_CheckDownloadable(void)
}
// Downloading locally disabled
#ifndef TESTERS
if (!dlstatus && M_CheckParm("-nodownload"))
dlstatus = 3;
if (!dlstatus)
return true;
#else
if (!dlstatus)
dlstatus = 3;
#endif
// not downloadable, put reason in console
CONS_Alert(CONS_NOTICE, M_GetText("You need additional files to connect to this server:\n"));
@ -448,7 +466,12 @@ INT32 CL_CheckFiles(void)
if (modifiedgame)
{
CONS_Debug(DBG_NETPLAY, "game is modified; only doing basic checks\n");
for (i = 0, j = mainwads+1; i < fileneedednum || j < numwadfiles;)
#ifdef DEVELOP
j = 0;
#else
j = mainwads + 1;
#endif
for (i = 0; i < fileneedednum || j < numwadfiles;)
{
if (j < numwadfiles && !wadfiles[j]->important)
{
@ -489,7 +512,12 @@ INT32 CL_CheckFiles(void)
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
// Check in already loaded files
for (j = mainwads+1; wadfiles[j]; j++)
#ifdef DEVELOP
j = 0;
#else
j = mainwads + 1;
#endif
for (; wadfiles[j]; j++)
{
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
if (!stricmp(wadfilename, fileneeded[i].filename) &&
@ -1103,7 +1131,7 @@ void FileSendTicker(void)
}
// Build a packet containing a file fragment
p = &netbuffer->u.filetxpak;
p = (void*)&netbuffer->u.filetxpak;
fragmentsize = FILEFRAGMENTSIZE;
if (f->size-transfer[i].position < fragmentsize)
fragmentsize = f->size-transfer[i].position;
@ -1145,7 +1173,7 @@ void FileSendTicker(void)
void PT_FileAck(void)
{
fileack_pak *packet = &netbuffer->u.fileack;
fileack_pak *packet = (void*)&netbuffer->u.fileack;
INT32 node = doomcom->remotenode;
filetran_t *trans = &transfer[node];
INT32 i, j;
@ -1289,26 +1317,29 @@ void FileReceiveTicker(void)
void PT_FileFragment(void)
{
INT32 filenum = netbuffer->u.filetxpak.fileid;
filetx_pak *pak = (void*)&netbuffer->u.filetxpak;
INT32 filenum = pak->fileid;
fileneeded_t *file = &fileneeded[filenum];
UINT32 fragmentpos = LONG(netbuffer->u.filetxpak.position);
UINT16 fragmentsize = SHORT(netbuffer->u.filetxpak.size);
UINT32 fragmentpos = LONG(pak->position);
UINT16 fragmentsize = SHORT(pak->size);
UINT16 boundedfragmentsize = doomcom->datalength - BASEPACKETSIZE - sizeof(netbuffer->u.filetxpak);
char *filename;
filename = va("%s", file->filename);
nameonly(filename);
if (!(strcmp(filename, "main.kart")
&& strcmp(filename, "gfx.pk3")
&& strcmp(filename, "textures.pk3")
&& strcmp(filename, "chars.pk3")
&& strcmp(filename, "maps.wad")
&& strcmp(filename, "patch.pk3")
&& strcmp(filename, "sounds.wad")
&& strcmp(filename, "music.wad")
))
if (!strcmp(filename, "main.kart")
|| !strcmp(filename, "gfx.pk3")
|| !strcmp(filename, "textures.pk3")
|| !strcmp(filename, "chars.pk3")
|| !strcmp(filename, "maps.pk3")
|| !strcmp(filename, "patch.pk3")
|| !strcmp(filename, "sounds.pk3")
|| !strcmp(filename, "music.pk3")
)
{
I_Error("Tried to download \"%s\"", filename);
}
filename = file->filename;
@ -1358,7 +1389,7 @@ void PT_FileFragment(void)
CONS_Printf("\r%s...\n",filename);
file->currentsize = 0;
file->totalsize = LONG(netbuffer->u.filetxpak.filesize);
file->totalsize = LONG(pak->filesize);
file->ackresendposition = UINT32_MAX; // Only used for resumed downloads
file->receivedfragments = calloc(file->totalsize / fragmentsize + 1, sizeof(*file->receivedfragments));
@ -1374,7 +1405,7 @@ void PT_FileFragment(void)
if (fragmentpos >= file->totalsize)
I_Error("Invalid file fragment\n");
file->iteration = max(file->iteration, netbuffer->u.filetxpak.iteration);
file->iteration = max(file->iteration, pak->iteration);
if (!file->receivedfragments[fragmentpos / fragmentsize]) // Not received yet
{
@ -1382,7 +1413,7 @@ void PT_FileFragment(void)
// We can receive packets in the wrong order, anyway all OSes support gaped files
fseek(file->file, fragmentpos, SEEK_SET);
if (fragmentsize && fwrite(netbuffer->u.filetxpak.data, boundedfragmentsize, 1, file->file) != 1)
if (fragmentsize && fwrite(pak->data, boundedfragmentsize, 1, file->file) != 1)
I_Error("Can't write to %s: %s\n",filename, M_FileError(file->file));
file->currentsize += boundedfragmentsize;
@ -1695,7 +1726,7 @@ void CURLPrepareFile(const char* url, int dfilenum)
// Only allow HTTP and HTTPS
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("Ring Racers/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
// Authenticate if the user so wishes
login = CURLGetLogin(url, NULL);

View file

@ -58,54 +58,51 @@ typedef enum
//
typedef enum
{
PF_FAULT = 1,
// Cheats
PF_GODMODE = 1<<4,
PF_NOCLIP = 1<<5,
PF_INVIS = 1<<6,
// True if button down last tic.
PF_ATTACKDOWN = 1<<7,
PF_ACCELDOWN = 1<<8,
PF_BRAKEDOWN = 1<<9,
PF_WPNDOWN = 1<<10, // unused
PF_ATTACKDOWN = 1,
PF_ACCELDOWN = 1<<1,
PF_BRAKEDOWN = 1<<2,
PF_LOOKDOWN = 1<<3,
// Unmoving states
PF_STASIS = 1<<11, // Player is not allowed to move
PF_JUMPSTASIS = 1<<12, // unused
// Accessibility and cheats
PF_KICKSTARTACCEL = 1<<4, // Is accelerate in kickstart mode?
PF_GODMODE = 1<<5,
PF_NOCLIP = 1<<6,
// SRB2Kart: Spectator that wants to join
PF_WANTSTOJOIN = 1<<13,
PF_WANTSTOJOIN = 1<<7, // Spectator that wants to join
// Character action status
PF_STARTJUMP = 1<<14, // unused
PF_JUMPED = 1<<15, // unused
PF_NOJUMPDAMAGE = 1<<16, // unused
PF_SPINNING = 1<<17, // unused
PF_STARTDASH = 1<<18, // unused
PF_THOKKED = 1<<19, // unused
PF_SHIELDABILITY = 1<<20, // unused
PF_GLIDING = 1<<21, // unused
PF_BOUNCING = 1<<22, // unused
PF_STASIS = 1<<8, // Player is not allowed to move
PF_FAULT = 1<<9, // F A U L T
PF_ELIMINATED = 1<<10, // Battle-style elimination, no extra penalty
PF_NOCONTEST = 1<<11, // Did not finish (last place explosion)
PF_LOSTLIFE = 1<<12, // Do not lose life more than once
// Sliding (usually in water) like Labyrinth/Oil Ocean
PF_SLIDING = 1<<23,
PF_RINGLOCK = 1<<13, // Prevent picking up rings while SPB is locked on
// NiGHTS stuff
PF_TRANSFERTOCLOSEST = 1<<24, // unused
PF_DRILLING = 1<<25, // unused
// The following four flags are mutually exclusive, although they can also all be off at the same time. If we ever run out of pflags, eventually turn them into a seperate five(+) mode UINT8..?
PF_USERINGS = 1<<14, // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
PF_ITEMOUT = 1<<15, // Are you holding an item out?
PF_EGGMANOUT = 1<<16, // Eggman mark held, separate from PF_ITEMOUT so it doesn't stop you from getting items
PF_HOLDREADY = 1<<17, // Hold button-style item is ready to activate
// Gametype-specific stuff
PF_GAMETYPEOVER = 1<<26, // Race time over
PF_TAGIT = 1<<27, // unused
PF_DRIFTINPUT = 1<<18, // Drifting!
PF_GETSPARKS = 1<<19, // Can get sparks
PF_DRIFTEND = 1<<20, // Drift has ended, used to adjust character angle after drift
PF_BRAKEDRIFT = 1<<21, // Helper for brake-drift spark spawning
/*** misc ***/
PF_KICKSTARTACCEL = 1<<28, // Accessibility feature - is accelerate in kickstart mode?
PF_CANCARRY = 1<<29, // unused
PF_HITFINISHLINE = 1<<30, // Already hit the finish line this tic
PF_AIRFAILSAFE = 1<<22, // Whenever or not try the air boost
PF_TRICKDELAY = 1<<23, // Prevent tricks until control stick is neutral
// up to 1<<31 is free, but try to hit unused stuff first
PF_TUMBLELASTBOUNCE = 1<<24, // One more time for the funny
PF_TUMBLESOUND = 1<<25, // Don't play more than once
PF_HITFINISHLINE = 1<<26, // Already hit the finish line this tic
PF_WRONGWAY = 1<<27, // Moving the wrong way with respect to waypoints?
PF_SHRINKME = 1<<28, // "Shrink me" cheat preference
PF_SHRINKACTIVE = 1<<29, // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
// up to 1<<31 is free
} pflags_t;
typedef enum
@ -119,104 +116,13 @@ typedef enum
PA_HURT
} panim_t;
//
// All of the base srb2 shields are either a single constant,
// or use damagetype-protecting flags applied to a constant,
// or are the force shield (which does everything weirdly).
//
// Base flags by themselves aren't used so modders can make
// abstract, ability-less shields should they so choose.
//
typedef enum
{
SH_NONE = 0,
// Shield flags
SH_PROTECTFIRE = 0x400,
SH_PROTECTWATER = 0x800,
SH_PROTECTELECTRIC = 0x1000,
SH_PROTECTSPIKE = 0x2000, // cactus shield one day? thanks, subarashii
//SH_PROTECTNUKE = 0x4000, // intentionally no hardcoded defense against nukes
// Indivisible shields
SH_PITY = 1, // the world's most basic shield ever, given to players who suck at Match
SH_WHIRLWIND,
SH_ARMAGEDDON,
SH_PINK, // PITY IN PINK!
// Normal shields that use flags
SH_ATTRACT = SH_PITY|SH_PROTECTELECTRIC,
SH_ELEMENTAL = SH_PITY|SH_PROTECTFIRE|SH_PROTECTWATER,
// Sonic 3 shields
SH_FLAMEAURA = SH_PITY|SH_PROTECTFIRE,
SH_BUBBLEWRAP = SH_PITY|SH_PROTECTWATER,
SH_THUNDERCOIN = SH_WHIRLWIND|SH_PROTECTELECTRIC,
// The force shield uses the lower 8 bits to count how many extra hits are left.
SH_FORCE = 0x100,
SH_FORCEHP = 0xFF, // to be used as a bitmask only
// Mostly for use with Mario mode.
SH_FIREFLOWER = 0x200,
SH_STACK = SH_FIREFLOWER, // second-layer shields
SH_NOSTACK = ~SH_STACK
} shieldtype_t; // pw_shield
typedef enum
{
CR_NONE = 0,
// Specific level gimmicks.
CR_SLIDING,
CR_ZOOMTUBE,
} carrytype_t; // pw_carry
// Player powers. (don't edit this comment)
typedef enum
{
pw_invulnerability,
pw_sneakers,
pw_flashing,
pw_shield,
pw_carry,
pw_tailsfly, // tails flying
pw_underwater, // underwater timer
pw_spacetime, // In space, no one can hear you spin!
pw_extralife, // Extra Life timer
pw_pushing,
pw_justsprung,
pw_noautobrake,
pw_super, // Are you super?
pw_gravityboots, // gravity boots
// Weapon ammunition
pw_infinityring,
pw_automaticring,
pw_bouncering,
pw_scatterring,
pw_grenadering,
pw_explosionring,
pw_railring,
// Power Stones
pw_emeralds, // stored like global 'emeralds' variable
// NiGHTS powerups
pw_nights_superloop,
pw_nights_helper,
pw_nights_linkfreeze,
pw_nocontrol, //for linedef exec 427
pw_dye, // for dyes
pw_justlaunched, // Launched off a slope this tic (0=none, 1=standard launch, 2=half-pipe launch)
pw_ignorelatch, // Don't grab onto CR_GENERIC, add 32768 (powers[pw_ignorelatch] & 1<<15) to avoid ALL not-NiGHTS CR_ types
NUMPOWERS
} powertype_t;
} carrytype_t; // carry
/*
To use: #define FOREACH( name, number )
@ -239,13 +145,14 @@ Run this macro, then #undef FOREACH afterward
FOREACH (SPB, 11),\
FOREACH (GROW, 12),\
FOREACH (SHRINK, 13),\
FOREACH (THUNDERSHIELD, 14),\
FOREACH (LIGHTNINGSHIELD, 14),\
FOREACH (BUBBLESHIELD, 15),\
FOREACH (FLAMESHIELD, 16),\
FOREACH (HYUDORO, 17),\
FOREACH (POGOSPRING, 18),\
FOREACH (SUPERRING, 19),\
FOREACH (KITCHENSINK, 20)
FOREACH (KITCHENSINK, 20),\
FOREACH (DROPTARGET, 21)
typedef enum
{
@ -270,7 +177,7 @@ typedef enum
typedef enum
{
KSHIELD_NONE = 0,
KSHIELD_THUNDER = 1,
KSHIELD_LIGHTNING = 1,
KSHIELD_BUBBLE = 2,
KSHIELD_FLAME = 3,
NUMKARTSHIELDS
@ -295,115 +202,18 @@ typedef enum
#undef KSPIN_TYPE
} kartspinoutflags_t;
//{ SRB2kart - kartstuff
typedef enum
{
// TODO: Kill this giant array. Add them as actual player_t variables, or condense related timers into their own, smaller arrays.
// Basic gameplay things
k_position, // Used for Kart positions, mostly for deterministic stuff
k_oldposition, // Used for taunting when you pass someone
k_positiondelay, // Used for position number, so it can grow when passing/being passed
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
k_instashield, // Instashield no-damage animation timer
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
k_spinouttype, // Determines the mode of spinout/wipeout, see kartspinoutflags_t
k_drift, // Drifting Left or Right, plus a bigger counter = sharper turn
k_driftend, // Drift has ended, used to adjust character angle after drift
k_driftcharge, // Charge your drift so you can release a burst of speed
k_driftboost, // Boost you get from drifting
k_boostcharge, // Charge-up for boosting at the start of the race
k_startboost, // Boost you get from start of race or respawn drop dash
k_rings, // Number of held rings
k_pickuprings, // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
k_userings, // Have to be not holding the item button to change from using rings to using items (or vice versa), to prevent some weirdness with the button
k_ringdelay, // 3 tic delay between every ring usage
k_ringboost, // Ring boost timer
k_ringlock, // Prevent picking up rings while SPB is locked on
k_sparkleanim, // Angle offset for ring sparkle animation
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
k_spindash, // Spindash charge timer
k_spindashspeed, // Spindash release speed
k_spindashboost, // Spindash release boost timer
k_waterskip, // Water skipping counter
k_dashpadcooldown, // Separate the vanilla SA-style dash pads from using pw_flashing
k_numboosts, // Count of how many boosts are being stacked, for after image spawning
k_boostpower, // Base boost value, for offroad
k_speedboost, // Boost value smoothing for max speed
k_accelboost, // Boost value smoothing for acceleration
k_handleboost, // Boost value smoothing for handling
k_draftpower, // Drafting power (from 0 to FRACUNIT), doubles your top speed & acceleration at max
k_draftleeway, // Leniency timer before removing draft power
k_lastdraft, // Last player being drafted
k_boostangle, // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked
k_brakedrift, // Helper for brake-drift spark spawning
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
// Item held stuff
k_itemtype, // KITEM_ constant for item number
k_itemamount, // Amount of said item
k_itemheld, // Are you holding an item?
k_holdready, // Hold button-style item is ready to activate
// Some items use timers for their duration or effects
k_curshield, // 0 = no shield, 1 = thunder shield
k_hyudorotimer, // Duration of the Hyudoro offroad effect itself
k_stealingtimer, // You are stealing an item, this is your timer
k_stolentimer, // You are being stolen from, this is your timer
k_superring, // Spawn rings on top of you every tic!
k_sneakertimer, // Duration of a Sneaker Boost (from Sneakers or level boosters)
k_numsneakers, // Number of stacked sneaker effects
k_growshrinktimer, // > 0 = Big, < 0 = small
k_squishedtimer, // Squished frame timer
k_rocketsneakertimer, // Rocket Sneaker duration timer
k_invincibilitytimer, // Invincibility timer
k_bubblecool, // Bubble Shield use cooldown
k_bubbleblowup, // Bubble Shield usage blowup
k_flamedash, // Flame Shield dash power
k_flamemeter, // Flame Shield dash meter left
k_flamelength, // Flame Shield dash meter, number of segments
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
k_eggmanexplode, // Fake item recieved, explode in a few seconds
k_eggmanblame, // Fake item recieved, who set this fake
k_lastjawztarget, // Last person you target with jawz, for playing the target switch sfx
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
k_wipeoutslow, // Timer before you slowdown when getting wiped out
k_justbumped, // Prevent players from endlessly bumping into each other
k_comebacktimer, // Battle mode, how long before you become a bomb after death
k_sadtimer, // How long you've been sad
// Battle Mode vars
k_bumper, // Number of bumpers left
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a bumper
k_comebackmode, // 0 = bomb, 1 = item
k_wanted, // Timer for determining WANTED status, lowers when hitting people, prevents the game turning into Camp Lazlo
// v1.0.2+ vars
k_getsparks, // Disable drift sparks at low speed, JUST enough to give acceleration the actual headstart above speed
k_jawztargetdelay, // Delay for Jawz target switching, to make it less twitchy
k_spectatewait, // How long have you been waiting as a spectator
k_tiregrease, // Reduced friction timer after hitting a horizontal spring
k_springstars, // Spawn stars around a player when they hit a spring
k_springcolor, // Color of spring stars
k_killfield, // How long have you been in the kill field, stay in too long and lose a bumper
k_wrongway, // Display WRONG WAY on screen
NUMKARTSTUFF
} kartstufftype_t;
TRIP_NONE,
TRIP_PASSED,
TRIP_BLOCKED,
} tripwirestate_t;
typedef enum
{
// Unsynced, HUD or clientsided effects
// Item box
khud_itemblink, // Item flashing after roulette, prevents Hyudoro stealing AND serves as a mashing indicator
khud_itemblink, // Item flashing after roulette, serves as a mashing indicator
khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
// Rings
@ -433,33 +243,42 @@ typedef enum
khud_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
khud_yougotem, // "You Got Em" gfx when hitting someone as a karma player via a method that gets you back in the game instantly
// Tricks
khud_trickcool,
NUMKARTHUD
} karthudtype_t;
// QUICKLY GET RING TOTAL, INCLUDING RINGS CURRENTLY IN THE PICKUP ANIMATION
#define RINGTOTAL(p) (p->rings + p->kartstuff[k_pickuprings])
#define RINGTOTAL(p) (p->rings + p->pickuprings)
// CONSTANTS FOR TRICK PANELS
#define TRICKMOMZRAMP (30)
#define TRICKLAG (9)
#define TRICKDELAY (TICRATE/4)
#define TUMBLEBOUNCES 3
//}
// for kickstartaccel
#define ACCEL_KICKSTART 35
#define ACCEL_KICKSTART (TICRATE)
#define ITEMSCALE_NORMAL 0
#define ITEMSCALE_GROW 1
#define ITEMSCALE_SHRINK 2
// player_t struct for all respawn variables
typedef struct respawnvars_s
{
UINT8 state; // 0: not respawning, 1: heading towards respawn point, 2: about to drop
UINT8 state; // see RESPAWNST_ constants in k_respawn.h
waypoint_t *wp; // Waypoint that we're going towards, NULL if the position isn't linked to one
fixed_t pointx; // Respawn position coords to go towards
fixed_t pointy;
fixed_t pointz;
boolean flip; // Flip upside down or not
tic_t timer; // Time left on respawn animation once you're there
tic_t airtimer; // Time spent in the air before respawning
UINT32 distanceleft; // How far along the course to respawn you
tic_t dropdash; // Drop Dash charge timer
} respawnvars_t;
@ -471,12 +290,23 @@ typedef struct botvars_s
UINT8 diffincrease; // In GP: bot difficulty will increase this much next round
boolean rival; // If true, they're the GP rival
fixed_t rubberband; // Bot rubberband value
UINT16 controller; // Special bot controller linedef ID
tic_t itemdelay; // Delay before using item at all
tic_t itemconfirm; // When high enough, they will use their item
SINT8 turnconfirm; // Confirm turn direction
tic_t spindashconfirm; // When high enough, they will try spindashing
} botvars_t;
// player_t struct for all skybox variables
typedef struct {
mobj_t * viewpoint;
mobj_t * centerpoint;
} skybox_t;
// ========================================================================
// PLAYER STRUCTURE
// ========================================================================
@ -498,11 +328,14 @@ typedef struct player_s
// bounded/scaled total momentum.
fixed_t bob;
skybox_t skybox;
angle_t viewrollangle;
// camera tilt
// TODO: expose to lua
angle_t tilt;
INT16 steering;
angle_t angleturn;
// Mouse aiming, where the guy is looking at!
@ -511,37 +344,8 @@ typedef struct player_s
// fun thing for player sprite
angle_t drawangle;
// player's ring count
INT16 rings;
INT16 spheres;
// Power ups. invinc and invis are tic counters.
UINT16 powers[NUMPOWERS];
// SRB2kart stuff
INT32 kartstuff[NUMKARTSTUFF];
INT32 karthud[NUMKARTHUD];
UINT32 distancetofinish;
waypoint_t *nextwaypoint;
respawnvars_t respawn; // Respawn info
tic_t airtime; // Keep track of how long you've been in the air
boolean driftInput; // Whenever or not try drifting.
boolean airFailsafe; // Whenever or not try the air boost
INT32 aizDriftTilt;
INT32 aizDriftTurn;
UINT8 trickpanel; // Trick panel state
boolean trickdelay; // Prevent tricks until control stick is neutral
fixed_t trickmomx;
fixed_t trickmomy;
fixed_t trickmomz; // Instead of stupid auxiliary variables let's... just make some ourselves.
UINT8 bumpers;
INT16 karmadelay;
boolean eliminated;
angle_t old_drawangle; // interp
angle_t old_drawangle2;
// Bit flags.
// See pflags_t, above.
@ -560,10 +364,6 @@ typedef struct player_s
INT32 skin;
UINT32 availabilities;
UINT32 score; // player score
fixed_t dashspeed; // dashing speed
// SRB2kart
UINT8 kartspeed; // Kart speed stat between 1 and 9
UINT8 kartweight; // Kart weight stat between 1 and 9
@ -572,44 +372,159 @@ typedef struct player_s
UINT16 followercolor; // Kart: Used to store the follower colour the player wishes to use
mobj_t *follower; // Kart: This is the follower object we have. (If any)
UINT8 tumbleBounces;
UINT16 tumbleHeight;
boolean tumbleLastBounce;
boolean tumbleSound;
SINT8 glanceDir; // Direction the player is trying to look backwards in
//
UINT32 charflags; // Extra abilities/settings for skins (combinable stuff)
// See SF_ flags
mobjtype_t followitem; // Object # to spawn for Smiles
mobj_t *followmobj; // Smiles all around
UINT32 score; // player score
UINT16 nocontrol; //for linedef exec 427
UINT8 carry;
UINT16 dye;
// SRB2kart stuff
INT32 karthud[NUMKARTHUD];
// Basic gameplay things
UINT8 position; // Used for Kart positions, mostly for deterministic stuff
UINT8 oldposition; // Used for taunting when you pass someone
UINT8 positiondelay; // Used for position number, so it can grow when passing/being passed
UINT32 distancetofinish;
waypoint_t *nextwaypoint;
respawnvars_t respawn; // Respawn info
tic_t airtime; // Keep track of how long you've been in the air
UINT8 startboost; // (0 to 125) - Boost you get from start of race or respawn drop dash
UINT16 flashing;
UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")
UINT8 spinouttype; // Determines the mode of spinout/wipeout, see kartspinoutflags_t
UINT8 instashield; // Instashield no-damage animation timer
UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out
UINT8 justbumped; // Prevent players from endlessly bumping into each other
UINT8 tumbleBounces;
UINT16 tumbleHeight; // In *mobjscaled* fracunits, or mfu, not raw fu
UINT8 justDI; // Turn-lockout timer to briefly prevent unintended turning after DI, resets when actionable or no input
boolean flipDI; // Bananas flip the DI direction. Was a bug, but it made bananas much more interesting.
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
UINT8 strongdriftboost; // (0 to 125) - While active, boost from drifting gives a stronger speed increase
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
INT32 aizdrifttilt;
INT32 aizdriftturn;
INT32 underwatertilt;
fixed_t offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
UINT8 waterskip; // Water skipping counter
UINT16 tiregrease; // Reduced friction timer after hitting a spring
UINT16 springstars; // Spawn stars around a player when they hit a spring
UINT16 springcolor; // Color of spring stars
UINT8 dashpadcooldown; // Separate the vanilla SA-style dash pads from using flashing
UINT16 spindash; // Spindash charge timer
fixed_t spindashspeed; // Spindash release speed
UINT8 spindashboost; // Spindash release boost timer
UINT8 numboosts; // Count of how many boosts are being stacked, for after image spawning
fixed_t boostpower; // Base boost value, for offroad
fixed_t speedboost; // Boost value smoothing for max speed
fixed_t accelboost; // Boost value smoothing for acceleration
fixed_t handleboost; // Boost value smoothing for handling
angle_t boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
fixed_t draftpower; // (0 to FRACUNIT) - Drafting power, doubles your top speed & acceleration at max
UINT16 draftleeway; // Leniency timer before removing draft power
SINT8 lastdraft; // (-1 to 15) - Last player being drafted
UINT16 tripwireLeniency; // When reaching a state that lets you go thru tripwire, you get an extra second leniency after it ends to still go through it.
UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem")
UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark)
// Item held stuff
SINT8 itemtype; // KITEM_ constant for item number
UINT8 itemamount; // Amount of said item
SINT8 throwdir; // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
UINT8 itemscale; // Item scale value, from when an item was taken out. (0 for normal, 1 for grow, 2 for shrink.)
UINT8 sadtimer; // How long you've been sad
// player's ring count
SINT8 rings;
UINT8 pickuprings; // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
UINT8 ringdelay; // (0 to 3) - 3 tic delay between every ring usage
UINT16 ringboost; // Ring boost timer
UINT8 sparkleanim; // (0 to 19) - Angle offset for ring sparkle animation
UINT16 superring; // Spawn rings on top of you every tic!
UINT8 curshield; // see kartshields_t
UINT8 bubblecool; // Bubble Shield use cooldown
UINT8 bubbleblowup; // Bubble Shield usage blowup
UINT16 flamedash; // Flame Shield dash power
UINT16 flamemeter; // Flame Shield dash meter left
UINT8 flamelength; // Flame Shield dash meter, number of segments
UINT16 hyudorotimer; // Duration of the Hyudoro offroad effect itself
SINT8 stealingtimer; // if >0 you are stealing, if <0 you are being stolen from
mobj_t *hoverhyudoro; // First hyudoro hovering next to player
UINT16 sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters)
UINT8 numsneakers; // Number of stacked sneaker effects
UINT8 floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel
INT16 growshrinktimer; // > 0 = Big, < 0 = small
UINT16 rocketsneakertimer; // Rocket Sneaker duration timer
UINT16 invincibilitytimer; // Invincibility timer
UINT8 eggmanexplode; // Fake item recieved, explode in a few seconds
SINT8 eggmanblame; // (-1 to 15) - Fake item recieved, who set this fake
UINT8 bananadrag; // After a second of holding a banana behind you, you start to slow down
SINT8 lastjawztarget; // (-1 to 15) - Last person you target with jawz, for playing the target switch sfx
UINT8 jawztargetdelay; // (0 to 5) - Delay for Jawz target switching, to make it less twitchy
UINT8 confirmInflictor; // Player ID that dealt damage to you
UINT8 confirmInflictorDelay; // Delay before playing the sound
UINT8 trickpanel; // Trick panel state
UINT8 tricktime; // Increases while you're tricking. You can't input any trick until it's reached a certain threshold
fixed_t trickboostpower; // Save the rough speed multiplier. Used for upwards tricks.
UINT8 trickboostdecay; // used to know how long you've waited
UINT8 trickboost; // Trick boost. This one is weird and has variable speed. Dear god.
tic_t ebrakefor; // Ebrake timer, used for visuals.
UINT32 roundscore; // battle score this round
UINT8 emeralds;
UINT8 bumpers;
INT16 karmadelay;
tic_t overtimekarma; // time to live in overtime comeback
INT16 spheres;
tic_t spheredigestion;
SINT8 glanceDir; // Direction the player is trying to look backwards in
UINT8 tripWireState; // see tripwirestate_t
//
SINT8 lives;
boolean lostlife;
SINT8 continues; // continues that player has acquired
SINT8 xtralife; // Ring Extra Life counter
UINT8 gotcontinue; // Got continue from this stage?
fixed_t speed; // Player's speed (distance formula of MOMX and MOMY values)
fixed_t lastspeed;
UINT8 secondjump; // Jump counter
UINT8 fly1; // Tails flying
UINT8 scoreadd; // Used for multiple enemy attack bonus
tic_t glidetime; // Glide counter for thrust
UINT8 climbing; // Climbing on the wall
INT32 deadtimer; // End game if game over lasts too long
tic_t exiting; // Exitlevel timer
UINT8 homing; // Are you homing?
tic_t dashmode; // counter for dashmode ability
tic_t skidtime; // Skid timer
////////////////////////////
// Conveyor Belt Movement //
////////////////////////////
@ -618,73 +533,18 @@ typedef struct player_s
fixed_t rmomx; // "Real" momx (momx - cmomx)
fixed_t rmomy; // "Real" momy (momy - cmomy)
/////////////////////
// Race Mode Stuff //
/////////////////////
INT16 numboxes; // Number of item boxes obtained for Race Mode
INT16 totalring; // Total number of rings obtained for Race Mode
INT16 totalring; // Total number of rings obtained for GP
tic_t realtime; // integer replacement for leveltime
UINT8 laps; // Number of laps (optional)
INT32 starpostnum; // The number of the last starpost you hit
////////////////////
// CTF Mode Stuff //
////////////////////
INT32 ctfteam; // 0 == Spectator, 1 == Red, 2 == Blue
UINT16 gotflag; // 1 == Red, 2 == Blue Do you have the flag?
UINT8 ctfteam; // 0 == Spectator, 1 == Red, 2 == Blue
INT32 weapondelay; // Delay (if any) to fire the weapon again
INT32 tossdelay; // Delay (if any) to toss a flag/emeralds again
/////////////////
// NiGHTS Stuff//
/////////////////
angle_t angle_pos;
angle_t old_angle_pos;
mobj_t *axis1;
mobj_t *axis2;
tic_t bumpertime; // Currently being bounced by MT_NIGHTSBUMPER
INT32 flyangle;
tic_t drilltimer;
INT32 linkcount;
tic_t linktimer;
INT32 anotherflyangle;
tic_t nightstime; // How long you can fly as NiGHTS.
INT32 drillmeter;
UINT8 drilldelay;
boolean bonustime; // Capsule destroyed, now it's bonus time!
mobj_t *capsule; // Go inside the capsule
mobj_t *drone; // Move center to the drone
fixed_t oldscale; // Pre-Nightserize scale
UINT8 mare; // Current mare
UINT8 marelap; // Current mare lap
UINT8 marebonuslap; // Current mare lap starting from bonus time
// Statistical purposes.
tic_t marebegunat; // Leveltime when mare begun
tic_t startedtime; // Time which you started this mare with.
tic_t finishedtime; // Time it took you to finish the mare (used for display)
tic_t lapbegunat; // Leveltime when lap begun
tic_t lapstartedtime; // Time which you started this lap with.
INT16 finishedspheres; // The spheres you had left upon finishing the mare
INT16 finishedrings; // The rings/stars you had left upon finishing the mare
UINT32 marescore; // score for this nights stage
UINT32 lastmarescore; // score for the last mare
UINT32 totalmarescore; // score for all mares
UINT8 lastmare; // previous mare
UINT8 lastmarelap; // previous mare lap
UINT8 lastmarebonuslap; // previous mare bonus lap
UINT8 totalmarelap; // total mare lap
UINT8 totalmarebonuslap; // total mare bonus lap
INT32 maxlink; // maximum link obtained
UINT8 texttimer; // nights_texttime should not be local
UINT8 textvar; // which line of NiGHTS text to show -- let's not use cheap hacks
UINT8 checkskip; // Skipping checkpoints? Oh no no no
INT16 lastsidehit, lastlinehit;
tic_t losstime;
UINT8 timeshit; // That's TIMES HIT, not TIME SHIT, you doofus!
//UINT8 timeshit; // That's TIMES HIT, not TIME SHIT, you doofus! -- in memoriam
INT32 onconveyor; // You are on a conveyor belt if nonzero
@ -693,6 +553,7 @@ typedef struct player_s
angle_t awayviewaiming; // Used for cut-away view
boolean spectator;
tic_t spectatewait; // reimplementable as UINT8 queue - How long have you been waiting as a spectator
boolean bot;
botvars_t botvars;
@ -700,22 +561,19 @@ typedef struct player_s
UINT8 splitscreenindex;
tic_t jointime; // Timer when player joins game to change skin/color
tic_t quittime; // Time elapsed since user disconnected, zero if connected
UINT8 typing_timer; // Counts down while keystrokes are not emitted
UINT8 typing_duration; // How long since resumed timer
UINT8 kickstartaccel;
UINT8 stairjank;
#ifdef HWRENDER
fixed_t fovadd; // adjust FOV for hw rendering
#endif
} player_t;
// Values for dashmode
#define DASHMODE_THRESHOLD (3*TICRATE)
#define DASHMODE_MAX (DASHMODE_THRESHOLD + 3)
// Value for infinite lives
#define INFLIVES 0x7F

View file

@ -30,13 +30,11 @@ typedef enum
BT_DRIFT = 1<<2, // Drift (direction is cmd->turning)
BT_BRAKE = 1<<3, // Brake
BT_ATTACK = 1<<4, // Use Item
BT_FORWARD = 1<<5, // Aim Item Forward
BT_BACKWARD = 1<<6, // Aim Item Backward
BT_LOOKBACK = 1<<7, // Look Backward
BT_LOOKBACK = 1<<5, // Look Backward
BT_EBRAKEMASK = (BT_ACCELERATE|BT_BRAKE),
// free: 1<<9 to 1<<12
// free: 1<<6 to 1<<12
// Lua garbage
BT_CUSTOM1 = 1<<13,
@ -52,6 +50,9 @@ typedef enum
// ticcmd turning bits
#define TICCMD_REDUCE 16
// ticcmd latency mask
#define TICCMD_LATENCYMASK 0xFF
// ticcmd flags
#define TICCMD_RECEIVED 1
#define TICCMD_TYPING 2/* chat window or console open */
@ -65,6 +66,7 @@ typedef struct
{
SINT8 forwardmove; // -MAXPLMOVE to MAXPLMOVE (50)
INT16 turning; // Turn speed
INT16 throwdir; // Aiming direction
INT16 aiming; // vertical aiming, see G_BuildTicCmd
UINT16 buttons;
UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end?

View file

@ -25,10 +25,6 @@
#include "deh_lua.h"
#include "deh_tables.h"
#ifdef MUSICSLOT_COMPATIBILITY
#include "deh_soc.h" // for get_mus
#endif
// freeslot takes a name (string only!)
// and allocates it to the appropriate free slot.
// Returns the slot number allocated for it or nil if failed.
@ -422,65 +418,6 @@ static inline int lib_getenum(lua_State *L)
if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word);
return 0;
}
#ifdef MUSICSLOT_COMPATIBILITY
else if (!mathlib && fastncmp("mus_",word,4)) {
p = word+4;
if ((i = get_mus(p, false)) == 0)
return 0;
lua_pushinteger(L, i);
return 1;
}
else if (mathlib && fastncmp("MUS_",word,4)) { // SOCs are ALL CAPS!
p = word+4;
if ((i = get_mus(p, false)) == 0)
return luaL_error(L, "music '%s' could not be found.\n", word);
lua_pushinteger(L, i);
return 1;
}
else if (mathlib && (fastncmp("O_",word,2) || fastncmp("D_",word,2))) {
p = word+2;
if ((i = get_mus(p, false)) == 0)
return luaL_error(L, "music '%s' could not be found.\n", word);
lua_pushinteger(L, i);
return 1;
}
#endif
else if (!mathlib && fastncmp("pw_",word,3)) {
p = word+3;
for (i = 0; i < NUMPOWERS; i++)
if (fasticmp(p, POWERS_LIST[i])) {
lua_pushinteger(L, i);
return 1;
}
return 0;
}
else if (mathlib && fastncmp("PW_",word,3)) { // SOCs are ALL CAPS!
p = word+3;
for (i = 0; i < NUMPOWERS; i++)
if (fastcmp(p, POWERS_LIST[i])) {
lua_pushinteger(L, i);
return 1;
}
return luaL_error(L, "power '%s' could not be found.\n", word);
}
else if (!mathlib && fastncmp("k_",word,2)) {
p = word+2;
for (i = 0; i < NUMKARTSTUFF; i++)
if (fasticmp(p, KARTSTUFF_LIST[i])) {
lua_pushinteger(L, i);
return 1;
}
return 0;
}
else if (mathlib && fastncmp("K_",word,2)) { // SOCs are ALL CAPS!
p = word+2;
for (i = 0; i < NUMKARTSTUFF; i++)
if (fastcmp(p, KARTSTUFF_LIST[i])) {
lua_pushinteger(L, i);
return 1;
}
return luaL_error(L, "kartstuff '%s' could not be found.\n", word);
}
else if (!mathlib && fastncmp("khud_",word,5)) {
p = word+5;
for (i = 0; i < NUMKARTHUD; i++)
@ -499,16 +436,6 @@ static inline int lib_getenum(lua_State *L)
}
return luaL_error(L, "karthud '%s' could not be found.\n", word);
}
else if (fastncmp("HUD_",word,4)) {
p = word+4;
for (i = 0; i < NUMHUDITEMS; i++)
if (fastcmp(p, HUDITEMS_LIST[i])) {
lua_pushinteger(L, i);
return 1;
}
if (mathlib) return luaL_error(L, "huditem '%s' could not be found.\n", word);
return 0;
}
else if (fastncmp("SKINCOLOR_",word,10)) {
p = word+10;
for (i = 0; i < NUMCOLORFREESLOTS; i++) {
@ -709,7 +636,7 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
}
}
enum actionnum LUA_GetActionNumByName(const char *actiontocompare)
size_t LUA_GetActionNumByName(const char *actiontocompare)
{
size_t z;
for (z = 0; actionpointers[z].name; z++)

Some files were not shown because too many files have changed in this diff Show more