Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for npc teleport #582

Closed
wants to merge 1 commit into from

Conversation

thokkat
Copy link
Contributor

@thokkat thokkat commented Feb 19, 2024

In vanilla Npc_ExchangeRoutine teleports npc's to new routine waypoint if they're offloaded from world. Examples are Greg-Dexter event and ring of water meeting. The idea is to imitate this by resetting far npc's if their routine is exchanged.

@Try
Copy link
Owner

Try commented Feb 19, 2024

Hm, thanks for raising this issue, bug unfortunately this solution is too big of a hack, and we should not merge this PR as-is.

You checking for ProcessPolicy::AiNormal - that's find, but destination waypoint might be observable by player. If you check for wayPoint and for npc, it probably wont be a 'fix'.

I was considering to teleport npc forward along his way-path, while whole segment of way-path is not visible. Yet it's hard to reason about path visibility, specially from CPU side

@thokkat
Copy link
Contributor Author

thokkat commented Feb 19, 2024

but destination waypoint might be observable by player.

Yeah I was aware of the concerns you raised in #420. But I mean if this ever happens it's surely out of vanilla render distance and I'd say an ok tradeoff for getting several events working in return.

I was considering to teleport npc forward along his way-path, while whole segment of way-path is not visible.

This sounds even more hacky :D. But as you said above adding a ray between player and waypoint makes workaround only bigger so feel free to close.
But I wonder what a solution could be. Only thing I could imagine is script patch where every call is checked and AI_Teleport is added if not visible by player.

@Try
Copy link
Owner

Try commented Feb 24, 2024

starting a new issue, to discuss on how implementation may look like: #585

@Try Try closed this Feb 24, 2024
@thokkat thokkat deleted the npc-teleport-workaround branch February 24, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants