Commit graph

17146 commits

Author SHA1 Message Date
Sally Coolatta
17de1d5ff3 Don't modify the states table for kartdebugwaypoints or kartdebugbotpredict
Also makes debugwaypoints fullbright so it's a little easier to see in dark levels.
2021-02-26 21:55:20 -05:00
Sally Coolatta
d2dd562919 Bots shouldn't try to do anything during the camera spin-around intro. 2021-02-26 21:37:14 -05:00
Sally Coolatta
ebaef5d0af Flip side properly for objects to go towards. 2021-02-26 19:46:52 -05:00
Sally Coolatta
00227ee7f0 Don't ever go too far behind the bot 2021-02-26 19:42:08 -05:00
Sally Coolatta
9f91c2dcdc Buff the object nudging now that wall detection doesn't step on its toes :) 2021-02-26 19:28:49 -05:00
Sally Coolatta
bbfad3a544 Adjust wall detection
Wall detection range was doubled, how much the prediction is adjusted was halved. This is a much nicer middle-ground compared to what it was doing before.
2021-02-26 19:04:24 -05:00
Sally Coolatta
59fa615cc8 Update comment 2021-02-26 06:12:19 -05:00
Sally Coolatta
df13b9fcfa Show prediction's radius on the prediction debugger 2021-02-26 05:58:33 -05:00
Sally Coolatta
c7e061155a Add weighting system back into prediction nudging
Simply adds the same object to the list several times. Necessary because otherwise rings are over-prioritized.
2021-02-26 05:44:57 -05:00
Sally Coolatta
dc1fbb2e9a Fix bug that caused bots to go into ring debt a lot 2021-02-26 05:42:59 -05:00
Sally Coolatta
ffaa4e2aa2 Differentiate between which side an object is on
This means that if there's objects on both sides of the bot, then the tie is broken by which side has the most objects. Before, it would average out to the middle, so they wouldn't swerve at all, which is kind of stupid for rings, but can ruin the bot's performance for dodging items & players especially!
2021-02-26 04:26:50 -05:00
Sally Coolatta
6142963ff9 Add minimum distance to prediction 2021-02-26 03:30:52 -05:00
Sally Coolatta
7eac54a749 Adjust nudging to values that feel nice 2021-02-26 03:21:33 -05:00
Sally Coolatta
0fb97a1b16 Use the proper variable for the average position 2021-02-26 02:50:20 -05:00
Sally Coolatta
4b158c44cd Add debug command to show the bot's prediction 2021-02-26 02:41:41 -05:00
Sally Coolatta
43a92892e9 New turning towards objects style 2021-02-26 01:58:13 -05:00
Sally Coolatta
5ac116dc12 Don't use rings during POSITION 2021-02-26 00:31:13 -05:00
Sally Coolatta
a4b673705a Merge branch 'master' into bots-brake-earlier 2021-02-26 00:29:48 -05:00
Sally Coolatta
317dfe5ae0 Bots brake earlier 2021-02-26 00:24:29 -05:00
Sal
d2213c21a5 Merge branch 'bot-removal-overrun' into 'master'
Fix crash when reducing kartbot

See merge request KartKrew/Kart!399
2021-02-25 02:34:42 -05:00
Sal
fa5ef9ed58 Merge branch 'kickstartaccel' into 'master'
Acceleration Kickstart

See merge request KartKrew/Kart!398
2021-02-25 02:34:32 -05:00
James R
e4226c9ff9 Fix crash from trying to remove the 17th player when removing bots 2021-02-22 18:17:50 -08:00
toaster
879c821d18 Demo-sync weaponpref data, which just includes kickstartaccel right now. 2021-02-22 12:58:03 +00:00
toaster
a43a762b46 Instead of hacking ticcmd generation, add/modify helper functions acting as intermediaries that add the necessary changes.
* Introducing K_GetKartButtons(player_t), for adding false presses to.
* K_GetForwardMove(player_t) takes kickstarting into account, and is now applied to engine sound generation too.
* BT_REALACCELERATE has been deleted.
2021-02-22 12:21:48 +00:00
Sal
5d1ed4074c Merge branch 'flashingfoolishness' into 'master'
Flashingtics Foolishness

See merge request KartKrew/Kart!397
2021-02-21 20:44:18 -05:00
toaster
cce4165f35 After discussing with Oni, adjust the coordinates for the accel kickstart indicator. 2021-02-21 21:37:56 +00:00
toaster
75b53bbb52 Don't delete your kickstartaccel if you cross the finish line and the bot driver takes over. 2021-02-21 18:20:44 +00:00
toaster
56d0a6e43d Bunch of changes to how the Kickstart Acceleration icon is rendered.
* Display even if the player (or Lua) has disabled the speedometer.
* Support splits all the way up to 4p.
* Abstract out to a function that could hypothetically display more accessibility-related icons down the line.
2021-02-21 18:12:27 +00:00
toaster
d039b14aa4 Make kickstartaccel a UINT8 instead of an INT32 kartstuff entry. 2021-02-21 18:08:04 +00:00
toaster
f71741f557 MT_BRAKEDRIFT appears to be broken, and self-removing if BT_ACCELERATE ISN'T there, as opposed to if it is as the comment suggests. Fix that here. 2021-02-21 16:58:37 +00:00
toaster
b49e44bd97 Bots will now pretend their imaginary accelerate buttons are real, just so PF_ACCELDOWN is properly tracked. 2021-02-21 16:56:16 +00:00
Sal
ef1f4bf70c Merge branch 'cameracorrections' into 'master'
A few changes to cameras

See merge request KartKrew/Kart!396
2021-02-20 20:21:02 -05:00
Sal
9b7f0cac05 Merge branch 'dropdropSHAdow' into 'master'
drop's drop SHA dow

See merge request KartKrew/Kart!395
2021-02-20 20:20:47 -05:00
toaster
08d087c6b5 Acceleration Kickstart, my little hobby project.
It's no secret that holding down a button a lot can fuck with your wrists and fingers. It's too late for me to be damageless, but I can at least create an option to reduce further harm.

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

In addition:
* Add PF_ACCELDOWN and PF_BRAKEDOWN, and BT_REALACCELERATE (which ACCELDOWN tracks). Even if this feature never gets merged, BT_REALACCELERATE is required because sneakers and boosters force it on too (extending this is how I implemented it).
* Fix the dehacked playerflag list being out of shape.
* I replaced some existing flags during development of this branch, so their old uses have been whittled away.
2021-02-20 23:10:18 +00:00
toaster
ff4ea765c4 Fixed flashingtics not working if you've never taken any damage in a match before.
Two notable consequences of this bug:
* The delay when pressing the item button as a spectator to toggle PF_WANTSTOJOIN was not present, leading to a rapid toggle and spurious changeteam commands.
* Lightsnaking through map hazards such as Lavender Shrine's stabbies caused you extra spicy unavoidable pain.
2021-02-20 16:05:12 +00:00
toaster
bcf07576c7 Additional attempt to compensate for spectatoriness in K_ObjectTracking. 2021-02-19 20:51:58 +00:00
toaster
41bd345356 Fixed being able to turn the camera while lightsnaking. 2021-02-19 20:49:38 +00:00
toaster
97d404de7b A few changes to cameras.
* When lightsnaking, update the camera angle at each waypoint step to prevent being dropped the wrong way around.
    * The above bullet point is WIP. I've tried to restrict manual turning while lightsnaking, but it still happens and just gets yanked back at each waypoint. Would appreciate a bit of insight here.
* Fix HUD tracking for spectators by setting thiscam->chase each tic more definitively.
    * Still happens for the very first tic of the map though, must be another data point I missed 😔
* Fix the vertical jittering when a spectator's camera is on the ground.
2021-02-19 16:25:12 +00:00
toaster
36099a900f Fixed papersprites' shadows drifting - notably applies to Minecraft items. 2021-02-19 11:31:25 +00:00
Sal
5ee4680c04 Merge branch 'skyswapping' into 'master'
Fixed Change Sky linedef type crashing the game (resolves #118)

Closes #118

See merge request KartKrew/Kart!387
2021-02-18 18:55:31 -05:00
Sal
e6a0ff727c Merge branch 'typing-notifier' into 'master'
Typing Indicator

See merge request KartKrew/Kart!389
2021-02-18 18:34:00 -05:00
Sal
cd57c0fefc Merge branch 'oop-starttime' into 'master'
"starttime" order of operations

See merge request KartKrew/Kart!374
2021-02-18 18:33:47 -05:00
Sal
8853a4b8e3 Merge branch 'jumping-finish-line-distance' into 'master'
Finish line waypoint issues

See merge request KartKrew/Kart!384
2021-02-18 18:23:08 -05:00
Sal
bf77c826cc Merge branch 'tweakmaps' into 'master'
Tweakmaps!

See merge request KartKrew/Kart!391
2021-02-18 18:18:36 -05:00
Sal
db46507b81 Merge branch 'respawnstuff' into 'master'
Respawning, FAULTing and spectators

Closes #108

See merge request KartKrew/Kart!392
2021-02-18 18:15:27 -05:00
Sal
5d431dbb2c Merge branch 'firstpersonhitlag' into 'master'
First-person view hitlag

See merge request KartKrew/Kart!393
2021-02-18 18:10:47 -05:00
Sal
5651dc2623 Merge branch 'respawn-before-finish-line' into 'jumping-finish-line-distance'
Respawn before finish line waypoint

See merge request KartKrew/Kart!386
2021-02-18 18:09:24 -05:00
Sal
3ea8e23337 Merge branch 'ring-burst-reverse-gravity' into 'master'
Fix caltrop dropping in reverse gravity as well as not disappearing under some slope conditions

See merge request KartKrew/Kart!388
2021-02-18 18:07:47 -05:00
toaster
34ebcdf696 Hitlag is now displayed in first-person view. 2021-02-18 13:23:44 +00:00
toaster
5310acc84e * As predicted, remove FAULTing from simply becoming a spectator at the start of the race - only apply it if you attempt to rejoin!
* Mark FAULTing players as in pain, preventing you from using your rings in mid-air (which is especially egregrious when re-entering the race from being a spectator uses the item button).
2021-02-18 11:11:50 +00:00