Commit graph

38 commits

Author SHA1 Message Date
Sally Coolatta
d4e1c6cd84 Remove p_sight assert
It's already returning false for an almost identical case. Just return false.
2023-03-18 01:27:32 -04:00
Sally Coolatta
1ca522044b Fix bad usage of const 2022-11-27 03:24:07 -05:00
Sally Coolatta
bd337d1494 Bots treat all offroad as wall
Rather than only strong offroad.
2022-11-27 03:00:47 -05:00
Sally Coolatta
eef87c4676 Remove even more code dupe from p_sight.c 2022-11-26 03:15:03 -05:00
Sally Coolatta
0053cda35c Don't allow nextwaypoint to be past finish linedef 2022-11-26 02:51:46 -05:00
Sally Coolatta
cb580031ca Condense all of the P_CheckSight copy-paste
For something for my next commit
2022-11-26 02:51:45 -05:00
Sally Coolatta
b31aa1bbb0 Put tm* variables into a struct
This makes it significantly easier to save/restore the state of these variables, whenever we need to do so for calling movement functions in the middle of other movement functions. This will also make it easier to move it out of global variable hell if desired later.
2022-11-20 19:27:34 -05:00
MascaraSnake
3b971835ee Add Lua backwards compatibility for FOF flags 2022-10-09 01:56:50 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
Sally Coolatta
bfa3c40033 Improve bot traversal for the prediction
HatesSector was returning false positive for intangible FOFs, making them play really poorly in Desert Palace
2022-05-31 03:51:35 -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
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
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
56fba410ee Waypoints use trace for blocking lines, instead of a sight check 2021-01-06 16:21:57 -05:00
Sally Coolatta
f0484d87fa Merge p_sight.c 2020-08-06 11:12:19 -04:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
Louis-Antoine
74fa35221d Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into slope-cleanup
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_spec.c
2020-05-18 16:14:05 +02:00
MascaraSnake
8efec04051 Remove POLYOBJECTS and POLYOBJECTS_PLANES defines 2020-05-02 12:08:31 +02:00
MascaraSnake
58e8ec6500 Standardize the behavior of FF_INVERTSIDES and FF_INVERTPLANES 2020-03-25 08:34:52 +01:00
Louis-Antoine
29294a53cc Encapsulate plane height checks 2020-03-22 17:28:50 +01:00
Louis-Antoine
4e7605f0e2 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
Sally Cochenour
f068539bad Don't sight check through transparent FOFs
Maybe this should be a option somehow, like a distinction between "sight" and "ray-tracing", but I'm not sure how to go about that
2020-03-03 16:12:21 -05:00
Sally Cochenour
04b443d58c 2.2 sight checks backport 2020-03-03 15:49:10 -05:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
MascaraSnake
33c35230c2 Add missing glseg checks (and remove a superfluous one) 2020-01-06 14:40:59 +01:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
Monster Iestyn
dbdfdaf1fe Whoops, forgot to make P_CheckSight support slopes for same-sector FOF plane checking. 2019-05-27 21:18:02 +01:00
Monster Iestyn
309f4a10d0 Fixed P_CheckSight to support slopes, both for normal planes and FOF planes
(Untested)
2019-05-27 20:36:35 +01:00
Monster Iestyn
fb6fefd186 fix P_CheckSight to consider FOFs that completely block the view
(this could probably be in its own branch to be tested properly, but I'm on a roll with this atm)
2019-05-27 19:32:05 +01:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
3edbf0a085 Fixed P_CheckSight not considering polyobject top and bottom at all
This was actually kind of easier to do than I expected, though I can't tell if there's anything else I need to do or not
2017-04-19 22:19:46 +01:00
Monster Iestyn
a7a7a7ee6d Added P_LoadReject function to properly check if REJECT lump is valid or not when loading it, so P_CheckSight can avoid accessing it if not.
This should mean that maps built with ZBSDP (no reject) should have less or no problems in netgames compared to the standard ZenNode maps now, hopefully. =)
2016-06-11 18:45:56 +01:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Alam Ed Arias
b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00