Commit graph

72 commits

Author SHA1 Message Date
James R
99362bc9b2 Give debugwaypoints orb and radius RF_ALWAYSONTOP
Makes the radius always visible in full.
2023-03-06 06:50:24 -08:00
toaster
724c9b774e Cleaner reference handling for the following extern-scope netsynced mobj_t*.
- `skyboxcenterpnts` and `skyboxviewpnts`
    - P_InitSkyboxPoint`, which calls `P_SetTarget`
- `waypoint->mobj`
    - Make sure NULL before using `P_SetTarget` on
- `tubewaypoints`
    - Use `P_SetTarget`
    - Use `UINT32_MAX` for the invalid mobjnum, since 0 is a valid one.
- `waypointcap` and `kitemcap`
    - NULL before reset

Our international nightmare is over.
2023-01-05 23:32:12 +00:00
Sally Coolatta
0a733c7265 First pass on Special Stage UFO
- UFO spawns at first waypoint for TOL_SPECIAL maps
- UFO moves up the waypoints, the speed varying based on your position relative to it and your own speed.
- You are able to tether off of the UFO.
- Bugfix: PathfindThruCircuit no longer fails when reaching a one-ended waypoint.

Damage is my next project but I wanted to get this committed for now.
2022-12-15 23:06:17 -05:00
Sally Coolatta
63ae0ea6bd Prevent finishline ever being your prevwaypoint 2022-11-27 03:00:47 -05:00
Sally Coolatta
0053cda35c Don't allow nextwaypoint to be past finish linedef 2022-11-26 02:51:46 -05:00
Sally Coolatta
c2cc847746 Save waypoint riser / anchor data into spawnpoint
Allows -writetextmap to write the changes from these binary-only things.
2022-10-10 09:42:26 -04:00
Sally Coolatta
01b1a9d3a7 Prevent poh-bees on no-respawn waypoints 2022-09-15 21:44:45 -04:00
Sally Coolatta
cf9bfcae02 Start on new Shrink
Currently just spawns an object that goes along the waypoint path
2022-09-10 21:44:40 -04:00
Sally Coolatta
5107160a27 Circuit pathfinding
An alternative to the standard pathfind function. Instead of pathfinding to a specific waypoint, it always goes towards the finish line waypoint, but also won't stop when it reaches it. It only stops when it travels a far enough distance.

This is basically a cleaner, less hacky, and optimized version of the pathfinding I gave to the bots; instead of doing 1-2 full pathfinds to do this (depending on if they are near the finish line or not), it will instead always do a single small pathfind. I also need it for shrink laser behavior.
2022-09-10 03:52:31 -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
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
286010c6e9 pedantic: replace GNU empty initializer extension with C99 0 initializer 2022-02-20 03:13:23 -08:00
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
James R
82718216cc Respawn slightly before a waypoint, in the direction you came from, if the waypoint is exactly on a line
See notably the finish line. Basically respawning exactly on a line can let you
cross it twice, if you crossed it before respawning, or NOT cross it, depending
on which direction you drive after landing. So this just respawns very slightly
before the line so you can cross (or not cross) it normally.
2021-02-15 23:01:13 -08:00
James R
b672ffa8ba Check previously considered best waypoint when pathfinding to solve overlapping waypoints
Previously could skip the waypoint that was actually closer and assume the
further is the best.
2021-02-14 22:55:03 -08:00
Sally Coolatta
68ce8939b9 Draw black connection if either waypoint is disabled, instead of only the destination
I think this makes a bit more sense
2021-02-03 17:20:32 -05:00
Sally Coolatta
9d4afb9aec Players/bots ignore disabled waypoints 2021-02-01 19:58:15 -05:00
Sally Coolatta
1bf8fb595a Waypoint debug shows disabled waypoints as grey with black connections 2021-02-01 19:12:32 -05:00
Sally Coolatta
56fba410ee Waypoints use trace for blocking lines, instead of a sight check 2021-01-06 16:21:57 -05:00
Sally Coolatta
9efdc98de6 Makes it through all kart files
All that's left is SDL, OGL, maybe also Lua
2020-08-15 04:42:56 -04:00
Sally Coolatta
5a6263c36b Make it past p_mobj 2020-08-14 20:48:06 -04:00
Sryder
6620fa96f2 const pointer to waypoint 2020-06-03 20:30:01 +01:00
Sryder
648fa66d82 Add function comment 2020-06-03 20:29:13 +01:00
Sryder
0f9872fc27 Draw radius for waypoint debug on "best" waypoint.
Fix scale of waypoint connections on mapmobjscale maps
2020-06-03 20:26:52 +01:00
Sally Coolatta
0282615c38 Merge branch 'master' into pet-robo 2020-05-18 15:18:37 -04:00
James R
aa80132976 Let Waypoint Anchors apply to multiple waypoints with the same ID 2020-05-04 17:33:43 -07:00
Sally Cochenour
174a76f7e8 Merge branch 'master' into pet-robo 2020-04-28 21:10:16 -04:00
James R
fd51bf10b0 Thing type 2003, MT_WAYPOINT_ANCHOR - Adjust waypoint's radius
The distance from the waypoint to the anchor will be the new radius.
2020-04-21 00:36:45 -07:00
James R
02f30814eb Do some cleanup 2020-04-21 00:35:06 -07:00
James R
62143d32b3 Rise waypoint to highest FOF below riser, or lowest above 2020-04-15 19:31:23 -07:00
James R
77e01f61e6 Waypoint Riser: Require Object Special for discrimination by tag
So the default is to affect all waypoints in the sector.
2020-04-04 01:28:53 -07:00
James R
89a2f8ec8d Thing type 2002, MT_WAYPOINT_RISER - Raise tagged waypoints in sector to FOF sorted by height
Thing height refers to the index of FOF. FOF are sorted by top height, lowest
to highest. Set Object Flip to sort highest to lowest.

If the waypoint thing set Object Flip, it will be placed on the bottom of the
FOF. The sorting remains the same though.

Set Ambush to raise the waypoint to the same z position.
2020-04-04 01:20:38 -07:00
James R
e8ca96ceb4 Merge remote-tracking branch 'origin/master' into HEAD 2020-04-01 19:41:44 -07:00
Sryder
902bbb447f Missed a function header comment in k_waypoint.c 2020-03-31 16:31:01 +01:00
Sryder
956222ad86 Fix joining netgames not loading up waypoints correctly.
Mobjs get deleted and loaded from net save. The mobjs in the waypoints need to load into the correct waypoints again.
This doesn't save/load the entire waypoints, so they still cannot be edited/added/removed mid-game.
2020-03-30 20:43:01 +01:00
Sally Cochenour
2e4b1c6ecb Help reduce waypoint flickering by using closest waypoint to finish line 2020-03-29 17:58:17 -04:00
Sryder
5cd1296505 Include license/copyright headers on new files. 2020-03-22 00:16:32 +00:00
Sryder
e874af3e43 Very minor fix to WRONG WAY
More opaque waypoint markers for kartdebugwaypoints
Looks like whitespace got murdered in k_kart.c again
2020-03-21 23:24:04 +00:00
Sryder
738d1f1940 Make kartdebugwaypoints far more clear to use for the debugging lines
Fix memory reallocation issue that I don't think could be seen currently
2020-03-21 21:32:40 +00:00
Sryder
3d3b8b6bc6 Replace many cases of if else if statements with I_Asserts.
This is done specifically on static functions that aren't used as callbacks.
This is done to keep the code cleaner, and the I_Asserts get compiled out in Release builds.
Logic is left in the "public" functions to avoid crashes as a result of the modules.
2020-03-21 19:00:00 +00:00
Sally Cochenour
263ef8f92c Use divide/multiply for waypoint closest calculations 2020-03-20 19:33:41 -04:00
Sally Cochenour
721fb369fd Move changes to K_GetBestWaypointForMobj so that K_GetClosestWaypointToMobj can stay the same 2020-03-03 18:34:17 -05:00
Sally Cochenour
7fff21acd4 Instead of vertical cap, quadruple z axis distance
Far more natural results!
2020-03-03 16:58:09 -05:00
Sally Cochenour
ac1d40d6c5 Sight check for player waypoints 2020-03-03 16:14:19 -05:00
Sally Cochenour
1cbb4bea6b Limited vertical range on player waypoints 2020-03-03 15:47:02 -05:00
TehRealSalt
34e0b4b991 Radius was not made more coarse when I did the big-maps fix, so you were considered in every waypoint, meaning it worked exactly before I made this change in the first place
https://youtu.be/csnS0nszyuA
2019-10-27 17:18:22 -04:00
TehRealSalt
ed007f34cc change colors, since orange & yellow are pretty indistinguishable 2019-10-24 16:55:13 -04:00
TehRealSalt
fc03012749 Use facing angle while still
Also comment some of my additions a little better
2019-10-24 08:21:45 -04:00