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

Post Reply
User avatar
Ferital
Posts: 95
Joined: Thu Apr 05, 2018 8:01 am

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

Post by Ferital » Mon Apr 15, 2019 8:53 am

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: 4282
Joined: Sun Mar 22, 2015 1:51 am

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

Post by Interkarma » Mon Apr 15, 2019 9:34 am

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: 95
Joined: Thu Apr 05, 2018 8:01 am

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

Post by Ferital » 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 :)

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

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

Post by Interkarma » Mon Apr 15, 2019 10:49 am

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

User avatar
pango
Posts: 1077
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 » Mon Apr 15, 2019 11:57 am

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
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

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

Post by BansheeXYZ » Mon Apr 15, 2019 12:49 pm

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: 1077
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 » Sun Apr 28, 2019 8:02 am

I submitted a PR
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 1077
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 » Wed May 01, 2019 7:37 am

Should be fixed in 0.7.120
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply