0.7.91: Mobile town NPCs spawning in front of player[RESOLVED]

Locked
User avatar
Ferital
Posts: 282
Joined: Thu Apr 05, 2018 8:01 am

0.7.91: Mobile town NPCs spawning in front of player[RESOLVED]

Post by Ferital »

In DFU, I frequently see NPCs suddenly popping out of nowhere while walking in towns or villages, whereas this is not the case in classic. Maybe a check should be added to ensure NPCs spawn at a reasonable distance from the player and especially outside his current view frustum.

User avatar
Interkarma
Posts: 7242
Joined: Sun Mar 22, 2015 1:51 am

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by Interkarma »

That check already exists, and it operates most of the time. You're only noticing it when it doesn't. ;)

Not sure why it's not working 100% of the time. Could be some kind of latency. I'll drill into more when I can, it's just not a priority right now.

User avatar
Ferital
Posts: 282
Joined: Thu Apr 05, 2018 8:01 am

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by Ferital »

Yes of course, sorry I just looked very quickly at the code and did not notice the check. Actually I did not dig further as it is out of my current understanding of DFU codebase :)

User avatar
Interkarma
Posts: 7242
Joined: Sun Mar 22, 2015 1:51 am

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by Interkarma »

All good, it's still definitely a bug. :)

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by pango »

Ferital wrote: Mon Apr 15, 2019 10:05 am Yes of course, sorry I just looked very quickly at the code and did not notice the check. Actually I did not dig further as it is out of my current understanding of DFU codebase :)
I don't have an IDE at hand, but I think that's https://github.com/Interkarma/daggerfal ... er.cs#L280
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

BansheeXYZ
Posts: 555
Joined: Fri Oct 23, 2015 8:19 pm

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by BansheeXYZ »

Is there a lot of overhead in just spawning all the townsfolk at once the moment the player is in the city or in sight of it? They're not 3d models, so why is the code trying so hard to conditionally show them?

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by pango »

I submitted a PR
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.7.91: Mobile town NPCs spawning in front of player

Post by pango »

Should be fixed in 0.7.120
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Locked