#Pathfinding Lag Fix | Pathfinding Lib | Smart Enemy Pathfinding
1 messages Β· Page 2 of 1
just very low hanging friut
someday that will be real
It doesn't happen without v2 no
it definitely does
But it seems like you guys have figured out a lot while I was afk
the ShootGun part
it's because of BetterShotgun
did you check your logs before that? you don't have the console enabled
So @candid nimbus needs to release a patch it seems
Yeah I've always checked my logs and never seen that but however
I wonder if it's one of those things that used to not log for me as host but logged for clients
Since some errors do that
the most important question I have is how sure you are that this softlock is a regression in PathfindingLagFix
because I haven't been able to reproduce it and so I have no idea what is causing it
Pretty certain, It seems to be exclusive to multiplayer
the only thing I can think is that the Unity jobs system is screwing with object lifetimes and making RPCs run after the network disconnects
everyone runs ShootGun afaik so it would show on everyone's end
@oak timber Do you still have your log from today?
Or maybe @kind elk might, he played with
Huh I wonder how I never saw it sooner lmao
not only that but people that don't own the shotgun would have that error regardless of whether they are running BetterShotgun
the array isn't populated unless it is owned
I'm wondering if clients got an error when I tried to close the lobbies out
hmm
I wouldn't think that would have any bearing on whether you close the lobby as host but maybe someone else could confirm that
hmm i'll double check that but that would make sense
Cus I didn't see anything besides Dissonance being the first error
dissonance wasn't the first error doe
at least not in some cases
everything points to RPCs being sent while the network is disconnected
it's almost like the disconnect event is firing twice
no clue why
but I really find it hard to believe this is PathfindingLagFix's fault
It could be a run order thing
if it isn't getting completely frozen I don't know what would cause this
I don't screw with lifetimes intentionally
since I don't repro it with stable I just dunno what
I don't even have any hard refs to enemies to keep their managed objects alive
Maybe I could send you my pack and a profile might reveal it?
Yeah that is also what makes it so strange
π€ I wanna know what is misbehaving
lol
you're sure nothing else updated that might be relevant here?
also idk if you said, but did you ever downgrade PathfindingLagFix since this started happening to confirm that it definitely doesn't happen unless v2 is present?
would be good to see in a long session with several attempts
postfix's run even if a function returns early right @keen ruin
cuz ii've never seen the error before, but you're right that it returns early
I can never remember which detour is first
We swapped to V1 yesterday after we couldn't land on Black Mesa and played out the rest of the session and I could close it out just fine
well if you're host you own the shotguns to start
and nutcrackers never change ownership either
how many times did you do so?
im almost never host when playing
,but yeah i havent looked at logs specifically to test it
if I'm not getting repro on your pack even in LAN I suspect that that isn't enough
ig ill add a null check
once when we ran into the bug with DemonMae's Interior, 2nd time when Black Mesa soft locked
I do suspect if V2 can't be responsible inherently
it's some sort of run order thing
something trying to sent a network rpc to a client and dying
just dunno why
idk what run order would be relevant here
I don't either
I wish when it gives that network error it would be more descriptive
other than just saying a rpc failed
in the logs you sent I don't even see anything from PathfindingLagFix at all, and only an error could really cause this
none of my patches even do anything with anything other than enemies
Well the most recent addition that might be responsible could be Piggy's Variety Mod and I already mentioned I'm gonna test removing that for tomorrow
since I've also been getting stuck on "You are fired" as well if we end a run
ah yeah I should try doing that
just for giggles
also is it a known issue that the stream overlay mod softlocks clients (in lan only perhaps)?
I guess the issue is probably it binding the same local port twice without checking or something
Might very well be this
What
Stream Overlays breaking lan
XD
I remember you said you were gonna fix it a while ago

Well you got some mod devs here that may be able to help you
Zaggy and Xu might know a bit more
:3
I mean is it checking that it was able to bind the socket before trying to use it everywhere? my first thought is, just shut it down if it can't bind it
if (!_webSocketServer.IsListening)
{
_webSocketServer = null;
return;
}
would this work?
@vagrant gazelle
that's assuming Start() is synchronously binding the port, but idk really
another option is to check _webSocketServer.IsListening before broadcasting I suppose, since the error I'm seeing is:
Failed to assign new player with client id #4: System.InvalidOperationException: The current state of the manager is not Start.
(Lunx I will allow Zehs to reply whenever they have time lol)
Ye I think they went afk, they were active in a stream I'm watching and they poofed from there too so hopefully they see it later lol
it's not a huge deal, it's just one more thing to adjust when I need to do stuff in your pack
Ye
it would appear so
Well @gentle charm Would be the dev of SCP 999, hopefully it's something that is easy to fix
might be the TargetClosestEnemy method, not sure
I would assume while I'm outside the enemy would be roaming
It's possible yeah
I'm beginning to be convinced that Unity made it too easy to test paths
one very easy optimization though:
- if (!PathIsIntersectedByLineOfSight(enemy.transform.position, calculatePathDistance: false, avoidLineOfSight: false) && (!requireLineOfSight || CheckLineOfSightForPosition(enemy.transform.position, viewWidth, 40)))
+ if ((!requireLineOfSight || CheckLineOfSightForPosition(enemy.transform.position, viewWidth, 40)) && !PathIsIntersectedByLineOfSight(enemy.transform.position, calculatePathDistance: false, avoidLineOfSight: false))
although I guess it's probably not using the LOS check
no wait it is

also
- if ((TargetClosestPlayer(1.5f, true) && followPlayer) || (TargetClosestEnemy(1.5f, true) && followEnemy))
+ if ((followPlayer && TargetClosestPlayer(1.5f, true)) || (followEnemy && TargetClosestEnemy(1.5f, true)))
please check the easy stuff first
this async API is looking all the more important, but I might be too lazy to make it usable enough for everyone to adopt it without a lot of coaching
I'd probably have to set up a bunch of helpers and I'm not sure what that would look like to do it in a generalized way
Yeah at least these changes should be useful for the SCP 999 mod, since it has a github you might be able to push a pr too
that requires me to set up a local copy π if I were to go to that effort I would much rather just go the full way and make it async
zaggy while you're at it stop everything you're doing and take hours out of ur time to just do my job for me in all of coderebirth
oh tanks
I didn't realize how long it would take to setup a pr that was my bad XD
my memory is crazy sometimes
I appreciate your jokes though Xu ty
im serious, no jokes, get to work zaggy
buh
Thanks, I'll try it now
In all seriousness I sometimes forget how long it takes for pr's to be setup cus I've seen some devs push pr's crazy fast in the past lol
also off the top of ur head, does the playerSteamId field get filled in with anything if you're on lan?
if the project is set up nicely it doesn't really take too long
Ye
at least to do the PR, testing is the time consuming part
I doubt it
I don't really know
I don't think so, doesn't it just label you as Player#0 and Player#1, etc in lan?
yeah but i doubt theres any relevance there to that
it doesn't connect the Steam API when you do LAN so it can't get a valid ID
all it can do is come up with a bogus one if anything
Yeah Lan is all offline stuff
yeah i wondered whether it's a bogus number, or null since its ulong or 0
yes lunxara im aware
Oh I figured
I probably didn't need to tack it on tbh 
when you had the softlock after being fired, was it just stuck on the fired screen and otherwise running normally?
Damn, ping 
I dont got logs, played with glitch, so logs reset
exit to menu worked for me but I did get stuck on the fire screen
Logs should be per profile
did the softlock only happen to the host?
uhm well im in bed now and too lazy
I remember a client saying their game crashed when they tried to leave after it soft locked if that means anything
lol
I would love to know if you can go a 3 or more reloads without getting softlocked in normal play with stable PathfindingLagFix
hmm a dump from them would be helpful then
probably not likely to be the NavMeshQuery crash but can't hurt for me to check the stack trace
I mean i crashed upon trying to load in lunxaras lobby but i didnt think much of it
Just thought her beefy modpack killed my pc
π«‘
I got it working! Thanks for the help
Yay
I just pushed the update :3
I saw that I got pinged. Do I have to solve some problem or is everything ok? I tried to read the chat but I didn't understand anything
There was an error from BetterShotgun that was discovered that needs fixed basically
This one I believe
the Shootgun Error
I am not the person who coded the bettershotgun, however I think the problem occurs because the bettershotgun replaces the original shotgun code? That's the only thing that comes to mind since it's the first time I've seen this kind of error
Yeah I think @green gust is supposed to inform you of what needs changed from what I understood
so I did some testing in the meantime and it seems to only happen when CodeRebirth is installed?
π€ @ashen harbor either you swapped the sqlite file or you never downgraded PathfindingLagFix π€
from the logs issue only happend in the execution nrΒ° 12. and only once
iirc only issue i really had was that your IHittable code assumes that PlayerControllerB is in IHittable non-nullable, also you never populate the RayCastHit[] enemyColliders which some mods might rely on, if you could populate that with your hits that you get, even if only for the owner (which the game does), that'd be great
https://github.com/Entity378/BetterShotgun/blob/main/ShotgunPatch.cs#L165-L173 would probably populate it somewhere here with your hits, if im understanding whats happening right, lol
I can try, the code is the same as the original hexibettershotgun and I've never touched it. The mod simply needed to be recompiled due to new versions of the game and since the original owner couldn't compile the mod I did it myself
basically i'm saying that i don't know how the mod works either
okay glad to know we both dont, the second issue should be simple since it's just a field in the shotgun code, i assume it'd be easy to just populate that with the hits that are made by that mod
for the first one then um we ball
oh actually this is probably for the first issue
nvm holder isnt even used lol
you could probably just get rid of that line 
it might error if the shotgun is fired without a player holding it?
since it is not used I don't think it gives an error. I remove it anyway to be safe
wait
enemyColliders is private? because in that case I don't know how to access it.
The more I code for this game the more ignorant I feel (even after 1 year of doing it)
I mean, the only thing I can think of is using Reflection to access enemyColliders but other than that I have no idea
My bad, uh you could publicise the assembly
That's usually the best way to access private or internal fields
https://github.com/XuuXiaolan/CodeRebirth/blob/main/Plugin/CodeRebirth/CodeRebirth.csproj#L28
https://github.com/XuuXiaolan/CodeRebirth/blob/main/Plugin/CodeRebirth/CodeRebirth.csproj#L35 replacing your lethal company reference with this one and adding the first should be all you need
In your csproj file
so, i tried it and now it seems to work (no more errors)
hmm I think it's a bit silly to waste time on filling the array if you're doing things the right way and calling IHittable.Hit unconditionally
the only reason that Xu has to use that array is because zeekerss doesn't use IHittable properly there yet
maybe it's a waste of time but I still prefer to fill it "correctly".
i mean the "correct" way would be to do it like vanilla does and use RacastNonAlloc passing the original array π
just as long as you're not making it allocate every time I guess
i guess the appeal of RaycastAll is that it will return all hits no matter how many there are
I don't quite understand how the original function works but it seems like everything is put inside that enemyColliders regardless of whether it's an enemy or something else
Only just got onto my pc, this should be it if it's still needed
yeah, the array is just used as a buffer to put the colliders into
unsure if it clears the array to null before it fills the buffer with the hits though, and the count of hits being a return value almost guarantees it to end up in a local variable (not at my PC rn to check it it is in vanilla), so using it feels a little sus to me anyway
tyty, I'll have to see if there are any clues here
hey buddy where's my crash dump 
Meow!
finding it
@keen ruin no crashes, aint got no logs for any crash
so all is good i guess
i didnt get any errors or unity popup my game just closed on join
couldve accidentally close my console
anyway yeah without a log or dump I gotta assume it was something else
ah
we shall never know
probably was nothing
Foreshadowing is a narrative device in which a storyteller gives an advance hint of what is to come later in the story.
I don't like the sound of that kind of foreshadowing
out of curiosity, has anyone else been using Beta v2.0.3 and encountered issues with closing lobbies?
I had to reimport the code before we played yesterday
So old SQLite got deleted
@keen ruin just wanted to let you know I've been able to close out lobbies just fine today after pulling Piggy's Variety Mod and updating HexiBetterShotgunFixed
So I would guess it was cus of Piggy's
ah that's good to hear, how many times have you closed out thus far?
I tested your profile code from yesterday's stream with Matty and wasn't able to reproduce there, so I'm wondering if it could just be very intermittent, but it's also very plausible that it could just be something breaking in some update
Just pushed a new version 2.0.4 which
- Removes the crash warning from the readme, since things have seemed stable since my fix
- Adds a patch to reduce the impact of pathfinding used to check if an enemy can target each player in the lobby, which would manifest as a small stutter in large lobbies and is used by a lot of enemies in the game:
@green gust I shall prioritize making an API for you to use to make Jimothy stable next, fear not
Yipp
to start with I can probably just give you the synchronization methods that I use in PathfindingLagFix, should be very easy to plug in then
not sure if it's better to do that or just yoink the job code out of CodeRebirth for the API 
is that code on your GitHub and up to date?

Does this mod work with Lockers?
probably?
that's an oddly specific question that I don't necessarily know the answer to, but I don't know of any mods that would have issues with it
The only thing we reprod today was the soft lock when you get fired that's been happening since Mel's ship mod updated
so I brought that to her attention
c;
I should clarify: does the Locker cause any stuttering, and if so, will the mod fix said stuttering?
oh
no clue
I've never played with locker tbh
I doubt it has any stutters that even the beta would solve entirely, unless it's doing something very bad
but whether there are stutters is up to your testing
I didnβt notice anything. Then again, my game slows down a bit when lots of monsters are spawned, so itβs hard to know whether itβs somewhat caused by the Locker.
yeah
if you didn't have the beta when said slowing happened, then hopefully it will be able to help with that
that's exactly what the beta is supposed to improve, though it is incomplete at the moment
Any crashes that I should know of? Like, does this mod work with vanilla Lethal Company?
I only really test against vanilla
I haven't had crashes reported since the fix in 2.0.3
Pathfinding Lag Fix v2 (BETA)
guys, make fun of this guy for using the wrong icon
@keen ruin I'm guessing I should add PathfindingLib once it becomes available? π
lib will be a dependency of coderebirth next update
and probably pathfinding lag fix v2 since he moved the stuff there i assume(?)
Yeah I figured it was something I should add the second it becomes available
doesnt do anything by itself
I see it being a dependency for a lot of things
yeah it'll be a dependency of PathfindingLagFix Beta soon enough
and then PathfindingLagFix proper after that
it's only there for Xu to use it until anyone else decides to dip their toes into this
but it takes a little bit of what could potentially be considered boilerplate to be usable for an enemy, so we'll see how many others use it initially
first one that comes to mind is Lethal Intelligence, but I kind of want to make an even higher level API within PathfindingLib before I suggest anything like that
I would prefer that PathfindingLib takes over all the fire exit pathfinding logic that Virus has been working on there, but we'll see
(coincidentally that is also what I suggested Xu use it for)
thats what i was already using it for smh
Oh good, no more lag when gals are pathing to entrances
there wasnt any lag previously for gals pathing to entrance, im just accomodating smarter pathing
and well, more pathing
that's what I meant lmao you were trying to solve the fire exit pathing and I was like async would be pretty bussin here
yeah true
There is actually, if you go inside before they do there is some lag, likewise the same happens if you go outside and they take a bit to find their way out
It's only those cases though
makes sense there could be a little perhaps, surprising to me if it was that noticeable tbh
Xu, weren't you choosing just one entrance teleport to check before? I forget
maybe you were checking all idr properly
I forget how often/how many paths you were calculating
i never checked whether anything was pathable
i stored a list of exits i KNEW were pathable because the player who owns the gal already used em
ohhh okay
it would cause issues if doors were to get locked, but i never calculated any paths, except one for disabling the agent
that must have been before I saw the code properly, I'm guessing
yuh
then yeah it probably shouldn't have been too noticeable
oh yeah and @ashen harbor idk if you're still thinking of adding the lib, but I would definitely recommend to wait until I make it a dep, my own patches may conflict with themselves otherwise lol
I haven't checked that
Lol got it
Yeah i got it
Shoo birb shoo
I am lunxara
pushed out the update to make PathfindingLagFix Beta use PathfindingLib, there should hopefully be no behavior changes
except for a very minor change to distance pathfinding affecting brackens, etc that should make them slightly more consistent with vanilla
Jimothy can now be real pog
I'm looking at patching the tulip snake now, @crimson jolt did you have a patch to replace calls to FindObjectsByType already? I'm thinking of making some patches for those calls to make them use lists without allocating but I don't want to break on other patches if there are any
I feel like I remember someone mentioning doing that, but I forget who
ah yeah, I think you're right
the only place i patch tulip snakes is jetpack fixes and enemy sound fixes
makes sense
and i can link you both repositories if you want to peek at them to make sure you won't conflict with anything
but im willing to bet anything you touch pathfinding-wise should be fine
I shouldn't if they're only relevant to what is logical for those mods
it definitely should be yeah
my pathfinding patch is quite minimal
Lethal Company plugin. Fixes a bug causing the player to explode without crashing. Also fixes the bug where you can sometimes freeze in place with the jetpack still running. - ButteryStancakes/Jetp...
I think it will take care of the stutters that people have been seeing too, I was able to reproduce it somewhat
this is the only function that majorly affects tulip snakes and it's mostly just a postfix to patch over some jank with the jetpack
it's not mainly the FindObjectsByType but rather two Choose[...]Position calls in a row
and this just changes some stuff with audiosources, also in a postfix
ah yeah, this shouldn't be close to where I'll be patching the FindObjectsByType either
should be fine then
I'll have to see what CritHax thinks with regard to patch conflicts
Thank you ^w^
yee that's pretty clean 
I would like to try to make one that's non-allocating, but it would need to be a little bit more involved obviously
I guess that we shouldn't really have issues with each other's patches considering that it should be a no-op if it finds no call to FindObjectsByType actually
I never released the mod 
ohh ok lol
basically mine will be very similar except using an internal Unity API to grab the array out of the list, then transpile ldlen to use get_Count instead
the whole enemy thing is kind of bizarre
zeekerss keeps a constant list of spawned enemies on RoundManager.Instance
which, after the course of multiple updates to the game, now catalogs all enemies on all clients (except that masked still only work for host but they are the exception)
but he doesn't even iterate that list here, just does a findobject for flower snakes
yeah it would be a little uglier but faster to do that
iirc the only place he uses the cached enemies is for the "Nearby activity detected" prompt on the teleporter doors
but also it's not hard to just maintain a list in OnEnable/OnDisable
I think it's used for more than that, but not that much iirc
yeah i was going to say it's even more bizarre because flower snakes have a static list called mainSnakes
I forgor what the usecase I looked at recently was though
which you'd think would point to all the tulip snakes with isMainSnake = true
(that isn't populated lmao)
except for some reason he doesn't use it at all
just resizes it when the first tulip snake spawns
I was gonna use that for OpenBodyCams but I couldn't
i assume it's just commented out in his project somewhere
probably
all the code using it
I think there's a couple places where it should have been used iirc
i think this community (myself included) can be a bit too nitpicky about zeek's code sometimes
oh for sure
but the like. #1 most painful thing is seeing find calls that really should not exist
Lol
yeah it is a common mistake among modders to tbf
anytime he uses findobjectoftype<roundmanager> or some other singleton it brings a tear to my eye
because those can at least be fixed with 0 refactoring
that's probably old code that has been long forgotten tbh
i assume so yeah
should definitely do a find in project but oh well
hopefully one of these days he just does a ctrl+F on everything and makes the changes
yeah
anyways sorry i derailed a bit
in other news
always makes me happy to see pathfindinglagfix grow in power with each new development
hoping v2 can have a smooth release soon
i've been using the beta on my debug profile but i've been sticking to stable with my friends since we have to rehost enough anyway because of other issues
so far i've personally encountered no issues but that's probably not the best data to sample
I think it should be safe to use in normal play, at least as far as stability goes
it's possible that I have introduced some regressions in enemy behavior, but that would be good to find out through normal play
Lunxara hasn't stopped using it since 2.0.4 (for long at least) afaik, and it hasn't caused a crash
if new crashes do pop up, I'm fairly confident I'll be able to fix them the same way I've fixed all the other causes, only question is how long it'll take to figure out how to reproduce the particular new cause
thanks lunxara 
no problem
just out of curiosity
do you foresee problems with mix&matching stable and beta across players?
i could maybe start using the beta on my end (i host all our games if it's relevant) to try and get some real sample data
but i'd feel bad telling them all to shift to beta then making them shift right back if there are problems
so i might not advise them to make the switch until it's live
should be fine, each enemy only does pathfinding on one client at a time (mostly the host, you)
I've used beta on host and on client while others were on stable and had no issues
not as much when I was host though tbf
simply because it's been a while since I hosted
regardless, no reason it should have issues
I've been keeping it in my pack as a main stay since it got fixed yeah
I still dunno what Piggy's Variety Mod was doing that caused me to be unable to close lobbies
lol
nonstandard networking practices perhaps, idk
Prolly
I just really love those Tesla Gates as a hazard, they add so much to the game lol
cool, cool
i will dip my toes into it then and let you know if we have any issues next time we play
well, regarding pathfinding, anyhow
that would be helpful
thus far nobody has noticed anything out of the ordinary, but the AI is already buggy so it's hard to be sure lol
just pushed:
Version 2.0.6 (Beta)
- Added some tulip snake patches to prevent stutters, especially just after they have dismounting a player.
- Prevented some rare situations where enemies may be permanently blocked from doing distance-based pathfinding.
(this includes the patches to FindObjectsByType along with the usual async stuff)
Holy shit Takerst is gonna love this
He always mentioned the lag from them
lol
nice lol
I've heard it from a few people including you, but only recently found out it was specifically happening largely only when they dismount
made it much easier to determine what exactly I needed to patch
if there are other situations in which you see bad performance from them though, lemme know
they do also have a serious cost just due to having two animators, which I have yet to figure out a proper solution to
Yeah some of the enemies are coded a bit strange
well it makes sense how it's set up except for the fact that the skinned mesh renderer isn't a child of the body animator so the animator can't be culled properly, at least not easily
I gotta figure out if there's a way I can give it a fixed bounding box
Speaking of funny things not being culled
Cheese in the Cheese version of Slaughterhouse
XD
are those in place of the meat hooks?
Yeah they replace the meat
huh I see
idk if the meat itself is part of the tiles, but if it is, then I guess I really need to make that API where people can add renderers to tiles........
I don't think it's gonna cause any issues, just found it funny
Yeah
what does the replacement? is it built into the slaughterhouse plugin?
Yeah it uses JLL, so the cheese version is on Slaughterhouse, there's also a unique version of Slaughterhouse that Nikki did for Bozoros
It's tag based
hmm, then I wonder when it does the replacement
there definitely should be a way to do it before CullFactory activates
assuming that the meat is not a SpawnSyncedObject for some reason anyway
I guess I should look at this
@swift token how does it trigger the tag based stuff again?
Wesley told me how it worked once but I forgot
lol
(speaking of the cheese replacement on Slaughterhouse to be specific, so you don't have to read up)
oh they are SpawnSyncedObject, I wonder why 
ugh probably a better question for nikki than me. i'm pretty sure it's using some combination of multiple of my scripts connected through unity events. I'm pretty sure it's just enabling or disabling different meshes based on the value of the config and a level filter to read the tag
iirc it was because it's using the script from the hanging spider corpses and that needed to be spawned as a network object to work?
oh, I didn't know those had a script
Yeah according to Nikki she did the normal meat manually but forgot to for the cheese
I figured the spider changed the body's attachment point while it was moving it around
not sure what this means tbh
but anywho, just checked, the meat isn't part of the tiles so it can't be culled in any case
it's probably not a huge deal really
this
oh that
sure
ideally they aren't SpawnSyncedObject since they don't have any player interaction other than pushing, but idk, maybe the pushing is networked
that would be kinda funny if it was but maybe zeekerss set it up that way
@copper cosmos is that how Zeekerss set it up?
buh
I was about to say, it's probably not so important as trying to figure out how to cull more animators in the interior, then maybe make the meat physics go dormant more easily, if they are not doing that already
animation culling crap is kinda on me, I need to generalize the solution I use in Black Mesa
doors thing might be able to be a general mod for all interiors (if I can detect whether the doors don't have an idle animation), but the lights thing is a bit more involved and probably where the majority of the performance loss lies
Slaughterhouse has about as many animators as Black Mesa did, and generation is probably smaller too π
Yeah Slaughterhouse is quite a bit more optimized now though since it is now making proper use of Dungeon Generation Plus lol
since when you do you mean? I don't think that would affect framerates at all
It helped cus the interior had a lot of light sources and shadows lol
So you'd almost always reach the shadow limit before unless you used low shadow mode
ohh, you mean that it's using DunGenPlus to increase the shadow limit?
I would hope that running CullFactory would effectively prevent hitting that limit
but increasing the limit isn't really an optimization, it's just a way to get Unity to shut up
Pushing the objects has to be networked or it just doesn't let you push them at all. That said only the initial transform is synced, they aren't like, constantly checking transforms and syncing it or anything.
huh, that's interesting that it requires that
I guess that it kinda makes sense to make the thing move semi-consistently across clients, but it's unfortunate for them all to be exempt from culling
I forgot what the component is that does the pushing though
It's an easy fix on my end to add the LOD Culling for the model, I just forgot and really don't feel like Unity rn
And it's a non issue ultimately since it will only affect a slight bit of performance on Gorgonzola
sure yeah
generally triangles aren't really the issue as much as objects being processed though, so CullFactory taking care of it will usually be more efficient than LOD culling I think
and more correct
anyway, not saying you need to change that, it's fine
I did the same thing for the barnacles
Yeah makes sense
at some point I really gotta get that animation stuff working for you though, it seems like that would be quite beneficial
the light thing would probably take some explaining, and depending on how many light prefabs you have, a bit of tedious reworking, but it should help a lot since for whatever reason HDRP lights do a bunch of random work in LateUpdate() if they had an animator parent when they Start()ed
I did notice a weird light warning spam a while ago while I was testing jimothy
I gave one of his objects two colliders that were inside eachother, stood inside one and pointed thr camera towards the inner one
Then the light warning from hdrp kept spamming
definitely shouldn't have anything to do with colliders, what interior was it?
and also was CullFactory disabled?
just normal factory
prob not
oh very odd, I wonder if something in your mod could have been making extra lights? zeekerss has the lights set to fade at a good distance to where it's incredibly unlikely to see that error
or perhaps impossible, not sure
i mean it was only spamming it when i moved my camera to look at the inner collider while i was inside the outer collider, so idk what was going on there tbh maybe something with the player's own light but im just talking out of my ass here
well it it was the shadow count warning it shouldn't be related to the player light
hard to say
i have also noticed this before btw
one time i was either spectating or just playing with @limber elm, and i was looking at logs and everytime i looked at her hair cosmetic it just spammed the shadow warning lol, other people in the lobby also noticed this happening, it was pretty funny
hasnt happened since, i think anyway
also do u plan on making black mesa depend on this one? cuz it still depends on the old one
it's gonna be merged to stable eventually
icic
probably not long before then actually, since I can just add patches to stable as I make them
fyi, made an oopsie with the PathfindingLib plugin GUID in 0.0.4, so if you install that version, PathfindingLagFix Beta 2.0.5+ will stop working
fix going out in 0.0.5 now
@keen ruin I can't remember if I've asked this before, but will you be updating PathfindingLagFix or will you be uploading this version as its own thing?
Gotcha
once I'm satisfied with it (probably will be quite soon), I will push it to stable as 2.0.0 and deprecate beta
AWESOME
I have unlocked a new power, I am a MonoMod enjoyer now
I should have an update for PathfindingLib soon β’οΈ that makes it so that all the async pathfinding only has to pause when doors are locked/unlocked rather than doing it every frame
all it took was being in vc with matty?
now instead of just decompiling C# assemblies I will be peering into the depths of the x86 world
lmao well Matty helped a lot yeah
is this the one that required you to run hookgenpatcher
but I can generate hooks into native methods using MonoMod's APIs
ahh
I mean MonoMod is what enables HookGenPatcher, it's just a lil wrapper over the MonoMod APIs
but basically I found a function in UnityPlayer.dll that applies the carving results on the main thread, hooked it, checked if it had any changes to apply to the navmesh, then locked the navmesh for writing only then
before, I was using two new subsystem in the player loop to wrap the AIUpdate subsystem in write locks
and also telling all jobs to pause at the start of the frame
on average they were probably losing like 1ms of working time per frame
maybe a little more
overall the patch isn't too complicated, I shall commit it momentarily if you want to look
here it is for anyone interested: https://github.com/Zaggy1024/LC_PathfindingLib/commit/fb60d7f99825b2df3d42e2202b564476bba1e810
@keen ruin Snare fleas seem to be broken atm
I can only assume cus of one of the recent updates
they can't damage players properly when on them and when they drop down they don't path towards players
a snare flea killed my friend earlier today
the two of us were using the beta (me as host)
i think everyone else was on stable (5 total)
I see, so it's either a fun interaction that we gotta figure out or some other mod broke it
el classico
gorgeous @tardy pivot
it is now using slices of 128 iterations and the delay is negligible for all threads
PathfindingLib Version 0.0.7 is out now:
- Reduced blocking of the main thread by hooking into the Unity runtime to detect when carving obstacles will make changes to the navmesh.
- Changed documentation to recommend using NavMeshQuery.UpdateFindPath() with an iteration limit, and unlocking the navmesh read between calls.
just my presence is enough π€£
that's fantastic
just as a note:
i've dug though the documentation for the NativeDetour and, while i highly doubt anybody else will try to hook into the same function as you,
only one NativeDetour can exist for each function pointer.
so if somebody else decides to patch your same target you'll have to "fight" for who has to add support for who π
i guess you now have to update the comments in NavMeshLock.cs
also your example job in FindPathJob.cs doesn't seem to be using the Lock anywhere π€
nvm i'm blind i was looking at an old commit π
ok this time for real. in FindPathJob.cs you never acquire the Read lock nor release it. you only call Yield
@keen ruin
huh
that's weird lol
I wonder how I managed that
and also how I wasn't able to repro a crash with Xu's mod earlier
is it a matter of not having committed it or you actually don't have it on local too? π
no it's just never been there it seems like
fun
at least no one's crashed right? π
as far as i know, none
yet
I'll add it rq
your jobs run much less constantly than mine so it makes sense it would have passed under the radar
not ideal though
uno momento
ty for catching that Matty
had some free time this morning before catching a train π yw
not necessarily if there was already a job running
and if no job ever started then the lock would still be free
jobs were running but yeah I suppose if there is one of these bad ones in flight it lets the main thread run again
eh
I won't worry about that rn
in any case we caught it before it has became a problem
lmao @green gust I see why it is so unlikely to crash with your Jimothy guy
to be clear this is with a lot lot lot of them, but the point is that the physics updates are taking really long due to all the trigger colliders
PlayerPhysicsRegion and EnemyAICollisionDetect
hmm
perhaps you need to set some layer exclusions on them, but I might also want to look into optimizing those OnTriggerStay() handlers to not alloc
ontriggerstay on jimothy?
on PlayerPhysicsRegion and EnemyAICollisionDetect
ah, zeekerss stuff
not sure if he has the collision detect but definitely the physics region
i could just replace em with my own script
yea
if you replace PlayerPhysicsRegion you're on your own lmao

optimizing it may be worth something though
and also make sure you have all layers excluded except the ones that are relevant
well i dont really do transpilers or patches to stuff like that usually lol, but i can mess with the collider
i need to go through all the things i add and mess with their colliders
there's a lot
i also need to make my gal colliders like, a lot less
i think i used to put a static collider for each of their armature bones
to be fair it's accurate 
yeah I mean my looking into optimizing those OnTriggerStay methods
for what purpose? taking damage?
nope, just for standing on em like collision and stuff
oh
you're supposed to be able to stand on their shoulders??
that seems a bit overkill lol
its useful sometimes
but you might be able to make those only physical collision and not trigger any callbacks, not sure if that would be the default behavior for those
one time i was drowning, so i stood on their head and jumped away
ye they're just static colliders
so no trigger stuff
im gonna have to check the exclude etc stuff for scannodes and whatnot layer
later*
that's gonna be a bit tedious
cuz they also use colliders (which i assume need to be trigger but i could be wrong)
also i guess if a trigger collider is only for when zeekerss is doing a sort of overlapsphere
it can just exclude everything?
main thing you need to do is exclude everything irrelevant on your physics regions and collision detects
you're getting triggers on your own colliders
this is with just one jimothy
(zeekerss should also add exclusions.....)
(but thankfully it is just the elevator....)
uploaded the hotfix for not taking the read lock in PathfindingLib 0.0.7, and also tested CodeRebirth on March with carving and navmesh generation running every frame and things seem fine
also added profiler markers to verify that the jobs are pausing, they are indeed doing so the same as my job in PathfindingLagFix so we should be good @green gust
yippee
god the fact that I was able to get this working with the minimal amount of thread waiting possible so easily makes me really question the Unity devs' judgement for not doing so themselves
like this could just be one mutex and condition variable in their code and a few locks around the navmesh writes and then it never crashes again
if I'm able to hook in and do this they could do it even more easily
that reminds me later this weekend i'll probably make a PR to your repo with some extra checks in the lock implementation. as that's a user facing api we should make it a bit safer ( obvs with the minimum impact on performance possible )
I'll have to see how those look, it's meant to be a pretty low level API
oh boy lol
I wonder what version that is
they mention it's happening at exit though so maybe not a big deal exactly
@keen ruin btw i've had 3 people so far ask me interested about using pathfindinglib
uh oh
you've got an audience
like other AI authors I assume?
gotcha
one of em has 50 agents that are trying to calculate their routes as part of 1 enemy
oh is that the rat?
yuh
oh jeez
@gentle charm
there was also the lethal gargoyle creator
that shitty scottish enemy
well maybe it's a good thing I was looking at hacking into the runtime to inject paths into agents
You ever find out why Snare Fleas were behaving oddly?
they seemed fine in my testing
I would be interested to see clips of what is odd though
Well we had a Snare drop on a client's head and it only did 10 damage to them and when I attacked it it didn't drop off their head til I killed it, then I noticed everytime a snare would drop from a ceiling they just ignored me as well as clients and would wander off instantly
Idk
It was very strange
Other enemies all behaved fine
Maybe some weird interaction with More Company?
clips too
you can notice a lot and still be wrong
@keen ruin what layer are doors on π₯Ί
need it to figure out what im excluding from jimothy's layers
uh I think they would be either InteractableObject or Room
interactableobject sounds right
do you need to interact with them?
enemies open doors via EnemyAICollisionDetect
so i cant just exclude every layer except player layer
not sure, it's possible if MoreCompany isn't patching something it ought to be, but I wouldn't tend to think so
good to know it was a client at least I guess, I can try that later
I just know they were fine til tonight lol
initial information was far from enough for a repro
does this mod replace this?:
oh I forgor about that
v2 is a future version of that
it is in beta
check the readme and use at your own risk
@ashen harbor any idea if this issue could have started with beta 2.0.4?
the player targeting is my first thought for a possible culprit
Possible, I was wondering if it maybe started with the update where you split up the mod and Lib
nah it wouldn't be that
or it's very unlikely anyway
if that were the case, there would be a whole more broken AI going around
There were 3 of us spectating when it happened but I don't think any of us clipped our perspective π
Yeah true
but it literally just latched onto the player and just, didn't do anything
timestamp
hmm I see
it's incredibly odd that it didn't detach, logs would have been very helpful for that
but I'll have to see later if there is anything that would cause exceptions when hitting the snare flea to make it not run the detachment code
I don't patch anything to do with that, which makes me think that another error happened before that, so without logs I am in a tough spot
Sadly
The only errors I ever got were from CustomStoryLogs iirc but I can send you the SQLite
Actually wait
I sent Wesley the log I think
Should be it
hmm, nothing shows up searching for the obvious keywords
but it's also possible that I incidentally fixed this in a commit that I haven't uploaded to thunderstore yet, I'll have to check in a bit
here: https://github.com/mattymatty97/LC_PathfindingLib/commit/a3b662521d28fd471d28bba1a229601377ef3fbd
it still is a LowLevel API but now it should be Reentrant ( recursive ) and also check the validity of the operation. so it's not possible to Release a lock if you're not holding it
i cannot test it atm so i might have made some mistakes but the idea is there
the impact should be minimal if not none as the operations added are really simple
hmm, I see
I tend to think this is unnecessary on some level though, since I can prevent being in the wrong state by just asserting that we are on the main thread or not
you can assert it but assertions will be stripped out on release and this is a public api.
plus you yourself managed to break it previously with the yield w/o Begin
that meant you had the reader count negative in some moments
fair point
i highly doubt this few checks will cause any measurable impact in performance
and even then the security gain would be worth it imo
the one big misgiving I have right now is that I vaguely remember trying ThreadStatic for something a while ago and it performed pretty badly for some reason
I guess in this case I should just record the time to check these things before and after, but I wonder if there is a better way
ik ThreadLocal is quite bad for performance
i tried to google ThreadStatic but found noone that did performance comparsions
only thing i found is that ThreadStatic perform a lot worse in Debug builds than in Release
from stackoverflow
ah right, that could make sense maybe
I'm assuming that means the CIL optimization level though, my "debug" builds are still optimized, just with profiler markers added
wait also @tardy pivot how would your commit handle multiple ReadersWriterLock instances? if we're gonna be expanding the functionality of the class it should not assume that there's only one
we would probably need to protect a dictionary with the mutex wouldn't we?
anyway, I can add a simple check to make sure that the readersActive doesn't go below zero at least
i mean that lock was used as a static class to begin with π
if you want to allow multiple separate instances then all the statics need to become instance field and instead of ThreadStatic attribute use the ThreadLocal<T> objects
the lock instance was in a static class
yeah i meant that we create only one instance of it
sure, but in that case I might as well make everything involved in the locking static
then at least it's obvious that it can only be used once
I would rather keep the class form, and I can make protections for these things through throwing exceptions based on the information that already exists rather than creating that limitation
converting them to threadlocals is not difficult butbi'm unsure about the performances in that case
if readers are only ever on different threads than writers, the check for taking a read lock within a write lock and vice versa can never happen
(which we can safely say should always be the case)
main thread can always safely read the navmesh, it doesn't need to take the lock for that, so I don't want to allow it
i mean we can keep it as it is rn tbh. if anybody breaks it it's their fault anyways
yeah
I mean I can make the assertions into exceptions probably as well, I just have to check the cost of determining if we're in main thread
it's probably very minimal
only check we should implement somehow is the recursion. as it is possible to acquire the write multiple times i belive π€
I looked up some discussion about performance of ThreadStatic vs ThreadLocal, and people were saying that ThreadLocal performed badly, so I think if I were to make those protections I would create my own data structure to keep track of that
that's protected through NavMeshLock, nobody is using ReadersWriterLock
write lock can only be taken by main thread, and it has a "thread local" in the form of a static field for the depth
oh uh? ok
only main thread can read from that field by nature of it being behind an assertion
sure then there is no need to change anything tbh.
it's a matter of performance vs security
or more precisely caring to gracefully fail if a 3rd party uses the api wrong
π
@ashen harbor some part of the strange behavior with the centipedes seems like it may be caused by the async player targeting patch, I'll have to rethink that one I believe
not sure what would have caused it to do no damage and not want to detach though
the issue I'm observing is that because the first result from calling TargetClosestPlayer after it has attached to the ceiling with no one inside will say that no player is targetable, it immediately goes into retreat mode until the next time it drops
however, I can't really seem to get it so that the centipede doesn't do damage yet
looks like maybe the check for main thread was actually causing exceptions on release builds, but it wasn't outputting any of them 
just pushed an update to just roll a new function for this check instead, should work again
in v0.0.10
I don't know lmao
I wish I knew
unless maybe it would show up in Player.log, I could try to check quickly
BepInEx only collects unity logs from main thread. everything else goes to the Player.log only
yee i found that out some time ago while working on AsyncLoggers
Yes definitely for sure
yep BepInEx loggers work. it's specifically Unity logs
this is more a BepInEx issue than unity tho
yeah guess I know where to go if something weird is happening in my jobs
(if I see the exceptions there, I will check now)
I'm guessing maybe CurrentThreadIsMainThread() just returns true in all cases in release, maybe your decomp could tell you Matty
since I don't have the release UnityPlayer.dll decomped yet
i've pondered if to patch it in AsyncLoggers in the past then decided to leave it as original
oh it's something easy to fix?
Making me sound dumb now, curse you matty
yeah it's a matter of moving a action from one event to another
here in BepInEx github this is for BepInEx 6 but i was using the decompiled one at thebtime and it's still the same
huh, I see
to logMessageReceivedThreaded
why is it registering it with reflection btw? seems funky
not sure tbh
also I am currently very confused, I switched it back to using UnityEngine.Object.CurrentThreadIsMainThread() again and it is not failing to run the jobs anymore
I must've goofed something before
prob because it's in a preloader and it should not load the classes until needed
wait but wouldn't the Application class be loaded by using its nested class?
and also by getting the method via reflection?
yeah but that method is called after unity boots. but it's loaded before
reflection used to support old unity versions
or that..true
huh, because of overloads?
but I guess I don't know how an overload would not also cause errors with reflection if they aren't providing parameter types
no, because RegisterLogCallback is for 4.0.0-5.0.0 unity versions
ohh yeah i linked the wrong lines... uops
this lines are the correct ones π
i'll check that once i'm back at the computer π
what about making it an actual static class?
and use the chance to also implement YieldRead too
https://github.com/mattymatty97/LC_PathfindingLib/commit/7910aee2783441c0b48caeaa7e47ce422774fb70
Hey matty
o/
Zaggy sleeping
But I figured you'd be interested since you're both on this
And I don't understand jt lol

you're instantiating it only once in a static context anyways π
well "proper" is a big word. trying to find a compromise between safety and performance π x2
yeah I'll probably do that or make a linked list of thread data like the .NET one does, later
first things first, I gotta back it out to remove the exceptions
I don't have time to fully fix the safeties
I also am very curious why it would be thinking it's running on the main thread though
linked list will probably be worse in performance than statics tbh
for sure, but it should only be one extra comparison over the static implementation
if it is implemented as a static class though, I would tend to say it should just be in NavMeshLock instead of split off in another class, since it can't be reused anyway
at least not without copying it
oh for sure. my commit was just as an example
and nobody should be using this implementation of the lock outside the lib use-case
i belive there is some extra cost for finding the current thread over the compiler implementation of ThreadStatics
anyways making the lock static seems the best approach to me
just wanted to say my game has been running noticeably better recently and i have no doubts the plf beta has been a large part of that
the only other change i've made recently was like, disabling showcapacity after finding out it used reflection invoke + gameobject.find every single frame
though i think the latter has been straightened out now at least
anyways plf is the goat
the linked list would be for separate locks, not for separate threads
oh well that does sound like it would make a huge difference, especially if it was Find()ing without a full path
but I'm glad to hear that it feels better 
well, i made the change a couple weeks back, but i noticed the past two nights i've played that performance was like, consistently 100+ frames for me
and i can't remember any other recent time that's been the case
what was it before out of curiosity?
pathfindinglagfix beta seems to be the only meaningful change i've made in that time
unless some mod got a huge stealth performance update or smth
"the change" meaning disabling showcapacity, in this message
if you're the host, it definitely makes sense that you would feel it
worded that kinda weirdly
oh idk if it was clear, but I meant what was your fps before?
oh
i never benchmarked it before so it's always just been feeling for me
but i can "feel" the difference between 60hz and 120hz
and i was always much closer to 60hz before, whereas now, it feels closer to 120hz
sorry that's not a very exact science π
the improvement is noticeable though
if the metrics help you, i could do a comparison next two times we play and use an actual fps counter
:p
I mean it's not super important, I think I'm more intrigued to see what lower end machines get
I just like hearing reviews on how it is helping in general though
i see
it makes a huge difference in my synthetic testing but I haven't gotten to host games too much for a while
doing it now tho
my stuff is pretty dated (it was "high end" like 10 years ago) but i wouldn't say "low end"
i am probably on the lower end of specs in terms of the people i play with, i suppose
anyways sorry to babble i just wanted to say
been loving the work you've done over here
done a lot of lurking since most of this thread is out of my realm of expertise
but it makes me happy to see all the progress
thanks
also
it's only out of your realm of expertise if you let it be
but also fair
lol yeah
there's a lot of things that I didn't think I would be doing with mods when I started lol
in any case, im not there yet
netcode has always felt sort of like black magic to me before i saw how approachable unity made it with nfgo
and i think it was mostly just assumptions on my end making it sound scarier than it really was
that sort of thing applies to other concepts, i'm sure
yeah for sure
that's how it often is
even things that are difficult to approach, you kinda just have to immerse yourself until you understand pieces of it, keep reviewing things you don't understand until the information you do understand gives you more context on the other things
there's a lot of things I've learned on my own just by doing that
Hello, I was wondering if there is any significant improvement between the non-beta version and this one?
There should be ye
Awesome, who likes stable releases anyway 
This should be stable*, it'll get transferred to the non beta version maybe soon-ish
imo the beta is pretty stable now
there was a lot of concern with crashes in the earlier versions but i haven't encountered any so far (since v2.0.4)
i think it's just getting new features ATM that are preventing it from leaping to stable release yet

alright
yeah the difference is very significant between stable and beta, beta is effectively a total rewrite and it is more of a performance mod than a bandaid fix
the longest-running parts of most AI in the game (at least the ones that have been patched) run off the main thread in the beta
also yeah, mainly trying to ensure that AI is totally functional and behaves as intended before I push to stable, had a mishap with one of the patches that I was trying to avoid specializing, so for now that one is disabled to see if things are fine without it
main things I need to know are whether any AI behaves in an unexpected way or becomes stuck
@tardy pivot made a commit with the lock and safeties implemented directly into NavMeshLock here: https://github.com/Zaggy1024/LC_PathfindingLib/commit/844fa0e3cee3c058064bae84e9e9a2dbec5ce833
not live yet in case you spot anything screwy
time to check π
why getting the state by ref?
also if we track the recursion depth we need to implement the Yield so that it ignores the depth. or it will not have any effect
i do like the use of a single variable for both state and depth
well I'd have to check what it actually compiles to, but in theory it should encourage the JIT to do the work of getting the thread's address for that field only once
hmm I suppose that could be a thing, but as it is there's really no reason that it should be needed
can't hurt, so I'll think on it tomorrow
btw it took me a while but i can confirm the check for mainThread is the same in Release:
ah ty, that's good to know
it did seem to be working, so I'm really not sure what I messed up to where it seemed not to work
https://www.youtube.com/watch?v=cJnDFIIyV9M
got recommended this random video and thought it was funny, wth is wrong with maneater pathfinding lol
hey guys i remembered my youtube password it was password123 make sure i dont forget it this time thanks
You can probably make sense of the first half of the video but then it just falls apart at the half point lmao
yeah I'm not sure when the AI is supposed to switch out of that mode, but the maneater is intended to sneak around near the player when you're within a certain area
it's one of the most complicated AIs in the game I think
so it's hard for me to say if that's something that was somewhat intended
it probably is the most complicated
the maneater sneaks around like the bracken and tries to avoid player line of sight
but also tries to approach the player when it's not being observed
but regardless of where it is moving i think it aggros based on distance to the closest player
which is why it seems to constantly flip between running away and attacking people
I think like
it freezing in place like this is almost certainly a bug of some sort
though
half of that gets thrown out the window once it gets stuck
like why'd it decide to just... run through the player and not do anything π
Is it really that bad π
Maneater AI is really strange, the few times i dealed with the adult form were unforgettable π
The strangest one was outside, where he was looping a rock at night and didn't attack anyone
Then someone got into the ship and he went on a killing spree
the time i learned it charges for a lot longer when outside
lol yeah it gets super buffed when it's outside
btw, played some solo runs with pathfinding beta and everything was very smooth π
although there was a certain enemy who behaved a little strangely
aka Masked
idk what to say, he was dumber than usual
on rend he saw me and just gave up chasing me to the ship
on titan he saw me at the staircase and decided that the best path to get me was to return and use the other staircase with the dogs
masked are kinda buggy in vanilla ever since v60 so im not 100% sure if this is related to pathfindinglagfix
Haha, gotchya. I appreciate that π
they act super weird now ever since the mineshaft elevator changes
yeah, they were more menacing
but it's strange how they behaved this time, they didn't even try to get to the ship
hmm, I don't think that could have been a PathfindingLagFix bug, I don't currently patch anything that should affect the masked unless it was patrolling instead of actually trying to chase you
I appreciate you looking out for bugs nonetheless, anything out of the ordinary is worth letting me know about
So I've ran into a couple cases where Spiders kinda start glitching out and start moving really weirdly, once was in Mineshaft and once was when a Spider was chasing someone and they left through a Fire Exit, so I would guess when they lose track of the original person they're targeting their ai just janks out
They just kinda start spinning and rotating as they move, and fighting them becomes difficult cus their hitbox becomes inconsistent π
do you know how long that was after the spider spawned? I wonder whether it was still trying to place webs
I feel like I've seen spiders spin in place in vanilla, but I can't say I'm sure
Possible
the only thing I change that should affect spiders in the current version is the patrolling code, which in theory should mean that any other patrolling enemy could exhibit the same behavior if it's caused by PathfindingLagFix
and I think there are other mods that do several fixes for the spider AI right? I wonder if any of them address that if it is a vanilla bug
anotha update
Version 2.0.9 (Beta)
- Reintroduced the async player targeting patch with changes to ensure that enemies don't instantly give up the chase when first checking if a player is accessible.
this is a general patch once again, so lemme know if enemies that chase the closest player behave strangely
in theory, centipedes should no longer run away from you after you trigger them (they chased me in my testing), since I have made it so that it does player targeting synchronously if the last asynchronous result is stale
Noice π
I'm just glad the past few updates have been pretty stable, hopefully that means you can finally bring it out of beta soon
yeah I'm thinking that if there are no issues with enemies getting stuck or anything in this version I will bring it to stable and then start another minor release in beta
but I'll have to have a look at all the enemies to see which ones are the worst with the roaming and targeting already patched
feel free to suggest ones to look into
Might be something with #1298542667390779413 and how I tilt spider on slopes?
Or if it's turning back and forth it might be something with pathfinding.
I was gonna guess maybe a bug with Natural Selection cus it happened after adding that if not PathfindingLagFix but yeah it kept turning back and forth while moving
oh "while moving" as in it was actually going somewhere?
Yeah, and while chasing players.
ohh okay, that's interesting
I'll have to see if I can repro anything like that in LAN I suppose
Natural selection with safe mode doesn't affect spider at all so it has to be something with Spider position fix.
Hey it seems Pathfinding really hates surfaced creatures
Mantis shrimp and Horseshoot crab are throwing lots of asynchronous path stuff in the console
Send your logs
Ill do when I close the game, just a min
Okay
I only noticed it towards the end, as I was going to moons where I had already set them to spawn in
Just noticed it also applies to Cancerous Rodent
will have a look
but also
[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
LC_Optim.Plugin.Debug (System.Object data, BepInEx.Logging.LogLevel logLevel) (at <73e44b71e2f746e5b02fc24470b69417>:IL_000C)
LC_Optim.Plugin.RemoveLagCentipede (CentipedeAI __instance) (at <73e44b71e2f746e5b02fc24470b69417>:IL_004D)
(wrapper dynamic-method) CentipedeAI.DMD<CentipedeAI::DoAIInterval>(CentipedeAI)
(wrapper dynamic-method) EnemyAI.DMD<EnemyAI::Update>(EnemyAI)
(wrapper dynamic-method) CentipedeAI.DMD<CentipedeAI::Update>(CentipedeAI)
ewwww
that mod is so unbelievably outdated the beta makes it doubly obsolete
oh you're talking about the debug log
it's not really that PathfindingLagFix dislikes those enemies, although I certainly wouldn't have expected them to be running target checks infrequently enough that that message spams
that is definitely a bit curious

