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

Fix for NavPath is not updated when navMesh has change. #1830

Merged
merged 1 commit into from Nov 27, 2016

Conversation

Projects
None yet
3 participants
@pacomont
Contributor

pacomont commented Nov 24, 2016

It's not working because on onNavMeshUpdate the string comparation will never succeed, and will never call call navpath::plan()

DefineEngineMethod(NavPath, onNavMeshUpdate, void, (const char *data),,
   "@brief Callback when this path's NavMesh is loaded or rebuilt.")
{
   if(object->mMesh && !dStrcmp(data, object->mMesh->getIdString()))
      object->plan();
}
I's not working because onNavMeshUpdate string comparation will never…
… succeed.

DefineEngineMethod(NavPath, onNavMeshUpdate, void, (const char *data),,
   "@brief Callback when this path's NavMesh is loaded or rebuilt.")
{
   if(object->mMesh && !dStrcmp(data, object->mMesh->getIdString()))
      object->plan();
}
@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Nov 25, 2016

Contributor

Good catch. I believe I put the timing information in the callback so that the UI would be able to display the data. See here and here.

So the fastest solution would be to change the code that you quoted in the issue, to take the two-word string into account.

Maybe the better solution would be to emit a separate timing event and make the UI listen to that.

Contributor

crabmusket commented Nov 25, 2016

Good catch. I believe I put the timing information in the callback so that the UI would be able to display the data. See here and here.

So the fastest solution would be to change the code that you quoted in the issue, to take the two-word string into account.

Maybe the better solution would be to emit a separate timing event and make the UI listen to that.

@Areloch

This comment has been minimized.

Show comment
Hide comment
@Areloch

Areloch Nov 27, 2016

Contributor

Yeah, having a separate timing even would be a good thing to add in. Probably can just make an issue for that and will merge this fix in.

Contributor

Areloch commented Nov 27, 2016

Yeah, having a separate timing even would be a good thing to add in. Probably can just make an issue for that and will merge this fix in.

@Areloch Areloch merged commit 6cad7b6 into GarageGames:development Nov 27, 2016

@pacomont

This comment has been minimized.

Show comment
Hide comment
@pacomont

pacomont Nov 27, 2016

Contributor

I'm having a peak workload those days. Let me few days and I could give a try.

Contributor

pacomont commented Nov 27, 2016

I'm having a peak workload those days. Let me few days and I could give a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment